본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)35k · #8027

implementing-devsecops-security-scanning

하는 일

이 도구는 코드와 애플리케이션의 보안 점검을 자동화하도록 돕습니다. 코드가 공개되기 전에 흔한 결함, 노출된 비밀 정보, 취약점을 찾습니다.

사용하는 경우

  • ✓프로젝트에 자동 보안 스캔을 설정할 때.
  • ✓코드를 출시하기 전에 보안 문제를 찾고 싶을 때.
  • ✓SOC 2나 PCI-DSS 같은 보안 규정을 준수해야 하는 경우.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 프로젝트에 자동 보안 스캔을 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Gitleaks, Semgrep, Trivy, OWASP ZAP 같은 도구를 사용해 코드와 애플리케이션의 문제를 분석합니다. 결과가 정리되어 제시되므로 문제를 고칠 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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'


…
자주 묻는 질문

SAST, DAST, SCA는 무엇인가요?

SAST(정적 애플리케이션 보안 테스트)는 코드를 실행하지 않고 검사합니다. DAST(동적 애플리케이션 보안 테스트)는 실행 중인 애플리케이션을 테스트합니다. SCA(소프트웨어 구성 분석)는 사용하는 라이브러리와 의존성을 검사합니다.

이 도구들은 비용을 내야 하나요?

언급된 도구(Semgrep, Trivy, OWASP ZAP, Gitleaks)는 대부분의 사용에서, 특히 기본 설정과 오픈 소스 규칙을 쓰면 무료입니다.

이것이 수동 보안 테스트를 대체하나요?

아니요, 이 자동 도구는 흔한 문제를 찾지만 보안 전문가가 하는 깊이 있는 분석을 대신하지는 않습니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
35k
순위
#8027
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬