[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PZB0TVEVSY0CN83VXGS1VD":3,"skill-same:01M6PZB0TVEVSY0CN83VXGS1VD":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":30,"commitSha":53,"skillDirectory":54,"forksCount":13,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M6PZB0TVEVSY0CN83VXGS1VD","supply-chain-attack-response",null,"Detect, respond to, and prevent software supply chain attacks on package registries, container images, and CI\u002FCD pipelines with lockfile auditing, provenance verification","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fsupply-chain-attack-response\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"supply chain attack response","supply","chain","supply chain","active","CI\u002FCD","relevant","respond","scripts","scope","software","assessment","main","community","images","only","devops-security","lockfile","ci","verification","2026-11-10 10:12:30",false,"---\nname: supply-chain-attack-response\ndescription: Detect, respond to, and prevent software supply chain attacks on package\n  registries, container images, and CI\u002FCD pipelines with lockfile auditing, provenance\n  verification\ncategory: security\nrisk: offensive\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant security tooling (scanners, vault CLIs) and an\n  authorized scope for any active assessment. Docs-only; helper scripts and templates\n  not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n# Supply Chain Attack Response\n\nSoftware supply chain attacks target the dependencies, build systems, and distribution channels that developers trust implicitly. When a package on PyPI, npm, or crates.io is compromised, every downstream consumer inherits the malicious payload. This skill provides detection techniques, emergency response playbooks, and hardening strategies to protect your software supply chain end to end.\n\n---\n\n## 2. Detection\n\n### 2.1 npm Audit\n\n```bash\n# Full audit of installed packages\nnpm audit\n\n# JSON output for programmatic processing\nnpm audit --json | jq '.vulnerabilities | to_entries[] | select(.value.severity == \"critical\")'\n\n# Fix automatically where possible\nnpm audit fix\n\n# Check for known malicious packages via Socket.dev CLI\nnpx socket scan --package-lock package-lock.json\n```\n\n### 2.2 pip Audit\n\n```bash\n# Install pip-audit (maintained by Google\u002FOSSF)\npip install pip-audit\n\n# Audit current environment against OSV.dev\npip-audit\n\n# Audit a requirements file directly\npip-audit -r requirements.txt --output json\n\n# Check for typosquatting with bandersnatch or custom script\npip-audit --strict --desc on\n```\n\n### 2.3 Cargo Audit\n\n```bash\n# Install cargo-audit\ncargo install cargo-audit\n\n# Run audit against RustSec Advisory Database\ncargo audit\n\n# JSON output for CI integration\ncargo audit --json\n\n# Check for yanked crates\ncargo audit --deny yanked\n```\n\n### 2.4 Sigstore \u002F Cosign Verification\n\n```bash\n# Verify a container image signature with cosign\ncosign verify \\\n  --certificate-identity \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002Fmyrepo\u002F.github\u002Fworkflows\u002Fbuild.yml@refs\u002Fheads\u002Fmain\" \\\n  --certificate-oidc-issuer \"https:\u002F\u002Ftoken.actions.githubusercontent.com\" \\\n  ghcr.io\u002Fmyorg\u002Fmyimage:latest\n\n# Verify an artifact with sigstore-python\npip install sigstore\npython -m sigstore verify identity \\\n  --cert-identity \"release@example.com\" \\\n  --cert-oidc-issuer \"https:\u002F\u002Faccounts.google.com\" \\\n  artifact.tar.gz\n```\n\n### 2.5 SLSA Provenance Checks\n\n```bash\n# Install slsa-verifier\ngo install github.com\u002Fslsa-framework\u002Fslsa-verifier\u002Fv2\u002Fcli\u002Fslsa-verifier@latest\n\n# Verify provenance of a binary\nslsa-verifier verify-artifact my-binary \\\n  --provenance-path my-binary.intoto.jsonl \\\n  --source-uri github.com\u002Fmyorg\u002Fmyrepo \\\n  --source-tag v1.2.3\n```\n\n---\n\n## 3. Emergency Response Playbook\n\nWhen a dependency is confirmed compromised, execute these steps in order.\n\n### Step 1: Contain -- Pin and Freeze\n\n```bash\n# Pin the last known-good version immediately in package.json\nnpm install \u003Cpackage>@\u003Csafe-version> --save-exact\n\n# For pip, pin with hash verification\npip download \u003Cpackage>==\u003Csafe-version> --require-hashes -d .\u002Fvendor\u002F\n\n# For cargo, pin in Cargo.toml\n# Replace: some_crate = \"^1.2\" with:\n# some_crate = \"=1.2.3\"\ncargo update -p some_crate --precise 1.2.3\n```\n\n### Step 2: Audit Exposure\n\n```bash\n# Determine which versions you pulled and when\n# npm\nnpm ls \u003Ccompromised-package>\ncat package-lock.json | jq '.packages | to_entries[] | select(.key | contains(\"\u003Ccompromised-package>\"))'\n\n# pip\npip show \u003Ccompromised-package>\npip cache list \u003Ccompromised-package>\n\n# Check git history for when the dependency version changed\ngit log --all -p -- package-lock.json | grep -A2 -B2 \"\u003Ccompromised-package>\"\n```\n\n### Step 3: Scan for Indicators of Compromise\n\n```bash\n# Search for known IOCs from the advisory\ngrep -r \"suspicious-domain.com\" .\u002Fnode_modules\u002F\u003Ccompromised-package>\u002F\ngrep -r \"eval(atob\" .\u002Fnode_modules\u002F\u003Ccompromised-package>\u002F \u003C!-- security-allowlist: documented payload technique reference, do not execute outside authorized scope -->\n\n# Check for unexpected post-install scripts\ncat node_modules\u002F\u003Ccompromised-package>\u002Fpackage.json | jq '.scripts'\n\n# For Python packages, inspect setup.py and __init__.py\nfind ~\u002F.local\u002Flib\u002Fpython*\u002Fsite-packages\u002F\u003Ccompromised-package>\u002F -name \"*.py\" \\\n  | xargs grep -l \"subprocess\\|os.system\\|exec(\\|eval(\" \u003C!-- security-allowlist: documented payload technique reference, do not execute outside authorized scope -->\n```\n\n### Step 4: Notify Stakeholders\n\n```text\nSUBJECT: [SECURITY INCIDENT] Compromised dependency: \u003Cpackage-name>\n\nSEVERITY: Critical\nIMPACT: \u003Cpackage-name> versions \u003Caffected-range> contain malicious code.\nAFFECTED SYSTEMS: \u003Clist of repos\u002Fservices consuming this dependency>\nSTATUS: Contained -- pinned to safe version \u003Csafe-version>\n\nACTIONS TAKEN:\n1. Pinned all repositories to last known-good version\n2. Initiated audit of all systems that pulled affected versions\n3. Scanning for indicators of compromise\n\nRECOMMENDED ACTIONS:\n- Do NOT deploy any build that consumed affected versions\n- Review CI\u002FCD logs for the timeframe \u003Cstart> to \u003Cend>\n- Rotate any secrets that were accessible to the build environment\n```\n\n### Step 5: Replace or Fork\n\n```bash\n# If the package maintainer account was compromised, fork the last safe version\ngit clone https:\u002F\u002Fgithub.com\u002Foriginal-author\u002F\u003Cpackage>.git\ncd \u003Cpackage>\ngit checkout v\u003Csafe-version>\n# Publish to your private registry or vendor directly\n\n# For npm, point to your fork via package.json\n# \"dependencies\": { \"\u003Cpackage>\": \"git+https:\u002F\u002Fgithub.com\u002Fyourorg\u002F\u003Cpackage>.git#v1.2.3\" }\n```\n\n---\n\n## 4. Lockfile Auditing\n\nLockfiles are your first line of defense. Tampered or inconsistent lockfiles indicate something is wrong.\n\n### 4.1 Verify Lockfile Integrity\n\n```bash\n# npm: ensure lockfile matches package.json (fails CI if out of sync)\nnpm ci\n\n# Yarn: check lockfile integrity\nyarn install --frozen-lockfile\n\n# pip: generate a hash-locked requirements file\npip-compile --generate-hashes requirements.in -o requirements.txt\n\n# Verify no unexpected changes in lockfile during PR\ngit diff --name-only origin\u002Fmain...HEAD | grep -E \"(package-lock|yarn.lock|Cargo.lock|requirements.txt)\"\n```\n\n### 4.2 Detect Typosquatting\n\n```bash\n# Use the socket CLI to check for typosquatting risk\nnpx socket scan --package-lock package-lock.json\n\n# Python: check package names against popular packages\npip-audit -r requirements.txt 2>&1 | grep -i \"typosquat\"\n\n# Custom check: compare package names to known popular packages\n# Flag anything with edit distance \u003C= 2 from a top-1000 package\npython3 -c \"\nimport json, sys\nfrom difflib import SequenceMatcher\nwith open('package-lock.json') as f:\n    lock = json.load(f)\npopular = ['express','lodash','react','axios','chalk','debug','commander','inquirer']\nfor pkg in lock.get('packages', {}):\n    name = pkg.split('node_modules\u002F')[-1] if 'node_modules\u002F' in pkg else pkg\n    for p in popular:\n        ratio = SequenceMatcher(None, name, p).ratio()\n        if 0.75 \u003C ratio \u003C 1.0 and name != p:\n            print(f'WARNING: {name} is suspiciously similar to {p} (similarity: {ratio:.2f})')\n\"\n```\n\n### 4.3 Lockfile Diff in CI\n\n```yaml\n# .github\u002Fworkflows\u002Flockfile-check.yml\nname: Lockfile Audit\non: pull_request\njobs:\n  audit:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n      - name: Check for lockfile changes\n        run: |\n          LOCKFILES=\"package-lock.json yarn.lock pnpm-lock.yaml Cargo.lock requirements.txt poetry.lock\"\n          for f in $LOCKFILES; do\n            if git diff --name-only origin\u002Fmain...HEAD | grep -q \"$f\"; then\n              echo \"::warning::Lockfile $f was modified -- review dependency changes carefully\"\n              git diff origin\u002Fmain...HEAD -- \"$f\" | head -100\n            fi\n          done\n      - name: Run npm audit\n        if: hashFiles('package-lock.json') != ''\n        run: npm audit --audit-level=high\n```\n\n---\n\n## 5. Package Pinning and Verification\n\n### 5.1 pip Hash Checking\n\n```text\n# requirements.txt with hashes (generated by pip-compile --generate-hashes)\nrequests==2.31.0 \\\n    --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003eb \\\n    --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7f0edf3fcb0fce8afe0f44546e1\n```\n\n```bash\n# Install with mandatory hash verification\npip install --require-hashes -r requirements.txt\n\n# Generate hashes for existing requirements\npip-compile --generate-hashes requirements.in\n```\n\n### 5.2 npm Package Integrity\n\n```bash\n# npm automatically verifies integrity hashes in package-lock.json\n# Ensure your lockfile contains integrity fields:\ncat package-lock.json | jq '.packages | to_entries[] | select(.value.integrity == null) | .key'\n\n# Enable strict engine and audit checks in .npmrc\ncat >> .npmrc \u003C\u003C 'EOF'\nengine-strict=true\naudit=true\naudit-level=high\nEOF\n```\n\n### 5.3 cargo-vet for Rust\n\n```bash\n# Install cargo-vet\ncargo install cargo-vet\n\n# Initialize in your project\ncargo vet init\n\n# Certify a crate after review\ncargo vet certify serde 1.0.193\n\n# Import audit results from trusted organizations\ncargo vet trust --all mozilla\ncargo vet trust --all google\n\n# Run verification in CI\ncargo vet check\n```\n\n---\n\n## 6. Container Image Verification\n\n### 6.1 Cosign Sign and Verify\n\n```bash\n# Sign an image (keyless via Sigstore\u002FFulcio in CI)\ncosign sign ghcr.io\u002Fmyorg\u002Fmyimage@sha256:abc123...\n\n# Verify with expected identity\ncosign verify \\\n  --certificate-identity-regexp \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002F.*\" \\\n  --certificate-oidc-issuer \"https:\u002F\u002Ftoken.actions.githubusercontent.com\" \\\n  ghcr.io\u002Fmyorg\u002Fmyimage:latest\n\n# Verify and extract attestations\ncosign verify-attestation \\\n  --type slsaprovenance \\\n  --certificate-identity-regexp \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002F.*\" \\\n  --certificate-oidc-issuer \"https:\u002F\u002Ftoken.actions.githubusercontent.com\" \\\n  ghcr.io\u002Fmyorg\u002Fmyimage:latest | jq '.payload' | base64 -d | jq . \u003C!-- security-allowlist: documented payload decoding technique reference, do not execute outside authorized scope -->\n```\n\n### 6.2 Kyverno Policy -- Require Signed Images\n\n```yaml\n# kyverno-require-signed-images.yaml\napiVersion: kyverno.io\u002Fv1\nkind: ClusterPolicy\nmetadata:\n  name: require-signed-images\nspec:\n  validationFailureAction: Enforce\n  background: false\n  rules:\n    - name: verify-image-signature\n      match:\n        any:\n          - resources:\n              kinds:\n                - Pod\n      verifyImages:\n        - imageReferences:\n            - \"ghcr.io\u002Fmyorg\u002F*\"\n          attestors:\n            - entries:\n                - keyless:\n                    subject: \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002F*\"\n                    issuer: \"https:\u002F\u002Ftoken.actions.githubusercontent.com\"\n                    rekor:\n                      url: https:\u002F\u002Frekor.sigstore.dev\n```\n\n```bash\n# Apply the policy\nkubectl apply -f kyverno-require-signed-images.yaml\n\n# Test: this unsigned image should be rejected\nkubectl run test --image=ghcr.io\u002Fmyorg\u002Funsigned-image:latest\n# Expected: admission webhook denies the request\n```\n\n---\n\n\n## Contents\n\n- [7. CI\u002FCD Pipeline Hardening](references\u002Fdetails.md)\n- [8. SLSA Framework Implementation](references\u002Fdetails.md)\n- [9. Dependency Firewall](references\u002Fdetails.md)\n- [10. Monitoring and Alerting](references\u002Fdetails.md)\n- [11. Post-Incident Response](references\u002Fdetails.md)\n- [Quick Reference](references\u002Fdetails.md)\n\n## When to Use This Skill\n\nInvoke this skill when any of the following apply:\n\n- A dependency you consume has been flagged as compromised (e.g., advisories on OSV.dev, GitHub Advisory Database, or vendor disclosure).\n- You observe suspicious behavior from a dependency: unexpected network calls, file system writes outside its scope, or new post-install scripts.\n- You are conducting a periodic supply chain security audit.\n- A CI\u002FCD pipeline is behaving unexpectedly after a dependency update.\n- You are onboarding a new third-party dependency and want to verify its provenance.\n- You need to respond to an incident such as a typosquatted package or registry account takeover.\n- You are implementing SLSA compliance or need to generate build provenance.\n\n---\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n","> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n# Supply Chain Attack Response\n\nSoftware supply chain attacks target the dependencies, build systems, and distribution channels that developers trust implicitly. When a package on PyPI, npm, or crates.io is compromised, every downstream consumer inherits the malicious payload. This skill provides detection techniques, emergency response playbooks, and hardening strategies to protect your software supply chain end to end.\n\n---\n\n## 2. Detection\n\n### 2.1 npm Audit\n\n```bash\n# Full audit of installed packages\nnpm audit\n\n# JSON output for programmatic processing\nnpm audit --json | jq '.vulnerabilities | to_entries[] | select(.value.severity == \"critical\")'\n\n# Fix automatically where possible\nnpm audit fix\n\n# Check for known malicious packages via Socket.dev CLI\nnpx socket scan --package-lock package-lock.json\n```\n\n### 2.2 pip Audit\n\n```bash\n# Install pip-audit (maintained by Google\u002FOSSF)\npip install pip-audit\n\n# Audit current environment against OSV.dev\npip-audit\n\n# Audit a requirements file directly\npip-audit -r requirements.txt --output json\n\n# Check for typosquatting with bandersnatch or custom script\npip-audit --strict --desc on\n```\n\n### 2.3 Cargo Audit\n\n```bash\n# Install cargo-audit\ncargo install cargo-audit\n\n# Run audit against RustSec Advisory Database\ncargo audit\n\n# JSON output for CI integration\ncargo audit --json\n\n# Check for yanked crates\ncargo audit --deny yanked\n```\n\n### 2.4 Sigstore \u002F Cosign Verification\n\n```bash\n# Verify a container image signature with cosign\ncosign verify \\\n  --certificate-identity \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002Fmyrepo\u002F.github\u002Fworkflows\u002Fbuild.yml@refs\u002Fheads\u002Fmain\" \\\n  --certificate-oidc-issuer \"https:\u002F\u002Ftoken.actions.githubusercontent.com\" \\\n  ghcr.io\u002Fmyorg\u002Fmyimage:latest\n\n# Verify an artifact with sigstore-python\npip install sigstore\npython -m sigstore verify identity \\\n  --cert-identity \"release@example.com\" \\\n  --cert-oidc-issuer \"https:\u002F\u002Faccounts.google.com\" \\\n  artifact.tar.gz\n```\n\n### 2.5 SLSA Provenance Checks\n\n```bash\n# Install slsa-verifier\ngo install github.com\u002Fslsa-framework\u002Fslsa-verifier\u002Fv2\u002Fcli\u002Fslsa-verifier@latest\n\n# Verify provenance of a binary\nslsa-verifier verify-artifact my-binary \\\n  --provenance-path my-binary.intoto.jsonl \\\n  --source-uri github.com\u002Fmyorg\u002Fmyrepo \\\n  --source-tag v1.2.3\n```\n\n---\n\n## 3. Emergency Response Playbook\n\nWhen a dependency is confirmed compromised, execute these steps in order.\n\n### Step 1: Contain -- Pin and Freeze\n\n```bash\n# Pin the last known-good version immediately in package.json\nnpm install \u003Cpackage>@\u003Csafe-version> --save-exact\n\n# For pip, pin with hash verification\npip download \u003Cpackage>==\u003Csafe-version> --require-hashes -d .\u002Fvendor\u002F\n\n# For cargo, pin in Cargo.toml\n# Replace: some_crate = \"^1.2\" with:\n# some_crate = \"=1.2.3\"\ncargo update -p some_crate --precise 1.2.3\n```\n\n### Step 2: Audit Exposure\n\n```bash\n# Determine which versions you pulled and when\n# npm\nnpm ls \u003Ccompromised-package>\ncat package-lock.json | jq '.packages | to_entries[] | select(.key | contains(\"\u003Ccompromised-package>\"))'\n\n# pip\npip show \u003Ccompromised-package>\npip cache list \u003Ccompromised-package>\n\n# Check git history for when the dependency version changed\ngit log --all -p -- package-lock.json | grep -A2 -B2 \"\u003Ccompromised-package>\"\n```\n\n### Step 3: Scan for Indicators of Compromise\n\n```bash\n# Search for known IOCs from the advisory\ngrep -r \"suspicious-domain.com\" .\u002Fnode_modules\u002F\u003Ccompromised-package>\u002F\ngrep -r \"eval(atob\" .\u002Fnode_modules\u002F\u003Ccompromised-package>\u002F \u003C!-- security-allowlist: documented payload technique reference, do not execute outside authorized scope -->\n\n# Check for unexpected post-install scripts\ncat node_modules\u002F\u003Ccompromised-package>\u002Fpackage.json | jq '.scripts'\n\n# For Python packages, inspect setup.py and __init__.py\nfind ~\u002F.local\u002Flib\u002Fpython*\u002Fsite-packages\u002F\u003Ccompromised-package>\u002F -name \"*.py\" \\\n  | xargs grep -l \"subprocess\\|os.system\\|exec(\\|eval(\" \u003C!-- security-allowlist: documented payload technique reference, do not execute outside authorized scope -->\n```\n\n### Step 4: Notify Stakeholders\n\n```text\nSUBJECT: [SECURITY INCIDENT] Compromised dependency: \u003Cpackage-name>\n\nSEVERITY: Critical\nIMPACT: \u003Cpackage-name> versions \u003Caffected-range> contain malicious code.\nAFFECTED SYSTEMS: \u003Clist of repos\u002Fservices consuming this dependency>\nSTATUS: Contained -- pinned to safe version \u003Csafe-version>\n\nACTIONS TAKEN:\n1. Pinned all repositories to last known-good version\n2. Initiated audit of all systems that pulled affected versions\n3. Scanning for indicators of compromise\n\nRECOMMENDED ACTIONS:\n- Do NOT deploy any build that consumed affected versions\n- Review CI\u002FCD logs for the timeframe \u003Cstart> to \u003Cend>\n- Rotate any secrets that were accessible to the build environment\n```\n\n### Step 5: Replace or Fork\n\n```bash\n# If the package maintainer account was compromised, fork the last safe version\ngit clone https:\u002F\u002Fgithub.com\u002Foriginal-author\u002F\u003Cpackage>.git\ncd \u003Cpackage>\ngit checkout v\u003Csafe-version>\n# Publish to your private registry or vendor directly\n\n# For npm, point to your fork via package.json\n# \"dependencies\": { \"\u003Cpackage>\": \"git+https:\u002F\u002Fgithub.com\u002Fyourorg\u002F\u003Cpackage>.git#v1.2.3\" }\n```\n\n---\n\n## 4. Lockfile Auditing\n\nLockfiles are your first line of defense. Tampered or inconsistent lockfiles indicate something is wrong.\n\n### 4.1 Verify Lockfile Integrity\n\n```bash\n# npm: ensure lockfile matches package.json (fails CI if out of sync)\nnpm ci\n\n# Yarn: check lockfile integrity\nyarn install --frozen-lockfile\n\n# pip: generate a hash-locked requirements file\npip-compile --generate-hashes requirements.in -o requirements.txt\n\n# Verify no unexpected changes in lockfile during PR\ngit diff --name-only origin\u002Fmain...HEAD | grep -E \"(package-lock|yarn.lock|Cargo.lock|requirements.txt)\"\n```\n\n### 4.2 Detect Typosquatting\n\n```bash\n# Use the socket CLI to check for typosquatting risk\nnpx socket scan --package-lock package-lock.json\n\n# Python: check package names against popular packages\npip-audit -r requirements.txt 2>&1 | grep -i \"typosquat\"\n\n# Custom check: compare package names to known popular packages\n# Flag anything with edit distance \u003C= 2 from a top-1000 package\npython3 -c \"\nimport json, sys\nfrom difflib import SequenceMatcher\nwith open('package-lock.json') as f:\n    lock = json.load(f)\npopular = ['express','lodash','react','axios','chalk','debug','commander','inquirer']\nfor pkg in lock.get('packages', {}):\n    name = pkg.split('node_modules\u002F')[-1] if 'node_modules\u002F' in pkg else pkg\n    for p in popular:\n        ratio = SequenceMatcher(None, name, p).ratio()\n        if 0.75 \u003C ratio \u003C 1.0 and name != p:\n            print(f'WARNING: {name} is suspiciously similar to {p} (similarity: {ratio:.2f})')\n\"\n```\n\n### 4.3 Lockfile Diff in CI\n\n```yaml\n# .github\u002Fworkflows\u002Flockfile-check.yml\nname: Lockfile Audit\non: pull_request\njobs:\n  audit:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n      - name: Check for lockfile changes\n        run: |\n          LOCKFILES=\"package-lock.json yarn.lock pnpm-lock.yaml Cargo.lock requirements.txt poetry.lock\"\n          for f in $LOCKFILES; do\n            if git diff --name-only origin\u002Fmain...HEAD | grep -q \"$f\"; then\n              echo \"::warning::Lockfile $f was modified -- review dependency changes carefully\"\n              git diff origin\u002Fmain...HEAD -- \"$f\" | head -100\n            fi\n          done\n      - name: Run npm audit\n        if: hashFiles('package-lock.json') != ''\n        run: npm audit --audit-level=high\n```\n\n---\n\n## 5. Package Pinning and Verification\n\n### 5.1 pip Hash Checking\n\n```text\n# requirements.txt with hashes (generated by pip-compile --generate-hashes)\nrequests==2.31.0 \\\n    --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003eb \\\n    --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7f0edf3fcb0fce8afe0f44546e1\n```\n\n```bash\n# Install with mandatory hash verification\npip install --require-hashes -r requirements.txt\n\n# Generate hashes for existing requirements\npip-compile --generate-hashes requirements.in\n```\n\n### 5.2 npm Package Integrity\n\n```bash\n# npm automatically verifies integrity hashes in package-lock.json\n# Ensure your lockfile contains integrity fields:\ncat package-lock.json | jq '.packages | to_entries[] | select(.value.integrity == null) | .key'\n\n# Enable strict engine and audit checks in .npmrc\ncat >> .npmrc \u003C\u003C 'EOF'\nengine-strict=true\naudit=true\naudit-level=high\nEOF\n```\n\n### 5.3 cargo-vet for Rust\n\n```bash\n# Install cargo-vet\ncargo install cargo-vet\n\n# Initialize in your project\ncargo vet init\n\n# Certify a crate after review\ncargo vet certify serde 1.0.193\n\n# Import audit results from trusted organizations\ncargo vet trust --all mozilla\ncargo vet trust --all google\n\n# Run verification in CI\ncargo vet check\n```\n\n---\n\n## 6. Container Image Verification\n\n### 6.1 Cosign Sign and Verify\n\n```bash\n# Sign an image (keyless via Sigstore\u002FFulcio in CI)\ncosign sign ghcr.io\u002Fmyorg\u002Fmyimage@sha256:abc123...\n\n# Verify with expected identity\ncosign verify \\\n  --certificate-identity-regexp \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002F.*\" \\\n  --certificate-oidc-issuer \"https:\u002F\u002Ftoken.actions.githubusercontent.com\" \\\n  ghcr.io\u002Fmyorg\u002Fmyimage:latest\n\n# Verify and extract attestations\ncosign verify-attestation \\\n  --type slsaprovenance \\\n  --certificate-identity-regexp \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002F.*\" \\\n  --certificate-oidc-issuer \"https:\u002F\u002Ftoken.actions.githubusercontent.com\" \\\n  ghcr.io\u002Fmyorg\u002Fmyimage:latest | jq '.payload' | base64 -d | jq . \u003C!-- security-allowlist: documented payload decoding technique reference, do not execute outside authorized scope -->\n```\n\n### 6.2 Kyverno Policy -- Require Signed Images\n\n```yaml\n# kyverno-require-signed-images.yaml\napiVersion: kyverno.io\u002Fv1\nkind: ClusterPolicy\nmetadata:\n  name: require-signed-images\nspec:\n  validationFailureAction: Enforce\n  background: false\n  rules:\n    - name: verify-image-signature\n      match:\n        any:\n          - resources:\n              kinds:\n                - Pod\n      verifyImages:\n        - imageReferences:\n            - \"ghcr.io\u002Fmyorg\u002F*\"\n          attestors:\n            - entries:\n                - keyless:\n                    subject: \"https:\u002F\u002Fgithub.com\u002Fmyorg\u002F*\"\n                    issuer: \"https:\u002F\u002Ftoken.actions.githubusercontent.com\"\n                    rekor:\n                      url: https:\u002F\u002Frekor.sigstore.dev\n```\n\n```bash\n# Apply the policy\nkubectl apply -f kyverno-require-signed-images.yaml\n\n# Test: this unsigned image should be rejected\nkubectl run test --image=ghcr.io\u002Fmyorg\u002Funsigned-image:latest\n# Expected: admission webhook denies the request\n```\n\n---\n\n\n## Contents\n\n- [7. CI\u002FCD Pipeline Hardening](references\u002Fdetails.md)\n- [8. SLSA Framework Implementation](references\u002Fdetails.md)\n- [9. Dependency Firewall](references\u002Fdetails.md)\n- [10. Monitoring and Alerting](references\u002Fdetails.md)\n- [11. Post-Incident Response](references\u002Fdetails.md)\n- [Quick Reference](references\u002Fdetails.md)\n\n## When to Use This Skill\n\nInvoke this skill when any of the following apply:\n\n- A dependency you consume has been flagged as compromised (e.g., advisories on OSV.dev, GitHub Advisory Database, or vendor disclosure).\n- You observe suspicious behavior from a dependency: unexpected network calls, file system writes outside its scope, or new post-install scripts.\n- You are conducting a periodic supply chain security audit.\n- A CI\u002FCD pipeline is behaving unexpectedly after a dependency update.\n- You are onboarding a new third-party dependency and want to verify its provenance.\n- You need to respond to an incident such as a typosquatted package or registry account takeover.\n- You are implementing SLSA compliance or need to generate build provenance.\n\n---\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n",{"name":5,"risk":43,"source":44,"license":14,"category":45,"metadata":46,"date_added":49,"description":7,"source_repo":50,"source_type":31,"compatibility":51,"license_source":52},"offensive","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","security",{"author":47,"version":48},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant security tooling (scanners, vault CLIs) and an authorized scope for any active assessment. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fsupply-chain-attack-response","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill supply-chain-attack-response",{"tool":64,"command":65},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill supply-chain-attack-response",{"tool":67,"command":68},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill supply-chain-attack-response","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fsupply-chain-attack-response\u002FSKILL.md",true,[72],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fdetails.md","REFERENCE","参考文档",12198,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fsupply-chain-attack-response\u002Freferences\u002Fdetails.md",[79,100,124,149,177,201],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":90,"publishedAt":38},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[85],{"categoryNo":86,"categoryName":87,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[91,92,93,94,29,37,81,95,34,96,97,33,31,30,22,98,27,26,24,99],"ZeRO","trust","zero trust","architecture","segmentation","access","configure","critical","implementing",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":38},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[107,108,109,110,111,112,113,114,115,116,117,118,119,33,120,31,121,122,98,123],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":38},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[131,132,133,134,135,136,137,138,139,140,141,142,143,31,30,144,145,146,147,148],"transcript","youtube transcript","youtube","safe","github","codex","research","license","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":166,"publishedAt":38},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[155,158,161],{"categoryNo":156,"categoryName":157,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":159,"categoryName":160,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":162,"categoryName":163,"taxonomyType":164,"taxonomyTypeDesc":165},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[131,132,133,167,134,168,135,136,138,169,170,171,172,141,173,31,30,174,175,176],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":187,"publishedAt":38},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[183,186],{"categoryNo":184,"categoryName":185,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":159,"categoryName":160,"taxonomyType":88,"taxonomyTypeDesc":89},[133,188,189,111,134,190,191,192,193,138,171,194,195,196,197,30,198,144,199,200],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":208,"publishedAt":38},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[207],{"categoryNo":156,"categoryName":157,"taxonomyType":88,"taxonomyTypeDesc":89},[209,133,210,211,134,168,169,212,213,170,171,172,141,214,173,31,30,174,215,147],"youtube full","full","google","server","dlp","credits","automatic"]