Skip to content
Skillpedia
Deploy & cloud (DevOps)35k · #5864

implementing-devsecops-security-scanning

Has your agent automatically integrate security checks into the development process, finding flaws before code is released.

What it does

This tool helps automate the security checking of your code and applications. It looks for common flaws, leaked secrets, and vulnerabilities before the code goes live.

When to use it

  • ✓When setting up automatic security scanning for a project.
  • ✓To find security issues before releasing code.
  • ✓To meet security regulations like SOC 2 or PCI-DSS.

Example of what to ask your AI

“Set up automatic security scanning for my project.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-devsecops-security-scanning/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-devsecops-security-scanning/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It uses tools like Gitleaks, Semgrep, Trivy, and OWASP ZAP to analyze your code and applications for problems. The results are presented so you can fix them.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-devsecops-security-scanning

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/implementing-devsecops-security-scanning/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Implementing DevSecOps Security Scanning

When to Use

  • Setting up automated security scanning in a new or existing CI/CD pipeline
  • Shifting security left by catching vulnerabilities before code reaches production
  • Meeting compliance requirements (SOC 2, PCI-DSS, ISO 27001) that mandate automated security testing
  • Integrating SAST, DAST, and SCA together to achieve comprehensive application security coverage
  • Establishing security gates that block deployments containing critical or high-severity vulnerabilities

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.

Prerequisites

  • CI/CD platform: GitHub Actions, GitLab CI, Jenkins, or Azure DevOps
  • Container runtime (Docker) for running scanning tools
  • A staging environment URL for DAST scanning (DAST cannot test static code)
  • Repository access with permissions to modify CI/CD workflow files
  • Tool-specific requirements:
    • Semgrep: free for open-source rulesets (p/security-audit, p/owasp-top-ten)
    • Trivy: free, no account required
    • OWASP ZAP: free, Docker image available
    • Gitleaks: free, no account required

Workflow

Step 1: Add Secrets Detection with Gitleaks

Secrets detection runs first because leaked credentials are the highest-priority finding. Add to .github/workflows/security.yml:

name: DevSecOps Security Pipeline
on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  secrets-scan:
    name: Secrets Detection (Gitleaks)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Full history for scanning all commits

      - name: Run Gitleaks
        uses: gitleaks/gitleaks-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Configure .gitleaks.toml in the repository root for custom rules and allowlists:

[extend]
useDefault = true

[allowlist]
description = "Global allowlist"
paths = [
  '''\.gitleaks\.toml''',
  '''test/fixtures/.*''',
  '''docs/examples/.*'''
]

[[rules]]
id = "custom-internal-api-key"
description = "Internal API key pattern"
regex = '''INTERNAL_KEY_[A-Za-z0-9]{32}'''
tags = ["internal", "api-key"]

Step 2: Add SAST Scanning with Semgrep

Semgrep performs static code analysis to find security vulnerabilities, bugs, and code patterns:

  sast-scan:
    name: SAST (Semgrep)
    runs-on: ubuntu-latest
    container:
      image: semgrep/semgrep
    steps:
      - uses: actions/checkout@v4

      - name: Run Semgrep SAST scan
        run: |
          semgrep scan \
            --config p/security-audit \
            --config p/owasp-top-ten \
            --config p/secrets \
            --severity ERROR \
            --error \
            --json \
            --output semgrep-results.json \
            .

      - name: Upload SAST results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: semgrep-results
          path: semgrep-results.json

For custom rules, create .semgrep/custom-rules.yml:

rules:
  - id: no-exec-user-input
    patterns:
      - pattern: exec($INPUT)
      - pattern-not: exec("...")
    message: >
      User input passed to exec(). This is a command injection vulnerability.
    severity: ERROR
    languages: [python]
    metadata:
      cwe: "CWE-78: OS Command Injection"
      owasp: "A03:2021 - Injection"

  - id: no-raw-sql-queries
    patterns:
      - pattern: cursor.execute(f"...")
      - pattern: cursor.execute("..." + ...)
    message: >
      SQL query built with string concatenation or f-strings. Use parameterized queries.
    severity: ERROR
    languages: [python]
    metadata:
      cwe: "CWE-89: SQL Injection"
      owasp: "A03:2021 - Injection"

Step 3: Add SCA Scanning with Trivy

Trivy scans dependencies, container images, IaC files, and generates SBOM:

  sca-scan:
    name: SCA & Container Scan (Trivy)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run Trivy filesystem scan (dependencies)
        uses: aquasecurity/trivy-action@0.28.0
        with:
          scan-type: 'fs'
          scan-ref: '.'
          severity: 'CRITICAL,HIGH'
          exit-code: '1'
          format: 'json'
          output: 'trivy-fs-results.json'


…
FAQ

What are SAST, DAST, and SCA?

SAST (Static Application Security Testing) checks code without running it. DAST (Dynamic Application Security Testing) tests the running application. SCA (Software Composition Analysis) checks the libraries and dependencies you use.

Do I need to pay for these tools?

The tools mentioned (Semgrep, Trivy, OWASP ZAP, Gitleaks) are free for most uses, especially with default settings and open-source rules.

Does this replace manual security testing?

No, this automated tool finds common issues but doesn't replace the in-depth analysis done by security experts.

Details

Original description by the author

Integrates SAST, DAST, and SCA into CI/CD 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/CD, shifting security left, meeting compliance mandates (SOC 2, PCI-DSS, ISO 27001), or gating deployments on critical vulnerabilities. '

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5864
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills