performing-sca-dependency-scanning-with-snyk
यह क्या करती है
यह टूल आपके प्रोग्राम में इस्तेमाल होने वाली ओपन-सोर्स कंपोनेंट्स (लाइब्रेरीज़) की जाँच करता है कि उनमें कोई जानी-मानी सिक्योरिटी खामी या लाइसेंस की समस्या तो नहीं है। यह इन समस्याओं को ढूँढने और अपने-आप ठीक करने में मदद करता है।
कब इस्तेमाल करें
- ✓जब आप अपने कोड में तैयार (ओपन-सोर्स) लाइब्रेरीज़ इस्तेमाल करते हैं।
- ✓जब आपको यह सुनिश्चित करना हो कि आपका कोड सॉफ़्टवेयर लाइसेंस के नियमों का पालन करता है।
- ✓पुरानी लाइब्रेरीज़ के खामी वाले वर्ज़न को अपने-आप ठीक करने के लिए।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-sca-dependency-scanning-with-snyk/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Node.js प्रोजेक्ट की dependencies में कमज़ोरियाँ स्कैन करो और लाइसेंस की समस्याओं के बारे में बताओ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल आपके Snyk अकाउंट से जुड़ता है और उन फ़ाइलों का विश्लेषण करता है जिनमें आपके प्रोजेक्ट की लाइब्रेरीज़ की सूची होती है। फिर वह इन लाइब्रेरीज़ की तुलना जानी-मानी कमज़ोरियों और लाइसेंस के डेटाबेस से करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Performing SCA Dependency Scanning with Snyk
When to Use
- When applications use open-source packages that may contain known vulnerabilities
- When compliance requires tracking and remediating vulnerable dependencies (PCI DSS, SOC 2)
- When needing automated fix PRs for vulnerable dependencies in CI/CD
- When license compliance requires visibility into open-source license obligations
- When continuous monitoring is needed for newly disclosed vulnerabilities in deployed dependencies
Do not use for scanning proprietary application code for logic vulnerabilities (use SAST), for runtime vulnerability detection (use DAST), or for container OS package scanning alone (use Trivy for a free alternative).
Prerequisites
- Snyk account (free tier covers up to 200 tests per month for open source)
- Snyk CLI installed or Snyk GitHub/GitLab integration configured
- SNYK_TOKEN environment variable set with API authentication token
- Project with supported package manifests: package.json, requirements.txt, pom.xml, go.mod, Gemfile, etc.
Workflow
Step 1: Install and Authenticate Snyk CLI
# Install Snyk CLI
npm install -g snyk
# Authenticate with Snyk
snyk auth $SNYK_TOKEN
# Test the connection
snyk test --json | jq '.summary'
Step 2: Scan Dependencies in CI/CD Pipeline
# .github/workflows/dependency-scan.yml
name: Dependency Security Scan
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 8 * * 1' # Weekly Monday 8am
jobs:
snyk-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: >
--severity-threshold=high
--fail-on=upgradable
--json-file-output=snyk-results.json
- name: Upload results to Snyk
if: always()
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
args: --project-name=${{ github.repository }}
- name: Upload SARIF
if: always()
run: |
npx snyk-to-html -i snyk-results.json -o snyk-report.html
Step 3: Configure Snyk for Multiple Languages
# Python project scanning
snyk test --file=requirements.txt --severity-threshold=high --json > snyk-python.json
# Java/Maven project
snyk test --file=pom.xml --severity-threshold=medium --json > snyk-java.json
# Go module scanning
snyk test --file=go.mod --severity-threshold=high --json > snyk-go.json
# Docker image dependency scanning
snyk container test myapp:latest --severity-threshold=high --json > snyk-container.json
# Monorepo: scan all projects
snyk test --all-projects --severity-threshold=high --json > snyk-all.json
# IaC scanning (bonus)
snyk iac test terraform/ --severity-threshold=medium --json > snyk-iac.json
Step 4: Configure Snyk Policies for Organization
# .snyk policy file
version: v1.25.0
ignore:
SNYK-JS-LODASH-1018905:
- '*':
reason: "Prototype pollution in lodash. Not exploitable in our usage - no user input reaches affected function."
expires: 2026-06-01T00:00:00.000Z
created: 2026-02-23T00:00:00.000Z
SNYK-PYTHON-REQUESTS-6241864:
- '*':
reason: "SSRF in requests redirect handling. Mitigated by allowlist at proxy layer."
expires: 2026-04-01T00:00:00.000Z
patch: {}
# Severity threshold for CI failures
failOnSeverity: high
Step 5: Enable Automated Fix Pull Requests
# Snyk fix: generate fix PRs for vulnerable dependencies
snyk fix --dry-run # Preview changes
# Apply fixes locally
snyk fix
# Enable auto-fix PRs via Snyk dashboard:
# 1. Navigate to Organization Settings > Integrations > GitHub
# 2. Enable "Automatic fix pull requests"
# 3. Set "Fix only direct dependencies" or "Fix direct and transitive"
# 4. Configure branch target (main or develop)
Step 6: License Compliance Scanning
# Check license compliance
snyk test --json | jq '.licensesPolicy'
# Snyk license policy configuration via organization settings:
# - Approved licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC
…
अक्सर पूछे जाने वाले सवाल
ओपन-सोर्स dependencies क्या हैं?
ये दूसरों के लिखे हुए कोड के टुकड़े हैं जिन्हें आप अपने प्रोजेक्ट में समय बचाने के लिए इस्तेमाल कर सकते हैं, जैसे प्रोग्राम बनाने के लिए लेगो ब्रिक्स।
SCA क्या है?
SCA का पूरा नाम Software Composition Analysis है। यह ओपन-सोर्स dependencies में समस्याएँ जाँचने की तकनीकी प्रक्रिया का नाम है।
'vulnerability' क्या है?
यह किसी लाइब्रेरी में मौजूद सिक्योरिटी खामी है, जिसका बुरी नीयत वाला व्यक्ति फ़ायदा उठाकर आपके प्रोग्राम तक पहुँच सकता है या उसे नुकसान पहुँचा सकता है।
जानकारी
लेखक का मूल विवरण
This skill covers implementing Software Composition Analysis (SCA) using Snyk to detect vulnerable open-source dependencies in CI/CD pipelines. It addresses scanning package manifests and lockfiles, automated fix pull request generation, license compliance checking, continuous monitoring of deployed applications, and integration with GitHub, GitLab, and Jenkins pipelines. '
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #8299
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।