ci-security-scanning-with-strix
What it does
This skill sets up automatic security scans in GitHub Actions, GitLab CI or similar pipelines using Strix. It is for teams that want every pull request checked before merging.
When to use it
- βWhen a team wants each pull request scanned for security problems before it merges.
- βWhen a CI pipeline should block merges that add confirmed vulnerabilities.
- βWhen someone wants scan results posted as comments on pull requests.
Skill link
https://github.com/usestrix/strix/blob/main/skills/ci-security-scanning-with-strix/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want every pull request on our GitHub repo to get a security scan before it can merge. How do I set that up?β
5 new skills a week. 1 minute to read.
How it works
The agent sets up a workflow that scans only the changed files and fails the build if confirmed issues are found. Results can be posted to the pull request and to code scanning.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Set up Strix in CI/CD
You can gate PRs two ways β pick based on the environment, or combine them:
- Managed platform (recommended for most teams) β connect the GitHub/GitLab/Bitbucket app once and Strix reviews every PR with no workflow file, no runner, no Docker, and no LLM key. Results post as PR comments and land in the team dashboard. Best when you want zero CI maintenance, central tracking, or your runners lack Docker. See "Managed platform" below and the managed-pentesting-with-strix skill.
- Self-hosted OSS CLI in your runner β run a diff-scoped scan as a pipeline step. Fully in your infra, free (BYO LLM key), no external account. Requires Docker on the runner. Best for air-gapped/self-hosted CI or when you do not want scans leaving your environment.
Both fail the build on validated findings and both emit SARIF 2.1.0, so you can start with one and add the other later.
Option A β Self-hosted OSS CLI in the runner
Run a diff-scoped Strix scan on every PR: only changed files are tested, quick mode keeps it fast, and exit code 2 fails the build when validated vulnerabilities are found.
GitHub Actions
Create .github/workflows/security.yml:
name: Security Scan
on:
pull_request:
jobs:
strix-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for diff-scope resolution
- name: Install Strix
run: curl -sSL https://strix.ai/install | bash
- name: Run Security Scan
env:
STRIX_LLM: ${{ secrets.STRIX_LLM }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
run: strix -n -t ./ --scan-mode quick --max-budget 10
# Don't fail open: a run that hits the hard budget stop exits 0 but leaves
# run.json status "stopped", not "completed". Enforce completion explicitly.
# This does not catch an agent that wrapped up early on a budget *warning*
# (it still calls finish_scan and records "completed"), so size the budget.
- name: Fail unless the scan completed
run: |
run_json=$(ls -t strix_runs/*/run.json | head -1)
status=$(jq -r .status "$run_json")
if [ "$status" != "completed" ]; then
echo "Strix run status is '$status' β the scan did not complete (likely budget exhausted). Raise --max-budget." >&2
exit 1
fi
Then tell the user to add two repository secrets: STRIX_LLM (model id, for example openrouter/z-ai/glm-5.3) and LLM_API_KEY (the provider key). Do not create these values yourself.
Notes:
- In CI/headless runs Strix automatically scopes to the PR's changed files (
--scope-mode auto). If diff resolution fails, keepfetch-depth: 0or set--diff-baseto the PR's actual base branch β useorigin/${{ github.base_ref }}in GitHub Actions rather than a hard-codedorigin/main, since repos use different default branches. - Exit codes:
0pass,2vulnerabilities found (fails the job),1setup error. Add--fail-on highto fail only on high/critical findings; lower ones are still reported, so a passing job is not a finding-free report. - The runner needs Docker (default GitHub-hosted Ubuntu runners have it).
- Size the budget so the scan completes β do not let it fail open. A
0exit means "no validated vulnerabilities in what was analyzed"; if--max-budgetis hit before the diff is fully covered, the scan wraps up early and can still exit0. The "Fail unless the scan completed" step above narrows the gap:strix_runs/<run>/run.jsonis"stopped"when the scan was cut off at the hard budget limit without a final report. It is not a complete guard β the agents get graduated wrap-up warnings before that limit, and a run that wraps up on a warning still callsfinish_scanand records"completed"with partial coverage. So keep that step in any pipeline that gates merges and give the scan real headroom (comparerun.json'sllm_usage.costagainst--max-budget; if it ran right up to the cap, raise it). For aquickdiff-scoped PR scan--max-budget 10is usually ample, raise it for large diffs.
Optional: upload findings to GitHub code scanning
Strix writes SARIF 2.1.0 to strix_runs/<run>/findings.sarif:
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: strix_runs
Other CI systems
Any pipeline works the same way
FAQ
Do I need my own server to run this?
The skill describes two options: a self-hosted tool that runs in your own runner, and a managed platform that needs no runner setup.
Does it scan the whole repository every time?
No. The self-hosted option is described as diff-scoped, so it tests only the files that changed.
What format are the results saved in?
The skill says both options produce SARIF 2.1.0 results.
Details
Original description by the author
Add security scanning to CI/CD with Strix β GitHub Actions, GitLab CI, or any pipeline β so every pull request gets a diff-scoped AI pentest that blocks vulnerable code before it merges, with results as PR comments and SARIF uploaded to code scanning. Covers both the self-hosted open-source CLI (runs in your runner) and the managed app.strix.ai platform (GitHub/GitLab app or API, no runner infra). Use when the user asks to add security scanning, SAST/DAST, pentesting, vulnerability checks, or automated security review to their CI pipeline, pre-merge gate, or PR workflow.
repo: usestrix/strix
Popularity
- GitHub stars
- 73k
- Ranking position
- #3097
- License
- Apache-2.0
- Updated
- 10/30/2026
Comments
- β¦
More skills from this repository
api-security-testing
73kShows your agent how to security-test a REST, GraphQL or gRPC API with Strix, focusing on authorization flaws and other risks in the OWASP API Top 10.
application-security-testing
73kHelps your agent plan security tests for a whole product, choosing the right test for each part, running them, and ranking the fixes by real risk.
find-security-vulnerabilities-in-code
73kHelps your agent review code for security flaws such as injection and broken access control, and prove which ones are real with test attacks.
fix-security-vulnerabilities-with-strix
73kHelps your agent turn confirmed security findings into targeted code fixes, then re-run the tests to prove each attack no longer works.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.