/auditing-dependency-security
Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or
$ npx -y skills add LerianStudio/ring --skill auditing-dependency-security --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/auditing-dependency-security
Context preview
The summary Claude sees to decide when to auto-load this skill.
Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or
SKILL.md
auditing-dependency-security.SKILL.mdname: ring:auditing-dependency-security
description: "Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or updating a dependency, reviewing a dependency PR, or investigating a compromise. Skip when no new dependency is involved or it is already vetted."
Dependency Security Check
When to use
- Adding a new dependency to any project
- Running pip install, npm install, go get, or equivalent
- Auditing existing dependencies for supply-chain risk
- Reviewing a PR that adds or updates dependencies
- Investigating a potential supply-chain compromise
Skip when
- No dependencies are being added, updated, or audited
- Task involves only internal code changes with no new imports
- Dependency is already vetted and pinned in lockfile
Related
**Complementary:** ring:hardening-dockerfiles, ring:implementing-tasks
Supply-chain gate for every install command in a Lerian codebase.
Pre-Install Checks
1. Package Identity Verification
For every package, verify:
├── Typosquatting: compare against known popular packages
│ e.g., "requets" vs "requests", "rnodule" vs "module"
├── Homoglyph attacks: look-alike Unicode characters
├── Maintainer risk:
│ - Single maintainer = higher risk
│ - Account age < 6 months = flag
│ - Recent ownership transfer = CRITICAL flag
└── Package age: < 30 days = flag
2. Vulnerability Database Check
| Source | Ecosystem | What It Covers | |--------|-----------|----------------| | OSV.dev | All | Google aggregated CVEs | | GitHub Advisory Database | All | GHSA linked to CVEs | | Socket.dev | npm, pip | Supply-chain: install scripts, network access | | PyPI JSON API | pip | Metadata, maintainers, release history | | npm registry API | npm | Metadata, maintainers, install scripts | | Go vulnerability DB (vuln.go.dev) | Go | Official Go CVE database |
3. Behavioral Signals
| Signal | Risk Level | Description | |--------|-----------|-------------| | Install scripts | HIGH | `postinstall` (npm), `setup.py` subprocess | | Network access at import | CRITICAL | Package phones home on import | | File system access outside project | HIGH | Reads `~/.ssh`, `~/.aws`, env vars | | Obfuscated code | CRITICAL | Base64 payloads, eval(), exec() | | Native binary bundled | HIGH | Pre-compiled binaries without source |
4. Lockfile Integrity
| Ecosystem | Lockfile | Hash Requirement | |-----------|----------|-----------------| | Go | go.sum | SHA-256 native — Go handles automatically | | npm | package-lock.json | `integrity` field (SHA-512) must be present for ALL deps | | pip | requirements.txt | `--require-hashes` MUST be enforced | | Cargo | Cargo.lock | `checksum` field verification |
Risk Scoring
risk_score = weighted_sum(
typosquatting_similarity * 25,
maintainer_risk * 20,
package_age_risk * 15,
vulnerability_count * 20, # weighted by severity
behavioral_flags * 15,
lockfile_integrity * 5
)
Score thresholds:
- 0-25: LOW — proceed
- 26-50: MEDIUM — proceed with documentation
- 51-75: HIGH — escalate to Fred before installing
- 76-100: CRITICAL — block installation
Decision Matrix
| Risk Level | Action | |-----------|--------| | LOW (0-25) | ✅ Approve — document in PR | | MEDIUM (26-50) | ⚠️ Conditional — mitigations required | | HIGH (51-75) | 🚨 Escalate to Fred before installing | | CRITICAL (76-100) | ❌ Block — do not install |
Report Template
## Dependency Security Report
Package: {name} @ {version}
Ecosystem: {go|npm|pip}
Risk Score: {score}/100 — {LOW|MEDIUM|HIGH|CRITICAL}
### Verification Results
| Check | Status | Details |
|-------|--------|---------|
| Typosquatting check | PASS/FLAG | {comparison} |
| Maintainer verification | PASS/FLAG | {maintainer count, age} |
| Vulnerability scan | PASS/FLAG | {CVE count, severity} |
| Behavioral analysis | PASS/FLAG | {signals found} |
| Lockfile integrity | PASS/FAIL | {hash present/missing} |
### Decision
{APPROVED|CONDITIONAL|ESCALATE|BLOCKED}
### Required Actions (if not APPROVED)
1. {specific mitigations or alternatives}Mitigations for MEDIUM Risk
- Pin exact version in lockfile
- Vendor the dependency (copy source into repo)
- Document why this specific package was chosen over alternatives
- Add to security monitoring (e.g., GitHub Dependabot alerts)
Read more
name: ring:auditing-dependency-security description: "Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or updating a dependency, reviewing a dependency PR, or investigating a compromise. Skip when no new dependency is involved or it is already vetted."
Dependency Security Check
When to use
- Adding a new dependency to any project
- Running pip install, npm install, go get, or equivalent
- Auditing existing dependencies for supply-chain risk
- Reviewing a PR that adds or updates dependencies
- Investigating a potential supply-chain compromise
Skip when
- No dependencies are being added, updated, or audited
- Task involves only internal code changes with no new imports
- Dependency is already vetted and pinned in lockfile
Related
**Complementary:** ring:hardening-dockerfiles, ring:implementing-tasks
Supply-chain gate for every install command in a Lerian codebase.
Pre-Install Checks
1. Package Identity Verification
For every package, verify: ├── Typosquatting: compare against known popular packages │ e.g., "requets" vs "requests", "rnodule" vs "module" ├── Homoglyph attacks: look-alike Unicode characters ├── Maintainer risk: │ - Single maintainer = higher risk │ - Account age < 6 months = flag │ - Recent ownership transfer = CRITICAL flag └── Package age: < 30 days = flag
2. Vulnerability Database Check
| Source | Ecosystem | What It Covers | |--------|-----------|----------------| | OSV.dev | All | Google aggregated CVEs | | GitHub Advisory Database | All | GHSA linked to CVEs | | Socket.dev | npm, pip | Supply-chain: install scripts, network access | | PyPI JSON API | pip | Metadata, maintainers, release history | | npm registry API | npm | Metadata, maintainers, install scripts | | Go vulnerability DB (vuln.go.dev) | Go | Official Go CVE database |
3. Behavioral Signals
| Signal | Risk Level | Description | |--------|-----------|-------------| | Install scripts | HIGH | `postinstall` (npm), `setup.py` subprocess | | Network access at import | CRITICAL | Package phones home on import | | File system access outside project | HIGH | Reads `~/.ssh`, `~/.aws`, env vars | | Obfuscated code | CRITICAL | Base64 payloads, eval(), exec() | | Native binary bundled | HIGH | Pre-compiled binaries without source |
4. Lockfile Integrity
| Ecosystem | Lockfile | Hash Requirement | |-----------|----------|-----------------| | Go | go.sum | SHA-256 native — Go handles automatically | | npm | package-lock.json | `integrity` field (SHA-512) must be present for ALL deps | | pip | requirements.txt | `--require-hashes` MUST be enforced | | Cargo | Cargo.lock | `checksum` field verification |
Risk Scoring
risk_score = weighted_sum( typosquatting_similarity * 25, maintainer_risk * 20, package_age_risk * 15, vulnerability_count * 20, # weighted by severity behavioral_flags * 15, lockfile_integrity * 5 )
Score thresholds:
- 0-25: LOW — proceed
- 26-50: MEDIUM — proceed with documentation
- 51-75: HIGH — escalate to Fred before installing
- 76-100: CRITICAL — block installation
Decision Matrix
| Risk Level | Action | |-----------|--------| | LOW (0-25) | ✅ Approve — document in PR | | MEDIUM (26-50) | ⚠️ Conditional — mitigations required | | HIGH (51-75) | 🚨 Escalate to Fred before installing | | CRITICAL (76-100) | ❌ Block — do not install |
Report Template
## Dependency Security Report
Package: {name} @ {version}
Ecosystem: {go|npm|pip}
Risk Score: {score}/100 — {LOW|MEDIUM|HIGH|CRITICAL}
### Verification Results
| Check | Status | Details |
|-------|--------|---------|
| Typosquatting check | PASS/FLAG | {comparison} |
| Maintainer verification | PASS/FLAG | {maintainer count, age} |
| Vulnerability scan | PASS/FLAG | {CVE count, severity} |
| Behavioral analysis | PASS/FLAG | {signals found} |
| Lockfile integrity | PASS/FAIL | {hash present/missing} |
### Decision
{APPROVED|CONDITIONAL|ESCALATE|BLOCKED}
### Required Actions (if not APPROVED)
1. {specific mitigations or alternatives}Mitigations for MEDIUM Risk
- Pin exact version in lockfile
- Vendor the dependency (copy source into repo)
- Document why this specific package was chosen over alternatives
- Add to security monitoring (e.g., GitHub Dependabot alerts)
Proven engineering practices, enforced through skills. Ring is a comprehensive skills library and workflow system for AI agents that transforms how AI assistants approach software development.
Repo: LerianStudio/ring
Other skills on ring.
- /analyzing-options
Analyzing different approaches for a task or problem with structured comparisons, effort estimates, and recommendations. Use when facing strategic decisions, architecture choices, or multiple viable approaches. Skip when there's an obvious single approach or the decision is
Open skill - /auditing-production-readiness
Auditing a service's production readiness against Ring engineering standards across base dimensions plus a conditional multi-tenant dimension, then emitting a scored report and an HTML dashboard. Use before production deploy, periodic review, onboarding, or a major release. Skip
Open skill - /cleaning-comments
Cleaning redundant and obvious comments following clean code principles while preserving meaningful documentation. Supports git scope filtering (staged, unstaged, branch, commit-range). Use when code has excessive comments, during code review, or post-refactor cleanup. Skip when
Open skill - /committing-changes
Commit changes with scope allowlist enforcement, atomic grouping, GPG-signed conventional commits, and trailer management. Detects the repo's PR-validation scope policy before proposing any message. Use when the user asks to commit or has changes ready to record. Skip when the
Open skill - /creating-handoffs
Creating a handoff document that captures session state (completed work, decisions, open items, next steps) and delivering it via Plan Mode so the user gets the native 'clear context and continue implementing' resume option. Use when ending a session, when context grows large,
Open skill - /creating-worktrees
Creating an isolated git worktree for parallel branch work: selects the directory by priority order, verifies/adds .gitignore safety, auto-installs the detected toolchain's dependencies, runs a baseline test, and reports readiness. Use before a feature that needs isolation from
Open skill

