agentsclimarketplace

Dependency security

Skill ComeOnOliver/skillshub/skills/aiskillstore/marketplace/doyajin174/dependency-security

๐Ÿง  The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill dependency-security

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

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.

The file declares its own license as MIT. That is the authorโ€™s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.1 KB, as published. Nobody here has run it

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/[email protected]",
      "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-CheckOWASP ํ‘œ์ค€ ์Šค์บ”CLI ๋„๊ตฌ
CycloneDXSBOM ์ƒ์„ฑ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

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.