AI and LLM security

AI model theft during development and deployment

Model evaluation: model, table, eye arranged to illustrate ai model theft during development and deployment.

Model theft can occur in development and release infrastructure without using the public inference endpoint. Understanding AI model theft during development and deployment helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

Model evaluation needs representative inputs and evidence of the decisions or behaviours the deployed system relies on. Aggregate accuracy can hide a targeted failure, a poorly represented user group or a meaningful change after an update.

Dev-Time Model Theft refers to unauthorised access, copying, extraction, or leakage of AI models or their proprietary components during the development and training phases. Vulnerabilities during model development, including insecure environments, insufficient access controls, inadequate logging, and unsafe storage practices, can allow attackers to extract or duplicate sensitive or proprietary models before deployment.

Test: Use a tool like git-secrets or TruffleHog to scan all project Git repositories for hardcoded credentials (API keys, passwords, access tokens) that could provide access to model storage (e.g., S3, Azure Blob Storage). Response Indicating Vulnerability: The scan discovers valid, hardcoded credentials that grant read access to the location where trained models or training data are stored.

Why it matters

Consider a realistic failure: a build job exposes private model artefacts to an unnecessarily broad identity.

The effect of a model weakness depends on its position in a real workflow. A wrong prediction can range from a minor inconvenience to an unsafe or unauthorised decision when other components trust it without appropriate checks.

AI testing needs recorded model and application conditions because outputs can vary. The important evidence is the protected information, decision or tool operation affected in the deployed workflow.

How penetration testers check for it

Review artefact permissions, credentials, logs and storage copies.

  • Identify vulnerabilities permitting unauthorised access or theft of AI models during the development lifecycle.
  • Ensure robust access controls and isolation mechanisms protecting AI models during development.
  • Verify secure storage, transfer, and handling of AI models and related artifacts throughout development and training stages.
  • No Secrets in Code: Code repositories must be completely free of hardcoded secrets. All secrets must be stored in a dedicated secrets management system.
  • Record model versions, settings and repeated outcomes.
  • Connect failures to actual downstream decisions and capabilities.

How to fix it

Restrict model access and protect development and deployment credentials and artefacts.

  • Control data and model provenance and changes.
  • Evaluate relevant robustness and privacy properties.
  • Use independent safeguards for consequential decisions.
  • Re-run regression coverage after model and deployment changes.

A single unusual output rarely supports a broad claim about a model. Evidence should describe the conditions, repeatability and practical consequence without implying certainty beyond the observed result.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss your AI applications and agent workflows.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo