[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73CKNDZ3B3G1B8BBAT9AWHT":3,"skill-same:01M73CKNDZ3B3G1B8BBAT9AWHT":95},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M73CKNDZ3B3G1B8BBAT9AWHT","implementing-devsecops-security-scanning",null,"Integrates Static Application Security Testing (SAST), Dynamic Application Security Testing (DAST), and Software Composition Analysis (SCA) into CI\u002FCD pipelines using open-source tools. Covers Semgrep for SAST, Trivy for SCA and container scanning, OWASP ZAP for DAST, and Gitleaks for secrets detection. Activates for requests involving DevSecOps pipeline setup, automated security scanning in CI\u002FCD, SAST\u002FDAST\u002FSCA integration, or shift-left security implementation.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: implementing-devsecops-security-scanning\ndescription: 'Integrates Static Application Security Testing (SAST), Dynamic Application\n  Security Testing (DAST), and Software Composition Analysis (SCA) into CI\u002FCD pipelines\n  using open-source tools. Covers Semgrep for SAST, Trivy for SCA and container scanning,\n  OWASP ZAP for DAST, and Gitleaks for secrets detection. Activates for requests involving\n  DevSecOps pipeline setup, automated security scanning in CI\u002FCD, SAST\u002FDAST\u002FSCA integration,\n  or shift-left security implementation.\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\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\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,"note":25,"tags":26,"author":37,"domain":38,"source":39,"license":15,"version":40,"nist_csf":41,"subdomain":46,"description":47,"mitre_attack":48,"source_commit":54},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31,32,33,34,35,36],"devsecops","SAST","DAST","SCA","semgrep","trivy","owasp-zap","gitleaks","CI-CD","shift-left","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0.0",[42,43,44,45],"PR.PS-01","PR.PS-04","ID.RA-01","PR.DS-10","application-security","Integrates Static Application Security Testing (SAST), Dynamic Application Security Testing (DAST), and Software Composition Analysis (SCA) into CI\u002FCD pipelines using open-source tools. Covers Semgrep for SAST, Trivy for SCA and container scanning, OWASP ZAP for DAST, and Gitleaks for secrets detection. Activates for requests involving DevSecOps pipeline setup, automated security scanning in CI\u002FCD, SAST\u002FDAST\u002FSCA integration, or shift-left security implementation.\n",[49,50,51,52,53],"T1078","T1190","T1059","T1610","T1611","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fimplementing-devsecops-security-scanning",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill implementing-devsecops-security-scanning",{"tool":71,"command":72},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill implementing-devsecops-security-scanning",{"tool":74,"command":75},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill implementing-devsecops-security-scanning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002FSKILL.md",true,[79,83,89],{"path":80,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fapi-reference.md","REFERENCE","参考文档",2039,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002Freferences\u002Fapi-reference.md",{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fagent.py","SCRIPT","脚本",6930,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fimplementing-devsecops-security-scanning\u002Fscripts\u002Fagent.py",[96,104,111,119,127,135],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":136,"name":137,"nameZh":6,"description":6,"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":140,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]