Pipeline SAST with reports your CI understands.
The agent scans the checkout for risk signals and emits SARIF 2.1.0 for GitHub, GitLab's SAST schema, JUnit and Checkstyle. By default, source stays in CI and upload sends a sanitized summary. Optional AI review shares bounded snippets only after explicit consent, as described below.
Responsible use: SAST is a complementary baseline, not proof that a system is secure. Review context, authorize the repository and never publish secrets in artifacts.
Run it
node pipeline/sast/sast-agent.mjs --source . --out artifacts/sast --release "$CI_PIPELINE_ID" --commit "$CI_COMMIT_SHA" --fail-on high
GitHub Actions
Upload artifacts/sast/sast.sarif with github/codeql-action/upload-sarif@v3 and grant security-events: write. Keep artifacts for fork pull requests.
GitLab CI/CD
Declare artifacts:reports:sast: artifacts/sast/gl-sast-report.json and optionally junit: artifacts/sast/sast.junit.xml.
Jenkins
Archive reports and use the JUnit plugin. Warnings Next Generation can import SARIF; Checkstyle is the fallback.
Optional Console
Pro and Business can generate a token in Release Gate. Use PIPELINE_SAST_TOKEN and upload only sanitized sast-result.json to track a release in the Dashboard.
Plan coverage
Starter
Local execution is available for your own validation. Console release registration and Release Gate are not included.
Pro
Pipeline SAST is included for authorized releases, with sanitized summaries, deduplication and Console tracking.
Business
Includes the Pro flow for multiple teams and releases, with reports and Business governance coverage.
Plan coverage does not replace setup, repository authorization, human review or SCA/DAST tools.
Output contracts
SARIF records rule, file, line and fingerprint. GitLab SAST feeds Vulnerability Report. JUnit and Checkstyle integrate trends and annotations. The pipeline exit code remains the policy decision.
← Back to agentsSAST with complementary AI review
Keep static analysis local and, when authorized by your team, extend the review with AI. The model examines selected snippets for contextual signals and returns suggestions linked to a file, line and evidence. OWASP Fix Studio preserves origin and human review.
Enable with consent
Store PIPELINE_TOKEN in the CI secret store, scoped to SAST and bound to the same repository. The RAG AI key is reused only in the backend; do not put that key in your pipeline.
node pipeline/sast/sast-agent.mjs --source . --out artifacts/sast --repository org/repo --ai-review --allow-ai-code-sharing
POST https://thiago.limaesilvatecnologia.com.br/console/api/pipeline/sast/ai-review
Privacy and limitations
Without both activation flags, code stays in CI. With --ai-review and --allow-ai-code-sharing, only bounded redacted snippets are sent transiently to the Console and OpenAI, without persisting snippets in the Console database. The complete repository is not sent. Review company policy: automatic redaction cannot guarantee removal of all sensitive data.
Use --require-ai when AI unavailability must fail the job. Otherwise inspect partial status and limitations. AI does not execute code, edit files or guarantee detection of every issue. Validate each suggestion before remediation or blocking a release.
Build securely: practical guide
Find risky code patterns before publishing, inside your pipeline.
Get started
- Download the official installer from https://agentes.limaesilvatecnologia.com.br/en/resources/devsecops/ and run it with Node.js 20+; it verifies the manifest before creating pipeline/sast/sast-agent.mjs.
- If the CI has no HTTPS egress, transfer the official ZIP https://agentes.limaesilvatecnologia.com.br/downloads/devsecops-toolkit/1.2.0/devsecops-toolkit-1.2.0.zip and extract it at the checkout root; it already contains the manifest and all agents/dependencies.
- Run the command in this guide on the checkout and preserve artifacts/sast even if the job fails.
- In the DevSecOps Wizard generate a scoped token, store it as PIPELINE_TOKEN and run check-connection before sanitized upload.
Minimum permissions
Local: read checkout files and write the artifact directory. GitHub: contents: read; security-events: write only for SARIF publishing. GitLab/Jenkins: checkout read access and job artifact publishing. Console upload: your scoped account token; no broad PAT or cloud access required.
Understand the result
Signals include rule, file and line and need review. Exit 0: policy not reached and complete inventory; 1: policy reached or partial inventory; 2: configuration/execution error. By default, external CI sends only sanitized metadata and findings over HTTPS; optional AI review with --ai-review --allow-ai-code-sharing sends bounded snippets to Console/OpenAI; this is not a replacement for SCA, pentesting or specialized SAST.
Next step
Fix the code, rerun the job and check the result tied to the same commit.
If it does not work
Invalid or expired token: revoke/generate a new one in the Wizard. With --require-upload an upload failure fails the step; missing results do not approve a release.