Communitygithub.com

보안 스캔

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

보안 스캔란 무엇인가요?

이 스킬은 Claude Code 프로젝트의 .claude/ 구성을 보안 관점에서 자동으로 감사합니다. AgentShield 도구를 기반으로 하여 CLAUDE.md, settings.json, MCP 서버 설정, 훅, 에이전트 정의 파일에서 하드코딩된 시크릿, 명령 주입, 프롬프트 인젝션, 과도한 권한 부여 등 다양한 보안 위협을 탐지합니다. 개발자는 터미널, CI/CD 파이프라인, GitHub Action 등 여러 환경에서 사용할 수 있으며, JSON, Markdown, HTML 등 다양한 형식으로 결과를 출력할 수 있습니다. 또한 자동 수정 기능과 고급 분석을 위한 Opus 4.6 딥 분석 파이프라인을 제공하여 보안 설정을 강화하고 잠재적 위험을 사전에 차단할 수 있습니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/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

# Markdown — 문서화용
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. 공격자 (레드 팀) — 공격 벡터 탐색
  2. 방어자 (블루 팀) — 강화 조치 권장
  3. 감사자 (최종 판결) — 두 관점 종합

보안 구성 초기화

처음부터 새 보안 .claude/ 구성을 스캐폴딩:

npx ecc-agentshield init

생성:

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

GitHub Action

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} 보간법을 통한 훅의 명령 주입
  • 셸을 실행하는 MCP 서버

높음 (프로덕션 전 수정)

  • CLAUDE.md의 자동 실행 명령어 (프롬프트 인젝션 벡터)
  • 권한의 누락된 차단 목록
  • 불필요한 Bash 접근 권한이 있는 에이전트

중간 (권장 사항)

  • 훅의 무음 오류 억제 (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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

관련 스킬