Communitygithub.com

security-scan

AgentShield를 사용하여 Claude Code 설정(.claude/ 디렉토리)의 보안 취약점, 잘못된 구성, 주입 위험을 검사합니다. CLAUDE.md, settings.json, MCP 서버, 훅, 에이전트 정의를 감사할 때 사용하세요.

security-scan란 무엇인가요?

이 스킬은 Claude Code 프로젝트의 `.claude/` 디렉토리 전체를 대상으로 보안 감사를 수행하는 AgentShield 도구를 통합합니다. 개발자와 AI 에이전트 사용자는 CLAUDE.md 파일 내 하드코딩된 시크릿이나 프롬프트 주입 패턴, settings.json의 과도한 권한 설정, MCP 서버 설정의 공급망 위험, hooks의 명령 주입 취약점, agent 정의 파일의 제한 없는 도구 접근 등을 한 번에 검사할 수 있습니다. 핵심 기능으로 기본 스캔, 자동 수정(--fix), Opus 4.6 기반 심층 분석(--opus), GitHub Actions CI 통합을 지원하며, 결과는 A-F 등급과 심각도(치명적/높음/중간/정보)로 명확하게 보고됩니다. 이 스킬을 사용하면 프로젝트 설정 단계, 변경 사항 커밋 전, 기존 저장소 온보딩 시점 등에서 Claude Code 설정의 보안 상태를 지속적으로 점검하고 개선할 수 있습니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/security-scan

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

보안 검사 스킬

AgentShield를 사용하여 Claude Code 설정의 보안 문제를 감사합니다.

활성화 시점

  • 새 Claude Code 프로젝트 설정 시
  • .claude/settings.json, CLAUDE.md 또는 MCP 구성을 수정한 후
  • 구성 변경 사항을 커밋하기 전
  • 기존 Claude Code 구성이 있는 새 저장소에 온보딩할 때
  • 정기적인 보안 위생 검사

검사 항목

파일검사 내용
CLAUDE.md하드코딩된 시크릿, 자동 실행 지시, 프롬프트 주입 패턴
settings.json지나치게 허용적인 허용 목록, 누락된 거부 목록, 위험한 우회 플래그
mcp.json위험한 MCP 서버, 하드코드된 환경 시크릿, npx 공급망 위험
hooks/보간을 통한 명령 주입, 데이터 유출, 자동 오류 무시
agents/*.md제한 없는 도구 접근, 프롬프트 주입 표면, 누락된 모델 사양

전제 조건

AgentShield가 설치되어 있어야 합니다. 필요 시 확인 및 설치:

# 설치 확인
npx ecc-agentshield --version

# 전역 설치 (권장)
npm install -g ecc-agentshield

# 또는 npx로 직접 실행 (설치 불필요)
npx ecc-agentshield scan .

사용법

기본 검사

현재 프로젝트의 .claude/ 디렉토리에 대해 실행:

# 현재 프로젝트 검사
npx ecc-agentshield scan

# 특정 경로 검사
npx ecc-agentshield scan --path /path/to/.claude

# 최소 심각도 필터로 검사
npx ecc-agentshield scan --min-severity medium

출력 형식

# 터미널 출력 (기본) — 등급과 함께 색상화된 보고서
npx ecc-agentshield scan

# JSON — CI/CD 통합용
npx ecc-agentshield scan --format json

# 마크다운 — 문서화용
npx ecc-agentshield scan --format markdown

# HTML — 독립형 다크 테마 보고서
npx ecc-agentshield scan --format html > security-report.html

자동 수정

안전한 수정을 자동으로 적용합니다 (자동 수정 가능으로 표시된 항목만):

npx ecc-agentshield scan --fix

다음을 수행합니다:

  • 하드코딩된 시크릿을 환경 변수 참조로 대체
  • 와일드카드 권한을 범위가 지정된 대안으로 강화
  • 수동 전용 제안은 절대 수정하지 않음

Opus 4.6 심층 분석

적대적 3-에이전트 파이프라인을 실행하여 심층 분석:

# ANTHROPIC_API_KEY 필요
export ANTHROPIC_API_KEY=your-key
npx ecc-agentshield scan --opus --stream

다음을 실행합니다:

  1. 공격자 (Red Team) — 공격 벡터 발견
  2. 방어자 (Blue Team) — 강화 방법 권장
  3. 감사자 (최종 평결) — 두 관점 종합

안전한 구성 초기화

처음부터 새로운 안전한 .claude/ 구성을 자동 생성:

npx ecc-agentshield init

생성:

  • 범위가 지정된 권한과 거부 목록이 포함된 settings.json
  • 보안 모범 사례가 포함된 CLAUDE.md
  • mcp.json 플레이스홀더

GitHub 액션

CI 파이프라인에 추가:

- uses: affaan-m/agentshield@v1
  with:
    path: '.'
    min-severity: 'medium'
    fail-on-findings: true

심각도 수준

등급점수의미
A90-100안전한 구성
B75-89사소한 문제
C60-74주의 필요
D40-59상당한 위험
F0-39치명적 취약점

결과 해석

치명적 발견 (즉시 수정)

  • 구성 파일에 하드코딩된 API 키 또는 토큰
  • 허용 목록의 Bash(*) (제한 없는 셸 접근)
  • ${file} 보간을 통한 hooks의 명령 주입
  • 셸을 실행하는 MCP 서버

높음 발견 (프로덕션 전 수정)

  • CLAUDE.md의 자동 실행 지시 (프롬프트 주입 벡터)
  • 권한에서 누락된 거부 목록
  • 불필요한 Bash 접근 권한이 있는 에이전트

중간 발견 (권장 사항)

  • Hooks에서 자동 오류 무시 (2>/dev/null, || true)
  • 누락된 PreToolUse 보안 훅
  • MCP 서버 구성의 npx -y 자동 설치

정보 발견 (인지)

  • MCP 서버에 대한 설명 누락
  • 금지 지시가 올바르게 모범 사례로 플래그 지정됨

링크

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

관련 스킬