[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AF3APCFBY6RS80KEZEGQ81":3,"skill-same:01M6AF3APCFBY6RS80KEZEGQ81":109},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":71,"repositoryHtmlUrl":72,"repositoryHomepageUrl":73,"ownerHtmlUrl":74,"ownerBlogUrl":75,"ownerDescription":76,"updatedAt":77,"install":78,"resources":91},"01M6AF3APCFBY6RS80KEZEGQ81","implementing-devsecops-security-scanning",null,"Integrates SAST, DAST, and SCA into CI\u002FCD pipelines using Semgrep for SAST, Trivy for SCA and container scanning, OWASP ZAP for DAST, and Gitleaks for secrets detection. Use when setting up automated security scanning in CI\u002FCD, shifting security left, meeting compliance mandates (SOC 2, PCI-DSS, ISO 27001), or gating deployments on critical vulnerabilities.","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36078,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"security","implementing devsecops security scanning","devsecops","t1078","gitleaks","owasp-zap","semgrep","SCA","trivy","shift-left","t1059","cybersecurity","detection","ci-cd","owasp","soc","compliance","ci","pr","vulnerabilities","2026-11-10 10:12:30",false,"---\nname: implementing-devsecops-security-scanning\ndescription: 'Integrates SAST, DAST, and SCA into CI\u002FCD pipelines using Semgrep for\n  SAST, Trivy for SCA and container scanning, OWASP ZAP for DAST, and Gitleaks for\n  secrets detection. Use when setting up automated security scanning in CI\u002FCD, shifting\n  security left, meeting compliance mandates (SOC 2, PCI-DSS, ISO 27001), or gating\n  deployments on critical vulnerabilities.\n\n  '\ndomain: cybersecurity\nsubdomain: application-security\ntags:\n- devsecops\n- SAST\n- DAST\n- SCA\n- semgrep\n- trivy\n- owasp-zap\n- gitleaks\n- CI-CD\n- shift-left\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- PR.PS-04\n- ID.RA-01\n- PR.DS-10\nmitre_attack:\n- T1078\n- T1190\n- T1059\n- T1610\n- T1611\n---\n\n# Implementing DevSecOps Security Scanning\n\n## When to Use\n\n- Setting up automated security scanning in a new or existing CI\u002FCD pipeline\n- Shifting security left by catching vulnerabilities before code reaches production\n- Meeting compliance requirements (SOC 2, PCI-DSS, ISO 27001) that mandate automated security testing\n- Integrating SAST, DAST, and SCA together to achieve comprehensive application security coverage\n- Establishing security gates that block deployments containing critical or high-severity vulnerabilities\n\n**Do not use** as a replacement for manual penetration testing. Automated scanning catches common vulnerability patterns but cannot replace human-driven security assessments for business logic flaws and complex attack chains.\n\n## Prerequisites\n\n- CI\u002FCD platform: GitHub Actions, GitLab CI, Jenkins, or Azure DevOps\n- Container runtime (Docker) for running scanning tools\n- A staging environment URL for DAST scanning (DAST cannot test static code)\n- Repository access with permissions to modify CI\u002FCD workflow files\n- Tool-specific requirements:\n  - Semgrep: free for open-source rulesets (`p\u002Fsecurity-audit`, `p\u002Fowasp-top-ten`)\n  - Trivy: free, no account required\n  - OWASP ZAP: free, Docker image available\n  - Gitleaks: free, no account required\n\n## Workflow\n\n### Step 1: Add Secrets Detection with Gitleaks\n\nSecrets detection runs first because leaked credentials are the highest-priority finding. Add to `.github\u002Fworkflows\u002Fsecurity.yml`:\n\n```yaml\nname: DevSecOps Security Pipeline\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main]\n\njobs:\n  secrets-scan:\n    name: Secrets Detection (Gitleaks)\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0  # Full history for scanning all commits\n\n      - name: Run Gitleaks\n        uses: gitleaks\u002Fgitleaks-action@v2\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nConfigure `.gitleaks.toml` in the repository root for custom rules and allowlists:\n\n```toml\n[extend]\nuseDefault = true\n\n[allowlist]\ndescription = \"Global allowlist\"\npaths = [\n  '''\\.gitleaks\\.toml''',\n  '''test\u002Ffixtures\u002F.*''',\n  '''docs\u002Fexamples\u002F.*'''\n]\n\n[[rules]]\nid = \"custom-internal-api-key\"\ndescription = \"Internal API key pattern\"\nregex = '''INTERNAL_KEY_[A-Za-z0-9]{32}'''\ntags = [\"internal\", \"api-key\"]\n```\n\n### Step 2: Add SAST Scanning with Semgrep\n\nSemgrep performs static code analysis to find security vulnerabilities, bugs, and code patterns:\n\n```yaml\n  sast-scan:\n    name: SAST (Semgrep)\n    runs-on: ubuntu-latest\n    container:\n      image: semgrep\u002Fsemgrep\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run Semgrep SAST scan\n        run: |\n          semgrep scan \\\n            --config p\u002Fsecurity-audit \\\n            --config p\u002Fowasp-top-ten \\\n            --config p\u002Fsecrets \\\n            --severity ERROR \\\n            --error \\\n            --json \\\n            --output semgrep-results.json \\\n            .\n\n      - name: Upload SAST results\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: semgrep-results\n          path: semgrep-results.json\n```\n\nFor custom rules, create `.semgrep\u002Fcustom-rules.yml`:\n\n```yaml\nrules:\n  - id: no-exec-user-input\n    patterns:\n      - pattern: exec($INPUT)\n      - pattern-not: exec(\"...\")\n    message: >\n      User input passed to exec(). This is a command injection vulnerability.\n    severity: ERROR\n    languages: [python]\n    metadata:\n      cwe: \"CWE-78: OS Command Injection\"\n      owasp: \"A03:2021 - Injection\"\n\n  - id: no-raw-sql-queries\n    patterns:\n      - pattern: cursor.execute(f\"...\")\n      - pattern: cursor.execute(\"...\" + ...)\n    message: >\n      SQL query built with string concatenation or f-strings. Use parameterized queries.\n    severity: ERROR\n    languages: [python]\n    metadata:\n      cwe: \"CWE-89: SQL Injection\"\n      owasp: \"A03:2021 - Injection\"\n```\n\n### Step 3: Add SCA Scanning with Trivy\n\nTrivy scans dependencies, container images, IaC files, and generates SBOM:\n\n```yaml\n  sca-scan:\n    name: SCA & Container Scan (Trivy)\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run Trivy filesystem scan (dependencies)\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          scan-type: 'fs'\n          scan-ref: '.'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          format: 'json'\n          output: 'trivy-fs-results.json'\n\n      - name: Run Trivy IaC scan (Terraform, CloudFormation)\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          scan-type: 'config'\n          scan-ref: '.'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          format: 'json'\n          output: 'trivy-iac-results.json'\n\n      - name: Upload SCA results\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: trivy-results\n          path: trivy-*.json\n\n  container-scan:\n    name: Container Image Scan (Trivy)\n    runs-on: ubuntu-latest\n    needs: [sast-scan]  # Build image only after SAST passes\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Build Docker image\n        run: docker build -t app:${{ github.sha }} .\n\n      - name: Scan container image\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          image-ref: 'app:${{ github.sha }}'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          format: 'json'\n          output: 'trivy-image-results.json'\n\n      - name: Generate SBOM\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          image-ref: 'app:${{ github.sha }}'\n          format: 'cyclonedx'\n          output: 'sbom.json'\n\n      - name: Upload SBOM\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: sbom\n          path: sbom.json\n```\n\n### Step 4: Add DAST Scanning with OWASP ZAP\n\nDAST runs against a deployed staging environment. It is slower than SAST\u002FSCA and should run asynchronously or on a schedule:\n\n```yaml\n  dast-scan:\n    name: DAST (OWASP ZAP)\n    runs-on: ubuntu-latest\n    needs: [deploy-staging]  # Must run after app is deployed to staging\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run ZAP Baseline Scan (fast, suitable for CI)\n        uses: zaproxy\u002Faction-baseline@v0.14.0\n        with:\n          target: ${{ vars.STAGING_URL }}\n          rules_file_name: '.zap\u002Frules.tsv'\n          cmd_options: '-a -j'\n\n      # For nightly full scans, use action-full-scan instead:\n      # - name: Run ZAP Full Scan (comprehensive, 30-60 min)\n      #   uses: zaproxy\u002Faction-full-scan@v0.12.0\n      #   with:\n      #     target: ${{ vars.STAGING_URL }}\n```\n\nCreate `.zap\u002Frules.tsv` to configure alert thresholds:\n\n```tsv\n10010\tIGNORE\t(Cookie No HttpOnly Flag - acceptable for non-sensitive cookies)\n10011\tIGNORE\t(Cookie Without Secure Flag - staging uses HTTP)\n90033\tWARN\t(Loosely Scoped Cookie)\n10038\tFAIL\t(Content Security Policy Header Not Set)\n40012\tFAIL\t(Cross Site Scripting - Reflected)\n40014\tFAIL\t(Cross Site Scripting - Persistent)\n40018\tFAIL\t(SQL Injection)\n90019\tFAIL\t(Server Side Code Injection)\n90020\tFAIL\t(Remote OS Command Injection)\n```\n\n### Step 5: Aggregate Results and Enforce Security Gates\n\nCreate a summary job that aggregates all scan results and enforces pass\u002Ffail gates:\n\n```yaml\n  security-gate:\n    name: Security Gate\n    runs-on: ubuntu-latest\n    needs: [secrets-scan, sast-scan, sca-scan, container-scan]\n    if: always()\n    steps:\n      - name: Check scan results\n        run: |\n          echo \"Checking security scan results...\"\n\n          # Fail the pipeline if any upstream job failed\n          if [[ \"${{ needs.secrets-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: Secrets detected in repository\"\n            exit 1\n          fi\n\n          if [[ \"${{ needs.sast-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: SAST found critical\u002Fhigh vulnerabilities\"\n            exit 1\n          fi\n\n          if [[ \"${{ needs.sca-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: SCA found critical\u002Fhigh vulnerable dependencies\"\n            exit 1\n          fi\n\n          if [[ \"${{ needs.container-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: Container image has critical\u002Fhigh vulnerabilities\"\n            exit 1\n          fi\n\n          echo \"All security gates passed\"\n```\n\n### Step 6: Configure Branch Protection Rules\n\nEnforce the security pipeline as a required status check:\n\n```\nGitHub Repository > Settings > Branches > Branch Protection Rules\n\nBranch name pattern: main\n  Require status checks to pass before merging: Enabled\n    Required status checks:\n      - Secrets Detection (Gitleaks)\n      - SAST (Semgrep)\n      - SCA & Container Scan (Trivy)\n      - Security Gate\n  Require branches to be up to date before merging: Enabled\n```\n\n### Step 7: Set Up Developer Feedback Loop\n\nConfigure pre-commit hooks so developers catch issues before pushing:\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\n    rev: v8.22.1\n    hooks:\n      - id: gitleaks\n\n  - repo: https:\u002F\u002Fgithub.com\u002Fsemgrep\u002Fsemgrep\n    rev: v1.102.0\n    hooks:\n      - id: semgrep\n        args: ['--config', 'p\u002Fsecurity-audit', '--config', 'p\u002Fowasp-top-ten', '--error']\n```\n\nInstall and activate pre-commit:\n\n```bash\npip install pre-commit\npre-commit install\npre-commit run --all-files  # Test against existing codebase\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **SAST (Static Application Security Testing)** | Analyzes source code without executing it to find security vulnerabilities; runs fast, catches issues early, but cannot find runtime flaws |\n| **DAST (Dynamic Application Security Testing)** | Tests a running application by sending requests and analyzing responses; finds runtime issues but requires a deployed environment |\n| **SCA (Software Composition Analysis)** | Scans project dependencies against vulnerability databases (NVD, GitHub Advisory) to find known-vulnerable libraries |\n| **SBOM (Software Bill of Materials)** | Machine-readable inventory of all components and dependencies in an application, used for vulnerability tracking and compliance |\n| **Shift Left** | Security practice of moving security testing earlier in the SDLC, from post-deployment to pre-commit and CI stages |\n| **Security Gate** | A CI\u002FCD pipeline checkpoint that blocks deployment if security scan results exceed defined severity thresholds |\n| **Pre-commit Hook** | Local Git hook that runs security checks before code is committed, providing the fastest developer feedback loop |\n\n## Verification\n\n- [ ] Gitleaks blocks commits and PRs containing hardcoded secrets (test with a dummy API key)\n- [ ] Semgrep scan runs on every PR and reports findings as annotations or comments\n- [ ] Trivy filesystem scan detects a known-vulnerable dependency (test by adding a vulnerable package)\n- [ ] Trivy container scan runs successfully against the built Docker image\n- [ ] SBOM is generated and stored as a build artifact in CycloneDX or SPDX format\n- [ ] OWASP ZAP baseline scan runs against the staging URL without crashing\n- [ ] Security gate job blocks merges to main when any scan finds critical\u002Fhigh severity issues\n- [ ] Branch protection rules enforce required status checks before merge\n- [ ] Pre-commit hooks catch secrets and SAST findings locally before push\n- [ ] Developer documentation explains how to interpret scan results and fix common findings\n","# Implementing DevSecOps Security Scanning\n\n## When to Use\n\n- Setting up automated security scanning in a new or existing CI\u002FCD pipeline\n- Shifting security left by catching vulnerabilities before code reaches production\n- Meeting compliance requirements (SOC 2, PCI-DSS, ISO 27001) that mandate automated security testing\n- Integrating SAST, DAST, and SCA together to achieve comprehensive application security coverage\n- Establishing security gates that block deployments containing critical or high-severity vulnerabilities\n\n**Do not use** as a replacement for manual penetration testing. Automated scanning catches common vulnerability patterns but cannot replace human-driven security assessments for business logic flaws and complex attack chains.\n\n## Prerequisites\n\n- CI\u002FCD platform: GitHub Actions, GitLab CI, Jenkins, or Azure DevOps\n- Container runtime (Docker) for running scanning tools\n- A staging environment URL for DAST scanning (DAST cannot test static code)\n- Repository access with permissions to modify CI\u002FCD workflow files\n- Tool-specific requirements:\n  - Semgrep: free for open-source rulesets (`p\u002Fsecurity-audit`, `p\u002Fowasp-top-ten`)\n  - Trivy: free, no account required\n  - OWASP ZAP: free, Docker image available\n  - Gitleaks: free, no account required\n\n## Workflow\n\n### Step 1: Add Secrets Detection with Gitleaks\n\nSecrets detection runs first because leaked credentials are the highest-priority finding. Add to `.github\u002Fworkflows\u002Fsecurity.yml`:\n\n```yaml\nname: DevSecOps Security Pipeline\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main]\n\njobs:\n  secrets-scan:\n    name: Secrets Detection (Gitleaks)\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0  # Full history for scanning all commits\n\n      - name: Run Gitleaks\n        uses: gitleaks\u002Fgitleaks-action@v2\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nConfigure `.gitleaks.toml` in the repository root for custom rules and allowlists:\n\n```toml\n[extend]\nuseDefault = true\n\n[allowlist]\ndescription = \"Global allowlist\"\npaths = [\n  '''\\.gitleaks\\.toml''',\n  '''test\u002Ffixtures\u002F.*''',\n  '''docs\u002Fexamples\u002F.*'''\n]\n\n[[rules]]\nid = \"custom-internal-api-key\"\ndescription = \"Internal API key pattern\"\nregex = '''INTERNAL_KEY_[A-Za-z0-9]{32}'''\ntags = [\"internal\", \"api-key\"]\n```\n\n### Step 2: Add SAST Scanning with Semgrep\n\nSemgrep performs static code analysis to find security vulnerabilities, bugs, and code patterns:\n\n```yaml\n  sast-scan:\n    name: SAST (Semgrep)\n    runs-on: ubuntu-latest\n    container:\n      image: semgrep\u002Fsemgrep\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run Semgrep SAST scan\n        run: |\n          semgrep scan \\\n            --config p\u002Fsecurity-audit \\\n            --config p\u002Fowasp-top-ten \\\n            --config p\u002Fsecrets \\\n            --severity ERROR \\\n            --error \\\n            --json \\\n            --output semgrep-results.json \\\n            .\n\n      - name: Upload SAST results\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: semgrep-results\n          path: semgrep-results.json\n```\n\nFor custom rules, create `.semgrep\u002Fcustom-rules.yml`:\n\n```yaml\nrules:\n  - id: no-exec-user-input\n    patterns:\n      - pattern: exec($INPUT)\n      - pattern-not: exec(\"...\")\n    message: >\n      User input passed to exec(). This is a command injection vulnerability.\n    severity: ERROR\n    languages: [python]\n    metadata:\n      cwe: \"CWE-78: OS Command Injection\"\n      owasp: \"A03:2021 - Injection\"\n\n  - id: no-raw-sql-queries\n    patterns:\n      - pattern: cursor.execute(f\"...\")\n      - pattern: cursor.execute(\"...\" + ...)\n    message: >\n      SQL query built with string concatenation or f-strings. Use parameterized queries.\n    severity: ERROR\n    languages: [python]\n    metadata:\n      cwe: \"CWE-89: SQL Injection\"\n      owasp: \"A03:2021 - Injection\"\n```\n\n### Step 3: Add SCA Scanning with Trivy\n\nTrivy scans dependencies, container images, IaC files, and generates SBOM:\n\n```yaml\n  sca-scan:\n    name: SCA & Container Scan (Trivy)\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run Trivy filesystem scan (dependencies)\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          scan-type: 'fs'\n          scan-ref: '.'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          format: 'json'\n          output: 'trivy-fs-results.json'\n\n      - name: Run Trivy IaC scan (Terraform, CloudFormation)\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          scan-type: 'config'\n          scan-ref: '.'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          format: 'json'\n          output: 'trivy-iac-results.json'\n\n      - name: Upload SCA results\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: trivy-results\n          path: trivy-*.json\n\n  container-scan:\n    name: Container Image Scan (Trivy)\n    runs-on: ubuntu-latest\n    needs: [sast-scan]  # Build image only after SAST passes\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Build Docker image\n        run: docker build -t app:${{ github.sha }} .\n\n      - name: Scan container image\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          image-ref: 'app:${{ github.sha }}'\n          severity: 'CRITICAL,HIGH'\n          exit-code: '1'\n          format: 'json'\n          output: 'trivy-image-results.json'\n\n      - name: Generate SBOM\n        uses: aquasecurity\u002Ftrivy-action@0.28.0\n        with:\n          image-ref: 'app:${{ github.sha }}'\n          format: 'cyclonedx'\n          output: 'sbom.json'\n\n      - name: Upload SBOM\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: sbom\n          path: sbom.json\n```\n\n### Step 4: Add DAST Scanning with OWASP ZAP\n\nDAST runs against a deployed staging environment. It is slower than SAST\u002FSCA and should run asynchronously or on a schedule:\n\n```yaml\n  dast-scan:\n    name: DAST (OWASP ZAP)\n    runs-on: ubuntu-latest\n    needs: [deploy-staging]  # Must run after app is deployed to staging\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run ZAP Baseline Scan (fast, suitable for CI)\n        uses: zaproxy\u002Faction-baseline@v0.14.0\n        with:\n          target: ${{ vars.STAGING_URL }}\n          rules_file_name: '.zap\u002Frules.tsv'\n          cmd_options: '-a -j'\n\n      # For nightly full scans, use action-full-scan instead:\n      # - name: Run ZAP Full Scan (comprehensive, 30-60 min)\n      #   uses: zaproxy\u002Faction-full-scan@v0.12.0\n      #   with:\n      #     target: ${{ vars.STAGING_URL }}\n```\n\nCreate `.zap\u002Frules.tsv` to configure alert thresholds:\n\n```tsv\n10010\tIGNORE\t(Cookie No HttpOnly Flag - acceptable for non-sensitive cookies)\n10011\tIGNORE\t(Cookie Without Secure Flag - staging uses HTTP)\n90033\tWARN\t(Loosely Scoped Cookie)\n10038\tFAIL\t(Content Security Policy Header Not Set)\n40012\tFAIL\t(Cross Site Scripting - Reflected)\n40014\tFAIL\t(Cross Site Scripting - Persistent)\n40018\tFAIL\t(SQL Injection)\n90019\tFAIL\t(Server Side Code Injection)\n90020\tFAIL\t(Remote OS Command Injection)\n```\n\n### Step 5: Aggregate Results and Enforce Security Gates\n\nCreate a summary job that aggregates all scan results and enforces pass\u002Ffail gates:\n\n```yaml\n  security-gate:\n    name: Security Gate\n    runs-on: ubuntu-latest\n    needs: [secrets-scan, sast-scan, sca-scan, container-scan]\n    if: always()\n    steps:\n      - name: Check scan results\n        run: |\n          echo \"Checking security scan results...\"\n\n          # Fail the pipeline if any upstream job failed\n          if [[ \"${{ needs.secrets-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: Secrets detected in repository\"\n            exit 1\n          fi\n\n          if [[ \"${{ needs.sast-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: SAST found critical\u002Fhigh vulnerabilities\"\n            exit 1\n          fi\n\n          if [[ \"${{ needs.sca-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: SCA found critical\u002Fhigh vulnerable dependencies\"\n            exit 1\n          fi\n\n          if [[ \"${{ needs.container-scan.result }}\" == \"failure\" ]]; then\n            echo \"BLOCKED: Container image has critical\u002Fhigh vulnerabilities\"\n            exit 1\n          fi\n\n          echo \"All security gates passed\"\n```\n\n### Step 6: Configure Branch Protection Rules\n\nEnforce the security pipeline as a required status check:\n\n```\nGitHub Repository > Settings > Branches > Branch Protection Rules\n\nBranch name pattern: main\n  Require status checks to pass before merging: Enabled\n    Required status checks:\n      - Secrets Detection (Gitleaks)\n      - SAST (Semgrep)\n      - SCA & Container Scan (Trivy)\n      - Security Gate\n  Require branches to be up to date before merging: Enabled\n```\n\n### Step 7: Set Up Developer Feedback Loop\n\nConfigure pre-commit hooks so developers catch issues before pushing:\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: https:\u002F\u002Fgithub.com\u002Fgitleaks\u002Fgitleaks\n    rev: v8.22.1\n    hooks:\n      - id: gitleaks\n\n  - repo: https:\u002F\u002Fgithub.com\u002Fsemgrep\u002Fsemgrep\n    rev: v1.102.0\n    hooks:\n      - id: semgrep\n        args: ['--config', 'p\u002Fsecurity-audit', '--config', 'p\u002Fowasp-top-ten', '--error']\n```\n\nInstall and activate pre-commit:\n\n```bash\npip install pre-commit\npre-commit install\npre-commit run --all-files  # Test against existing codebase\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **SAST (Static Application Security Testing)** | Analyzes source code without executing it to find security vulnerabilities; runs fast, catches issues early, but cannot find runtime flaws |\n| **DAST (Dynamic Application Security Testing)** | Tests a running application by sending requests and analyzing responses; finds runtime issues but requires a deployed environment |\n| **SCA (Software Composition Analysis)** | Scans project dependencies against vulnerability databases (NVD, GitHub Advisory) to find known-vulnerable libraries |\n| **SBOM (Software Bill of Materials)** | Machine-readable inventory of all components and dependencies in an application, used for vulnerability tracking and compliance |\n| **Shift Left** | Security practice of moving security testing earlier in the SDLC, from post-deployment to pre-commit and CI stages |\n| **Security Gate** | A CI\u002FCD pipeline checkpoint that blocks deployment if security scan results exceed defined severity thresholds |\n| **Pre-commit Hook** | Local Git hook that runs security checks before code is committed, providing the fastest developer feedback loop |\n\n## Verification\n\n- [ ] Gitleaks blocks commits and PRs containing hardcoded secrets (test with a dummy API key)\n- [ ] Semgrep scan runs on every PR and reports findings as annotations or comments\n- [ ] Trivy filesystem scan detects a known-vulnerable dependency (test by adding a vulnerable package)\n- [ ] Trivy container scan runs successfully against the built Docker image\n- [ ] SBOM is generated and stored as a build artifact in CycloneDX or SPDX format\n- [ ] OWASP ZAP baseline scan runs against the staging URL without crashing\n- [ ] Security gate job blocks merges to main when any scan finds critical\u002Fhigh severity issues\n- [ ] Branch protection rules enforce required status checks before merge\n- [ ] Pre-commit hooks catch secrets and SAST findings locally before push\n- [ ] Developer documentation explains how to interpret scan results and fix common findings\n",{"name":5,"tags":49,"author":53,"domain":35,"license":15,"version":54,"nist_csf":55,"subdomain":60,"description":61,"mitre_attack":62},[26,50,51,31,30,32,29,28,52,33],"SAST","DAST","CI-CD","mahipal","1.0.0",[56,57,58,59],"PR.PS-01","PR.PS-04","ID.RA-01","PR.DS-10","application-security","Integrates SAST, DAST, and SCA into CI\u002FCD pipelines using Semgrep for SAST, Trivy for SCA and container scanning, OWASP ZAP for DAST, and Gitleaks for secrets detection. Use when setting up automated security scanning in CI\u002FCD, shifting security left, meeting compliance mandates (SOC 2, PCI-DSS, ISO 27001), or gating deployments on critical vulnerabilities.\n",[63,64,65,66,67],"T1078","T1190","T1059","T1610","T1611","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fimplementing-devsecops-security-scanning",4414,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":8,"skillName":5,"commands":79,"prompt":89,"zipAvailable":90},[80,83,86],{"tool":81,"command":82},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill implementing-devsecops-security-scanning",{"tool":84,"command":85},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill implementing-devsecops-security-scanning",{"tool":87,"command":88},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill implementing-devsecops-security-scanning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002FSKILL.md",true,[92,97,103],{"path":93,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002FLICENSE",{"path":98,"resourceType":99,"resourceTypeDesc":100,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fapi-reference.md","REFERENCE","参考文档",2039,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002Freferences\u002Fapi-reference.md",{"path":104,"resourceType":105,"resourceTypeDesc":106,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002Fagent.py","SCRIPT","脚本",6930,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002Fscripts\u002Fagent.py",[110,134,158,183,209,235],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":117,"publishedAt":44},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[116],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[118,119,120,121,24,35,122,123,42,124,125,41,126,127,128,129,130,131,132,133],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","incident response","identity","code","artifacts","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":141,"publishedAt":44},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[140],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[142,130,143,144,24,145,35,42,146,147,148,149,150,151,152,153,154,155,156,157],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":168,"publishedAt":44},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[164,167],{"categoryNo":165,"categoryName":166,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[152,169,170,171,172,35,173,174,146,40,175,176,177,178,36,27,179,180,181,182],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","hash-verification","incident-response","ransomware","cryptocurrency","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":190,"publishedAt":44},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[189],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[191,192,193,35,194,195,196,197,198,199,200,201,202,203,204,205,149,206,207,208],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":210,"name":211,"nameZh":6,"description":212,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":213,"categories":214,"keywords":216,"publishedAt":44},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[215],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[43,217,218,35,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234],"framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":236,"name":237,"nameZh":6,"description":238,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":239,"categories":240,"keywords":242,"publishedAt":44},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[241],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[24,243,35,244,245,246,39,247,248,249,250,27,251,179,252,253,254,255,256,257],"triaging security incident","siem","file","ioc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]