AGENT SKILL

dependency-security

Enforce dependency security scanning and SBOM generation. Use when adding dependencies, reviewing package.json, or during security audits. Covers OWASP dependency check, npm audit, and supply chain security.

License 许可
MIT
所属仓库
bg-szy/TOP-SKILLS
最近更新
2026-11-15
Stars
★ 6
Forks
0

01 前言 Front Matter

name
dependency-security
license
MIT
metadata
{ "author": "antigravity-team", "version": "1.0" }
description
Enforce dependency security scanning and SBOM generation. Use when adding dependencies, reviewing package.json, or during security audits. Covers OWASP dependency check, npm audit, and supply chain security.
allowed-tools
Read, Glob, Grep, Edit, Write, Bash

02 资源文件 1

03 SKILL.md 正文

Dependency Security

의존성 보안 스캔 및 SBOM(Software Bill of Materials) 생성을 강제하는 스킬입니다.

2025 Context

OWASP Top 10 2025에서 "Vulnerable and Outdated Components"가 A03으로 상승 EU Cyber Resilience Act: 2024년부터 SBOM 의무화 시작 Supply Chain 공격 급증: 2024년 대비 300% 증가

Core Rules

규칙 상태 설명
npm audit 통과 🔴 필수 high/critical 취약점 0개
의존성 최신화 🟡 권장 주요 보안 패치 적용
SBOM 생성 🟡 권장 의존성 목록 문서화
lockfile 커밋 🔴 필수 재현 가능한 빌드

Security Audit

npm audit

# 취약점 검사
npm audit

# 자동 수정 (가능한 경우)
npm audit fix

# 강제 수정 (major 버전 업데이트 포함)
npm audit fix --force  # ⚠️ 주의: 호환성 문제 가능

# JSON 출력 (CI용)
npm audit --json

결과 해석

Severity levels:
- critical: 🔴 즉시 수정 필수
- high:     🔴 즉시 수정 필수
- moderate: 🟡 조속히 수정
- low:      🟢 다음 업데이트 시 수정

CI 통합 예시

# GitHub Actions
- name: Security Audit
  run: |
    npm audit --audit-level=high
    if [ $? -ne 0 ]; then
      echo "Security vulnerabilities found!"
      exit 1
    fi

Dependency Management

의존성 업데이트 확인

# 오래된 패키지 확인
npm outdated

# 업데이트 가능한 패키지
npx npm-check-updates

# 대화형 업데이트
npx npm-check-updates -i

안전한 업데이트 전략

# 1. 현재 상태 기록
npm outdated > outdated-$(date +%Y%m%d).txt

# 2. patch 버전만 업데이트 (가장 안전)
npx npm-check-updates -u --target patch

# 3. minor 버전 업데이트
npx npm-check-updates -u --target minor

# 4. 테스트 실행
npm test

# 5. lockfile 커밋
git add package-lock.json
git commit -m "chore: update dependencies (security patch)"

SBOM (Software Bill of Materials)

SBOM 생성

# CycloneDX 형식 (권장)
npx @cyclonedx/cyclonedx-npm --output-file sbom.json

# SPDX 형식
npx spdx-sbom-generator

SBOM 포함 정보

{
  "bomFormat": "CycloneDX",
  "specVersion": "1.4",
  "components": [
    {
      "name": "react",
      "version": "18.2.0",
      "purl": "pkg:npm/react@18.2.0",
      "licenses": [{ "license": { "id": "MIT" } }]
    }
  ]
}

CI에서 SBOM 자동 생성

# GitHub Actions
- name: Generate SBOM
  run: npx @cyclonedx/cyclonedx-npm --output-file sbom.json

- name: Upload SBOM
  uses: actions/upload-artifact@v3
  with:
    name: sbom
    path: sbom.json

Supply Chain Security

Lockfile 보안

# package-lock.json 항상 커밋
git add package-lock.json

# CI에서 정확한 버전 설치
npm ci  # (npm install이 아님!)

.npmrc 보안 설정

# .npmrc
# 스크립트 자동 실행 금지
ignore-scripts=true

# 엄격한 SSL
strict-ssl=true

# 레지스트리 고정
registry=https://registry.npmjs.org/

의심스러운 패키지 확인

# 패키지 정보 확인
npm info <package-name>

# 다운로드 수, 유지보수 상태 확인
npx npm-check <package-name>

# 라이선스 확인
npx license-checker

Detection Patterns

위험 신호

🔴 위험:
- critical/high 취약점 존재
- 1년 이상 업데이트 없는 의존성
- deprecated 패키지 사용
- 알 수 없는 출처의 패키지

🟡 주의:
- moderate 취약점
- 6개월 이상 업데이트 없음
- 낮은 다운로드 수

검사 명령어

# deprecated 패키지 확인
npm ls 2>&1 | grep -i deprecated

# 라이선스 문제 확인
npx license-checker --failOn "GPL;AGPL"

# 의존성 트리 확인
npm ls --depth=0

Workflow

1. 새 의존성 추가 시

추가 전 체크:
1. npm info로 패키지 정보 확인
2. 다운로드 수 및 유지보수 상태 확인
3. 라이선스 호환성 확인
4. 대안 패키지 검토

추가 후:
1. npm audit 실행
2. lockfile 커밋

2. 정기 보안 점검 (주간/월간)

# 1. 취약점 검사
npm audit

# 2. 오래된 패키지 확인
npm outdated

# 3. SBOM 업데이트
npx @cyclonedx/cyclonedx-npm --output-file sbom.json

# 4. 결과 기록

3. CI/CD 파이프라인

name: Security Check

on: [push, pull_request]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
        run: npm ci

      - name: Security audit
        run: npm audit --audit-level=high

      - name: Check outdated
        run: npm outdated || true

      - name: Generate SBOM
        run: npx @cyclonedx/cyclonedx-npm --output-file sbom.json

도구 추천

도구 용도 명령어
npm audit 취약점 스캔 npm audit
Snyk 고급 취약점 분석 npx snyk test
OWASP Dependency-Check OWASP 표준 스캔 CLI 도구
CycloneDX SBOM 생성 npx @cyclonedx/cyclonedx-npm
npm-check-updates 의존성 업데이트 npx ncu

Checklist

새 프로젝트

  • [ ] .npmrc 보안 설정 적용
  • [ ] package-lock.json 커밋
  • [ ] npm audit 통과 확인
  • [ ] CI에 보안 검사 추가

의존성 추가 시

  • [ ] 패키지 신뢰성 확인
  • [ ] 라이선스 호환성 확인
  • [ ] npm audit 재실행
  • [ ] lockfile 커밋

정기 점검

  • [ ] npm audit 실행
  • [ ] npm outdated 확인
  • [ ] SBOM 업데이트
  • [ ] 보안 패치 적용

References

04 同仓库更多 Skills

bg-szy
bg-szy/TOP-SKILLS

serpmaven

Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-landing-page-audit

Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: "audit my landing page", "why isn't this page converting", "review my homepage", "my ads get clicks but no signups", "people bounce from the pricing page", "CRO review", "improve conversion rate", "is my hero section clear", "roast my landing page", "rewrite my headline", "what's wrong with this page", "landing page feedback", "make the signup page convert better". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-growth-context

Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents/revnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says "set up our marketing context", "who is our ideal customer", "write our ICP", "describe the product for marketing", "positioning doc", "what's our brand voice", "remember this about our customers", "log what we tried", "what have we learned from marketing", "we changed pricing, update the context", "update our growth notes", "summarize the business for the agent", "import my product-marketing.md", "start a growth doc", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-get-listed

Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: "best X" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says "get us listed", "which directories should we submit to", "how do we get into best-of lists", "why does ChatGPT recommend competitors and not us", "get mentioned in AI answers", "submit to awesome lists", "get on G2", "where are our competitors listed", "pitch listicle authors", "find backlink opportunities", "launch directories", "get into roundups", "Product Hunt alternatives", "where should we be listed", "get cited by Perplexity". Never submits, pays or posts without a yes. Works without a Revnu account.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-ai-readiness-audit

Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks "is my site ready for AI search", "audit my site for AI answers", "AEO audit", "GEO audit", "why doesn't ChatGPT quote our pricing", "make our pages citable by AI", "do I need llms.txt", "does schema help with ChatGPT", "check our structured data", "is our content visible without JavaScript", "AI SEO audit", "optimize our homepage for AI answers", "LLM SEO check", "why does AI get our product wrong", "fix our site for AI Overviews". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.

★ 6
bg-szy
bg-szy/TOP-SKILLS

proxy-troubleshooting

Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.

★ 6