Sc dependency audit

From ersinkoc/security-check · View interactive version

Sc dependency audit is an AI agent skill from the GitHub repository ersinkoc/security-check. Supply chain and dependency security analysis across all package ecosystems

How to use this skill

Skill file

SC: Dependency Audit — Supply Chain & Dependency Security

Purpose

Analyzes all project dependencies for known vulnerabilities, supply chain risks, typosquatting attempts, and dangerous build-time behaviors. Covers all major package ecosystems: npm, PyPI, crates.io, Maven Central, NuGet, Packagist, and Go modules.

Activation

Runs as part of Phase 1 (Reconnaissance), immediately after sc-recon.

Output

File: security-report/dependency-audit.md

Phase 1: Discovery

Lock File Detection

Search for dependency manifest and lock files:

| Ecosystem | Manifest | Lock File |

|-----------|----------|-----------|

| Node.js | package.json | package-lock.json, yarn.lock, pnpm-lock.yaml |

| Python | requirements.txt, pyproject.toml, Pipfile, setup.py, setup.cfg | Pipfile.lock, poetry.lock |

| Go | go.mod | go.sum |

| Rust | Cargo.toml | Cargo.lock |

| Java | pom.xml, build.gradle, build.gradle.kts | gradle.lockfile |

| C# | *.csproj, packages.config | packages.lock.json |

| PHP | composer.json | composer.lock |

| Ruby | Gemfile | Gemfile.lock |

Dependency Inventory

For each detected ecosystem:

  1. Parse manifest files to list all direct dependencies with version constraints
  2. Parse lock files to list all transitive dependencies with resolved versions
  3. Count total dependencies (direct + transitive)
  4. Flag missing lock files — if manifest exists but no lock file, flag as risk

Known Vulnerability Scanning

For each dependency, check for known vulnerabilities by analyzing:

  1. Version age — flag dependencies not updated in 2+ years
  2. Known CVE patterns — check version ranges against known vulnerable version ranges
  3. Deprecated packages — check for deprecation notices in manifest metadata
  4. Yanked/retracted versions — detect usage of versions pulled from registries

Common vulnerable dependency patterns to flag:

Node.js:

Python:

Go:

Rust:

Java:

C#:

Typosquatting Detection

For each dependency, check for typosquatting indicators:

  1. Name similarity — compare against popular packages for character transposition, omission, addition
  2. Low download count — flag packages with suspiciously low downloads for their name similarity to popular packages
  3. Recent publication — flag very new packages that mirror names of established packages
  4. Author mismatch — flag if package author doesn't match the expected maintainer of similarly-named packages

Common typosquatting patterns:

Dependency Confusion

Check for dependency confusion attack vectors:

  1. Private registry configuration — verify .npmrc, pip.conf, settings.xml point to correct registries
  2. Scoped vs unscoped packages — flag unscoped packages that could be claimed on public registry
  3. Internal package names on public registries — check if internal package names exist on public registries
  4. Mixed registry sources — flag configurations pulling from both public and private registries without priority rules

Build Script Analysis

Inspect build-time scripts that execute during installation:

npm:

Python:

Rust:

Java:

Go:

License Compliance

Check dependency licenses for:

  1. Copyleft licenses (GPL, AGPL) in MIT/Apache-licensed projects
  2. No license specified — flag dependencies without clear license
  3. License incompatibility — flag conflicts between project license and dependency licenses
  4. Commercial/proprietary — flag proprietary dependencies

Phase 2: Verification

For each flagged dependency:

  1. Confirm version — verify the flagged version is actually in use (not just in manifest)
  2. Check if vulnerability is reachable — is the vulnerable function/module actually imported and called?
  3. Check for patches — is there a patched version available?
  4. Assess real impact — is the vulnerability exploitable in this project's context?

Severity Classification

Output Format

Finding: DEP-{NNN}

Summary Statistics

The output must include a summary section:

## Dependency Audit Summary
- Total dependencies: {N} (direct: {D}, transitive: {T})
- Ecosystems scanned: {list}
- Known vulnerabilities found: {N} (Critical: {C}, High: {H}, Medium: {M}, Low: {L})
- Typosquatting risks: {N}
- Dependency confusion risks: {N}
- License concerns: {N}
- Outdated dependencies: {N}

Common False Positives

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.