Security protects software, data, and operations from unauthorized access, misuse, disruption, or alteration. In AI-assisted engineering, correctness is not enough: generated code can reproduce SQL injection, hardcoded secrets, weak authentication, missing validation, and other insecure defaults. section 1.6
A passing test suite does not establish security. Verification must include adversarial security tests derived from a threat model, because happy-path tests confirm that a feature works without asking how an attacker could break it. Security debt often hides in seams between locally reasonable components. section 1.6
Apply security as an explicit set of engineering guardrails:
- Treat model output as untrusted until reviewed against security requirements and regulatory constraints. section 1.6
- Use threat-model-derived security tests alongside types, contracts, property tests, performance tests, and mutation tests. section 1.6
- Specify secure infrastructure choices in prompts instead of accepting legacy defaults or credentials exposed through command lines and logs. section 6.4.4
- Separate mechanical verification from semantic review; model-generated review can share the original model's blind spots. section 1.8
Secure Cloud Run deployment
A secure deployment prompt requires Google Artifact Registry instead of deprecated Container Registry and Google Cloud Secret Manager instead of plain environment variables. The resulting deployment creates a secret and maps it through --set-secrets=GOOGLE_AI_API_KEY=gemini-api-key:latest, avoiding the --set-env-vars pattern that can expose API keys in CI logs and shell history. section 6.4.4



































