Author: Alok Tibrewala, OWASP BASC 2026
Status: Community Contribution
Related Risks: AST01, AST02, AST03, AST04, AST06, AST07, AST08, AST09
The B1-B4 framework is a pipeline-level threat model for AI coding agents operating across software development pipelines. Where AST10 documents individual skill risks, B1-B4 maps how those risks chain across trust boundaries from developer intent to production deployment.
This model is designed to help Application Security (AppSec) teams identify where controls must be applied in sequence and avoid isolated controls.
What crosses this boundary: Developer prompts, context files, tool permissions, memory state
Primary threats:
AST Mapping: AST03, AST09
Control: Least-privilege permission manifests; explicit trust confirmation before agent session; context sanitization
What crosses this boundary: Generated source code, dependency declarations, IaC templates, configuration files
Primary threats:
AST Mapping: AST01, AST02, AST04
Control: Dependency validation before commit; generated code SAST; secret scanning on all AI-generated output; human review gate at B2 crossing
Real-world evidence: Snyk ToxicSkills (Feb 2026) — 36.82% of scanned skills contained security flaws introduced at or before this boundary
What crosses this boundary: Build scripts, IaC files, Dockerfiles, Kubernetes manifests, environment configs
Primary threats:
AST Mapping: AST02, AST07, AST08
Control: CI-level scanning of all AI-generated build artifacts; immutable dependency pinning; hash verification; IaC policy gates
What crosses this boundary: Deployed containers, infrastructure configurations, secrets, runtime agents
Primary threats:
AST Mapping: AST06, AST08, AST09
Control: Production policy enforcement (OPA/Gatekeeper); runtime isolation defaults; no host-mode execution without explicit override; audit logging of all agent-initiated actions
Real-world evidence: SecurityScorecard (Feb 2026) — 135,000+ agent instances publicly internet-exposed; CVE-2026-28363 (CVSS 9.9) enabling remote WebSocket hijack of local agent instances
Developer Intent
│
[B1] ── AST03, AST09
│ Prompt injection, over-permission
▼
AI Agent
│
[B2] ── AST01, AST02, AST04
│ Slopsquatting, insecure defaults, hallucinated deps
▼
Code Repository
│
[B3] ── AST02, AST07, AST08
│ IaC risks, dependency confusion, update drift
▼
CI/CD Pipeline
│
[B4] ── AST06, AST08, AST09
│ Privilege escalation, host-mode execution, no audit trail
▼
Production
For AppSec teams: Use B1-B4 as a review checklist when onboarding AI coding agents. Each boundary should have an explicit control owner and a validation gate before artifacts cross.
For threat modeling: Map your agent architecture against the four boundaries. Identify which AST risks are present at each crossing. Prioritize controls starting at B2 - the highest-density risk boundary based on 2026 incident data.
For compliance: The B1-B4 model maps to NIST AI RMF GOVERN and MANAGE functions, and to ISO 42001 AI management system controls.