ci-security-scanning-with-strix
यह क्या करती है
यह स्किल Strix का उपयोग करके GitHub Actions, GitLab CI या ऐसी ही पाइपलाइन में स्वचालित सुरक्षा स्कैन सेट करती है। यह उन टीमों के लिए है जो मर्ज से पहले हर pull request जाँचना चाहती हैं।
कब इस्तेमाल करें
- ✓जब कोई टीम मर्ज से पहले हर pull request को सुरक्षा समस्याओं के लिए स्कैन करवाना चाहे।
- ✓जब CI पाइपलाइन ऐसे मर्ज रोके जो पुष्ट कमज़ोरियाँ जोड़ें।
- ✓जब कोई चाहे कि स्कैन के नतीजे pull requests पर टिप्पणी के रूप में दिखें।
Skill का लिंक
https://github.com/usestrix/strix/blob/main/skills/ci-security-scanning-with-strix/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं चाहता हूँ कि हमारे GitHub रिपॉज़िटरी का हर pull request मर्ज होने से पहले सुरक्षा स्कैन से गुज़रे। यह कैसे सेट करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक वर्कफ़्लो सेट करता है जो केवल बदली गई फ़ाइलें स्कैन करता है, और अगर पुष्ट समस्याएँ मिलें तो बिल्ड फ़ेल कर देता है। नतीजे pull request और code scanning पर भेजे जा सकते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
क्या इसे चलाने के लिए मेरा अपना सर्वर चाहिए?
स्किल दो विकल्प बताती है: अपने रनर में चलने वाला self-hosted टूल, और बिना रनर सेटअप के प्रबंधित प्लेटफ़ॉर्म।
क्या यह हर बार पूरा रिपॉज़िटरी स्कैन करता है?
नहीं। self-hosted विकल्प को diff-scoped बताया गया है, यानी वह केवल बदली हुई फ़ाइलें टेस्ट करता है।
नतीजे किस फ़ॉर्मेट में सेव होते हैं?
स्किल कहती है कि दोनों विकल्प SARIF 2.1.0 नतीजे देते हैं।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 73k
- रैंकिंग में स्थान
- #3097
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 30/10/2026
कमेंट
- …
इस repository की और skills
api-security-testing
73kयह आपके एजेंट को Strix से REST, GraphQL या gRPC API की सुरक्षा जाँच करना दिखाती है, OWASP API Top 10 के प्राधिकरण दोषों और अन्य जोखिमों पर ध्यान देते हुए।
application-security-testing
73kयह आपके एजेंट को पूरे प्रोडक्ट के लिए सुरक्षा टेस्ट की योजना बनाने देती है, हर हिस्से के लिए सही टेस्ट चुनकर, चलाकर, और असली जोखिम के आधार पर सुधार क्रम देकर।
find-security-vulnerabilities-in-code
73kयह आपके एजेंट को injection और टूटे हुए एक्सेस कंट्रोल जैसी सुरक्षा कमियों के लिए कोड की समीक्षा करने में मदद करती है, और टेस्ट हमलों से साबित करती है कि कौन-सी असली हैं।
fix-security-vulnerabilities-with-strix
73kयह आपके एजेंट को पुष्ट सुरक्षा निष्कर्षों को लक्षित कोड सुधारों में बदलने देती है, फिर टेस्ट दोबारा चलाकर साबित करती है कि हर हमला अब काम नहीं करता।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।