AI Static Security Scanner
Static source code analysis for AI/ML attack surface detection. Deterministic Semgrep-based scanning with 121 rules (91 core + 30 SOC2) and 6 scan profiles for prompt injection, data leakage, tool abuse, and AI governance.
What It Does
The AI Security Scanner performs static code analysis to detect AI-specific vulnerabilities.
AST Parsing
Parses Python, Go, JavaScript, and TypeScript code into Abstract Syntax Trees for precise analysis.
Rule-Based Detection
Applies 121 deterministic Semgrep rules (91 core + 30 SOC2) across 6 scan profiles (Default + Voice AI, Agentic, Embedded SaaS, Deep RAG, AI-Assisted Dev) to detect prompt injection, data leakage, tool abuse, and AI governance risks.
Artifact Generation
Produces AI_SECURITY_ATTESTATION artifact with findings, risk score, and evidence hash.
SARIF Export
Exports results in SARIF v2.1.0 format for GitHub Code Scanning and third-party tools.
What It Does NOT Do
The static scanner has explicit limitations to maintain security and determinism.
Supported Languages
Python
.py
Go
.go
JavaScript
.js
TypeScript
.ts
Detection Categories
Prompt Injection
CRITICAL- •Unsanitized user input in prompts
- •Template injection vulnerabilities
- •System prompt leakage
Data Leakage
HIGH- •PII in training data
- •Credential exposure
- •Sensitive data in logs
Tool Abuse
HIGH- •Unrestricted tool access
- •Missing authorization checks
- •Dangerous function calls
Model Security
MEDIUM- •Insecure model loading
- •Unvalidated outputs
- •Missing rate limiting
Configuration
MEDIUM- •Hardcoded API keys
- •Insecure defaults
- •Missing security headers
Supply Chain
HIGH- •Vulnerable dependencies
- •Unsigned packages
- •Deprecated libraries
Artifact Output
Every scan produces an AI_SECURITY_ATTESTATION artifact.
Artifact Contents
- Scan results with findings and rule IDs
- Risk score (0-100, severity-weighted and capped)
- Evidence hash (SHA-256)
- SARIF-format report
- Engine version and rulepack version
- Commit SHA and timestamp
Validity Period
Artifacts are valid for 1 year from issuance. Re-scan required after expiration or significant code changes.
Badge Output
The scanner produces an "AI Attack Surface Scan" badge.
Vulnerabilities detected
No issues detected in this scan scope
Technical error
Currently scanning
Badge Tooltip
"Static code analysis for AI attack surface. Runtime behavior not tested."
Trigger Paths
| Trigger | Automatic? | Location |
|---|---|---|
| HAIEC Platform UI | NO (user clicks "Run Scan") | HAIEC web app |
| HAIEC Platform API | NO (user calls API) | POST /api/ai-security/scan |
Consent Required
The GitHub App scans changed files on pull request webhooks automatically. Dashboard full scans require explicit user initiation. No repository cloning is performed — changed file contents are fetched via the GitHub API.
Ready to Scan Your AI Application?
Start a static security scan from the HAIEC dashboard.