SAST
Flaws in your code flagged with file, line and CWE
SAST looks for flaws in the repository's own code, not in its dependencies. It runs in the same isolated executor as the other scanners when the scan requests the sast scanner, and its findings go into the same list, the same triage, the same exceptions and the same scan.gate.
The engine is OpenGrep, with rules written by AIUBY for JavaScript and TypeScript (including JSX and TSX), Python and Go, and rules for Kotlin, PHP, Ruby, Rust, Swift and Groovy: SQL and command injection, eval with dynamic values, XSS, TLS without verification, insecure deserialization, weak hashing and debug configuration. The organization can add its own rules, and an AI analysis, requested separately, looks for what the rules miss.
How it works
- Each finding carries rule, relative file, line, severity and CWE; the Type › Code (SAST) filter isolates these findings on screen.
- Organization rules: up to 50, structural OpenGrep patterns only, with no regular expressions, applied alongside the AIUBY rules with the custom prefix.
- On-demand AI analysis: the model reads up to 8 files with secrets redacted, and only what is checked against the file (the line exists and the quoted snippet is on it) becomes a finding.
- A short lesson per CWE for open findings, in Portuguese (the flaw, how to fix it and how to test it), with a record of who completed it.
- Nothing in the repository counts as configuration: ignore files and comments asking to skip a rule are disregarded, and code snippets never leave the container.
- scan.gate counts open SAST findings by severity, and the same query is available through API v1 and the CLI.
# Session API: the sast scanner goes in the request
POST /api/platform/security/scans
{"repoId": "...", "scanners": ["gitleaks", "trivy", "osv", "sast"]}
# Code findings, through the CLI and API v1
aiuby security findings --tool sast
GET /api/v1/engineering/security/findings?tool=sastWhat it does not do
- Rules match patterns within an expression: there is no data flow analysis across functions and files, so there are false positives and false negatives.
- AI analysis is not deterministic: it never closes a finding, and its model cost is metered by the Gateway.
- Folders such as node_modules, vendor, build, dist, test and tests are excluded.
- It does not fix the code: the fix belongs to a person or to Code Automation.