Communitygithub.com

YepAPI/skills — 의존성 보안

의존성 보안 — npm 감사, 잠금 파일 검증, 공급망 공격 방지.

skills — 의존성 보안란 무엇인가요?

이 기술은 Node.js 프로젝트의 의존성 보안을 강화하기 위한 규칙과 도구 모음을 제공합니다. 개발자는 CI 파이프라인에서 `npm audit`과 `lockfile-lint`를 사용해 고위험 취약점을 자동으로 차단하고, 모든 패키지가 공식 npm 레지스트리에서만 확인되도록 강제할 수 있습니다. 또한 `package.json`에서 메이저 버전을 고정하고(Pin), 새 의존성을 설치하기 전에 다운로드 수, 최종 게시일, 유지관리자 수를 확인하는 절차를 권장합니다. Snyk, Socket.dev, GitHub Dependabot 같은 실시간 취약점 알림 서비스를 설정하고 주간 단위로 의존성을 업데이트하여 알려진 취약점이 쌓이는 것을 방지합니다. 이 기술은 Claude Code, Cursor, Codex 등 AI 어시스턴트와 CI 환경에서 모두 활용할 수 있으며, GitHub Actions 워크플로우 예시와 함께 의존성 감사 및 잠금 파일 무결성 검증을 자동화합니다. '피해야 할 사항' 섹션에서는 타입스쿼팅(Typosquatting)이나 검증되지 않은 패키지 설치, `*` 또는 `latest` 버전 범위 사용, `postinstall` 스크립트 무분별한 실행 등의 위험을 경고합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/dependency-security

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

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

문서

의존성 보안

규칙

  • CI에서 npm audit 실행 — 높음/치명적 취약점 발생 시 빌드 실패 처리
  • lockfile-lint를 사용하여 모든 패키지가 공식 npm 레지스트리로 확인되도록 검증
  • package.json에서 메이저 버전 고정: 마이너 업데이트에는 ^ 사용, * 또는 latest 사용하지 않음
  • 새 의존성을 설치하기 전에 검토: npm 다운로드 수, 최종 게시일, 유지관리자 수 확인
  • npm ls --all을 사용하여 전이 의존성 감사 — 직접 의존성이 수백 개의 추가 패키지를 끌어옴
  • Snyk, Socket.dev 또는 GitHub Dependabot 설정하여 실시간 취약점 알림 받기
  • 의존성을 주 단위로 업데이트 — 오래된 의존성은 알려진 취약점이 쌓임
# GitHub Actions — CI에서 감사
- name: 의존성 감사
  run: npm audit --audit-level=high

- name: 잠금 파일 무결성 검증
  run: npx lockfile-lint --path package-lock.json --type npm --allowed-hosts npm --validate-https
// package.json — 메이저 버전 고정
{
  "dependencies": {
    "next": "^14.0.0",
    "react": "^18.0.0",
    "zod": "^3.0.0"
  }
}

피해야 할 사항

  • 패키지를 먼저 확인하지 않고 npm install random-package 실행 — 타입스쿼팅(Typosquatting)은 실제 위협
  • npm audit 경고 무시 — 알려진 취약점은 가장 쉬운 공격 벡터
  • * 또는 latest를 버전 범위로 사용 — 손상된 게시물이 즉시 빌드에 영향을 줌
  • 신뢰할 수 없는 패키지의 postinstall 스크립트를 검토 없이 실행
  • 인기 있는 패키지는 안전하다고 가정 — event-stream(수백만 다운로드)조차 손상된 사례가 있음

Individual skills in this repo

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

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

관련 스킬