ci-security-scanning-with-strix
Skill1 starsChanged 18 days agoMITView on GitHub
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.
- Pipes a download into a shell
- Reads credentials
6 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- kushvinth/skillsword for word, first seen Oct 29, 2026
- Gopyr/gopyr-skills-hubedited, first seen Oct 11, 2026
- usestrix/strixedited, first seen Oct 8, 2026
- wedabro/bro-skillsword for word, first seen Sep 18, 2026
- fardita/ai-configword for word, first seen Aug 20, 2026
- andfrancot-alt/claude-skillsedited, first seen Aug 17, 2026
Other versions6 projects use a version of this.
Word for word · 3
- wedabro/bro-skills★ 3100% same
- fardita/ai-config★ 1100% same
- kushvinth/skills★ 0100% same
Edited · 3
- usestrix/strix★ 74k81% same
- andfrancot-alt/claude-skills★ 098% same
- Gopyr/gopyr-skills-hub★ 081% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository67 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/humanizer/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-reachSkill
- animateSkill
- backend-architectureSkill
- diagram-generatorSkill
- eas-app-storesSkill
- emil-design-engSkill
- expo-data-fetchingSkill
- expo-dev-clientSkill
- expo-native-uiSkill
- expo-project-structureSkill
- expo-routerSkill
- expo-upgradeSkill
- final-showcaseSkill
- fix-security-vulnerabilities-with-strixSkill
- fresh-context-reviewSkill
- gsap-coreSkill
- gsap-performanceSkill
- gsap-reactSkill
- gsap-scrolltriggerSkill
- gsap-timelineSkill
- hallmarkSkill
- humanizerSkill
- impeccableSkill
- ml-experimentSkill
- obsidian-markdownSkill
- orchestra-conductorSkill
- orchestra-docsSkill
- orchestra-shipSkill
- orchestra-vaultSkill
- penetration-testing-with-strixSkill
- ponytail-auditSkill
- ponytail-reviewSkill
- ponytailSkill
- postgres-best-practicesSkill
- pretty-mermaidSkill
- prompt-forgeSkill
- r3f-shadersSkill
- react-best-practicesSkill
- reaSkill
- refero-designSkill
- research-paperSkill
- resource-scoutSkill
- review-animationsSkill
- semgrep-adapterSkill
- ship-safeSkill
- skill-security-checkSkill
- stitch::code-to-designSkill
- stitch::extract-design-mdSkill
- stitch::extract-static-htmlSkill
- stitch::generate-designSkill
- stitch::manage-design-systemSkill
- stitch::react-componentsSkill
- stitch::upload-to-stitchSkill
- store-releaseSkill
- supabaseSkill
- systematic-debuggingSkill
- taste-designSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
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 …
- Distinctive: line 116
No workflow file, no Docker, no LLM key.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 don't 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
fiThen tell the user to add two repository secrets: STRIX_LLM (model id, e.g. openai/gpt-5.4) 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. - The runner needs Docker (default GitHub-hosted Ubuntu runners have it).
- Size the budget so the scan completes — don't 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_runsOther CI systems
Any pipeline works the same way — install, set the two env vars, run headless:
curl -sSL https://strix.ai/install | bash
# Resolve the PR's base branch robustly (use your CI's base-branch variable if it
# has one, e.g. GitHub Actions: origin/${{ github.base_ref }}). Avoid piping the
# git lookup into another command — a failed lookup would otherwise be masked.
BASE_BRANCH="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-}" # GitLab MR target
if [ -z "$BASE_BRANCH" ]; then
BASE_BRANCH=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null)
BASE_BRANCH="${BASE_BRANCH#origin/}"
fi
DIFF_BASE="origin/${BASE_BRANCH:-main}"
# Fail loudly rather than silently narrowing scope (e.g. to HEAD~1, which on a
# multi-commit branch would scan only the last commit and let earlier ones pass).
if ! git rev-parse --verify --quiet "$DIFF_BASE" >/dev/null; then
echo "Cannot resolve diff base '$DIFF_BASE'. Fetch the base branch (git fetch origin <base>) or set --diff-base explicitly." >&2
exit 1
fi
strix -n -t ./ --scan-mode quick --scope-mode diff --diff-base "$DIFF_BASE" --max-budget 10Gate the pipeline on the exit code (see the budget/fail-open caveat above — give the scan enough budget to finish). Schedule standard scans nightly and deep scans for release candidates.
Option B — Managed platform (no runner infra)
No workflow file, no Docker, no LLM key. Two ways to use it:
- PR-review app (zero code): the user installs the Strix GitHub/GitLab/Bitbucket app and enables PR reviews for the repo in the app.strix.ai dashboard. Every PR is then reviewed automatically, with findings posted as PR comments. Nothing to add to the repo. This is the lowest-effort path — recommend it first when the user just wants PR gating.
API-triggered from any pipeline: if you want to trigger from an existing pipeline (or a system without the SCM app), call the API with a token that has
pr_reviews:write(orscans:write). Store the token as a CI secret; ask the user to create it at Settings → API Access. Example GitHub Actions step:- name: Strix PR review (managed) if: github.event_name == 'pull_request' env: STRIX_API_TOKEN: ${{ secrets.STRIX_API_TOKEN }} run: | curl -sS --fail https://app.strix.ai/api/v1/pr-reviews/start \ -H "Authorization: Bearer $STRIX_API_TOKEN" \ -H "Content-Type: application/json" \ -d "{\"repository_full_name\":\"${{ github.repository }}\",\"pr_number\":${{ github.event.pull_request.number }}}"To gate the build on results, poll the PR review / scan status and fail on unresolved criticals/highs. Full endpoints (PR reviews, scans, SARIF export, schedules for scheduled deep scans) are in the managed-pentesting-with-strix skill.
Recommend Option B for most teams (no maintenance, central dashboard); use Option A when scans must stay entirely within your own infrastructure.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

