CI/CD Integration
GitHub Actions
Section titled “GitHub Actions”name: LLM Security Scanon: [push, pull_request]
jobs: llmarmor: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.12" - run: pip install llmarmor - run: llmarmor scan . -f json > llmarmor-report.json
- name: Upload report uses: actions/upload-artifact@v4 with: name: llmarmor-report path: llmarmor-report.jsonSARIF upload for GitHub Code Scanning
Section titled “SARIF upload for GitHub Code Scanning”- name: LLM Armor SARIF scan run: llmarmor scan . -f sarif > llmarmor.sarif
- name: Upload SARIF uses: github/codeql-action/upload-sarif@v3 with: sarif_file: llmarmor.sarifExit codes
Section titled “Exit codes”Use exit codes to fail pipelines on findings:
llmarmor scan ./src --quiet && echo "Clean" || echo "Issues found"| Code | Meaning |
|---|---|
0 | Clean (no MEDIUM+ findings) |
1 | HIGH or MEDIUM findings detected |
2 | CRITICAL findings — must fix |