AI Secure Development Lifecycle (AI-SDLC)
Treat model, prompt, tool-schema, and dataset updates as security-critical code changes. Automate SAST, SCA, secret scanning, container scanning, `D12` SBOM generation, `D8` security regression gates, and tested rollback drills in CI/CD.
Module detail
Best time to learn: After your projects have automated tests and CI, before treating any project as production-ready.
Prerequisites - Git and code review. - Unit/integration tests and CI. - Docker image builds. - Model, prompt, dataset, and evaluation versioning.
### Threat model
Security must persist through changes to code, dependencies, model versions, prompts, tools, datasets, infrastructure, and providers. A secure release process needs to detect changes that invalidate prior security evidence.
Study: - SAST and security-focused code review. - Software composition analysis (SCA), lockfiles, and dependency pinning. - Secret scanning and rotation. - Container image scanning and provenance. - Infrastructure-as-code scanning where IaC is used. - API security testing and DAST concepts. - Model, prompt, tool-schema, dataset, and evaluation versioning. - Security regression gates for model/provider changes. - SBOM and model-artifact inventory concepts. - Release approval, rollback, and incident response.
### Labs
- Pipeline inventory (1h): Map code, dependencies, containers, models, prompts, tools, datasets, and deployment configuration.
- Static and dependency checks (2h): Add a SAST or lint security check, dependency vulnerability scan, and secret scan to CI.
- Artifact checks (1h): Scan built container images and record model artifact versions/hashes.
- AI regression gate (2h): Run a compact security evaluation suite when prompt, model, provider, tool schema, or retrieval code changes.
- Release drill (1h): Simulate a vulnerable model/provider update; block or roll back the release and preserve evidence.
### Project integration
- All three projects: A pull request should run relevant unit tests, authorization tests, prompt-injection regression tests, dependency checks, and a compact model evaluation.
- Release process: A model/provider change is a security-relevant change, not merely a configuration edit.
### Measurable completion criteria
- CI detects a deliberately introduced secret or vulnerable dependency in a controlled test.
- Model and prompt versions are recorded with evaluation results.
- A failed security regression blocks a release or triggers a documented approval path.
- Rollback procedure is documented and tested.
- Security evidence is tied to a specific build and model configuration.
------------------------------------------------------------------------
Study days for this domain
5- 48Privacy-Aware ObservabilityW8M8R17 R27 R36 R43
- 49Add container scanning and model-artifact inventory to the…W9M1M8D12R25 R36 R37
- 50Build a compact security regression suite for prompt injectionW9S8M8D8R04 R28 R29
- 51PyRIT / Garak Scheduled FuzzingW9S8M8D8R28 R29 R31 R42
- 101Enterprise Audit & Retention PolicyW17S11M8D8D11D12R27 R31 R38 R42