Modern QA2026Understanding Each Security Layer — tiles
Log inJoin
49 / 70 · 07 Security Testing for AI Apps · SAST, DAST, and SCA in CI: Shift-Left Security Pipeline← prev⊞ allnext →☰ Read as one page

8.5Understanding Each Security Layer

SAST (Static Application Security Testing)

Analyzes source code without executing it. Catches code-level vulnerabilities early.

What it catches in AI apps:

  • LLM output used in SQL/shell without sanitization
  • API keys hardcoded in prompt templates
  • Missing output validation on LLM responses
  • Insecure deserialization of model outputs

Limitations: Cannot detect runtime behavior, configuration issues, or logical flaws.

DAST (Dynamic Application Security Testing)

Tests the running application by sending requests and analyzing responses.

What it catches in AI apps:

  • XSS via LLM-generated HTML content
  • SSRF through AI URL fetching features
  • Authentication bypass on AI endpoints
  • Information disclosure in error messages

Limitations: Requires a running environment, slower than SAST, cannot see code-level issues.

SCA (Software Composition Analysis)

Scans dependencies for known vulnerabilities (CVEs).

What it catches in AI apps:

  • CVEs in PyTorch, TensorFlow, LangChain, Hugging Face libraries
  • Vulnerable transitive dependencies in the ML pipeline
  • License compliance issues with model dependencies

ML-specific SCA concerns:

  • ML libraries are updated less frequently than web frameworks
  • Model files from external sources may contain malicious payloads
  • The LangChain ecosystem has had several critical CVEs