Modern QA2026Building the Program: A Phased Approach — tiles
Log inJoin
66 / 70 · 07 Security Testing for AI Apps · Building a Comprehensive AI Security Testing Program← prev⊞ allnext →☰ Read as one page

11.3Building the Program: A Phased Approach

Phase 1: Foundation (Month 1-2)

Goal: Establish automated security gates in CI.

  1. Add Semgrep with AI-specific rules to the CI pipeline
  2. Enable Snyk/Dependabot for ML dependency scanning
  3. Configure GitLeaks for secret detection
  4. Write initial prompt injection test suite (10-20 payloads)
  5. Deploy PII scanner on LLM responses in staging

Exit criteria: Every PR is scanned for AI security patterns. Basic injection tests run on every deployment.

Phase 2: Expansion (Month 3-4)

Goal: Comprehensive automated security testing.

  1. Expand prompt injection suite to 50+ payloads (direct + indirect)
  2. Build jailbreak test framework with categorized test cases
  3. Add data leakage scanner (PII, system prompt, cross-session)
  4. Add RAG security tests (if using RAG)
  5. Configure OWASP ZAP for DAST scans against staging
  6. Write AI-specific Semgrep rules for your codebase

Exit criteria: All OWASP LLM Top 10 items have corresponding automated tests.

Phase 3: Maturity (Month 5-6)

Goal: Production monitoring and adversarial testing.

  1. Deploy real-time PII scanner on production LLM responses
  2. Build anomaly detection for unusual query patterns
  3. Conduct first red team exercise
  4. Complete threat model for all AI features
  5. Implement compliance test suite (EU AI Act / NIST AI RMF)
  6. Run first bias and fairness assessment

Exit criteria: Production monitoring catches issues missed by pre-production tests. Compliance requirements are verified automatically.

Phase 4: Continuous Improvement (Ongoing)

Goal: Evolving defense that matches the evolving threat landscape.

  1. Update jailbreak payloads weekly based on new research
  2. Review security metrics monthly
  3. Conduct red team exercises quarterly
  4. Update threat models when features change
  5. Track and respond to new ML library CVEs within SLA
  6. Publish internal security posture report quarterly