/iblai-vibe-security-dependency-audit
Audit project dependencies, frameworks, language runtimes, and dev
tools for known CVEs, security anti-patterns, and supply-chain risks.
Do NOT trust a CVE listing without verifying it applies to the
installed version. Every finding ships with a fix version or
remediation step.
Step 1: Inventory the Stack
Catalog everything in use — direct deps and the chain below them.
Package manifests — read and catalog:
Node/JS: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml
Python: requirements.txt, Pipfile.lock, pyproject.toml, poetry.lock
Ruby: Gemfile, Gemfile.lock
Go: go.mod, go.sum
Rust: Cargo.toml, Cargo.lock
Java: pom.xml, build.gradle
PHP: composer.json, composer.lock
.NET: *.csproj, packages.config
Framework and runtime versions:
- Framework version (Next.js, Django, Rails, Spring, Laravel, Express, etc.)
- Language/runtime version (Node.js, Python, Ruby, Go, Java, PHP, .NET)
- Infrastructure tools (Docker base images, Terraform providers, Kubernetes versions)
Dev tools and CI/CD:
- CI/CD pipeline configs (.github/workflows, .gitlab-ci.yml, Jenkinsfile)
- Pre-commit hooks, linters, formatters
- Container base images and their update status
- IaC tool versions (Terraform, Pulumi, CDK)
Step 2: Run Automated Audit Tools
Pick the right command for the stack:
# Node.js
npm audit
npm audit --json # For structured output
# Python
pip audit # If pip-audit installed
safety check # If safety installed
# Ruby
bundle audit
# Go
govulncheck ./...
# Rust
cargo audit
# PHP
composer audit
# .NET
dotnet list package --vulnerable
# Docker
docker scout cves <image>
trivy image <image>
# General (if Trivy is available)
trivy fs .
Step 3: Framework-Specific Known Issues
CVEs in packages are only half the story. Each framework ships its own
common-misconfiguration foot-guns. Search for recent advisories and
check these patterns by stack:
Next.js / React:
- Server Actions exposing internal endpoints (pre-14.1.1 middleware bypass CVE-2025-29927)
dangerouslySetInnerHTML without sanitization
- SSRF through image optimization (
next/image with unrestricted domains)
- Exposed
.env files in public directory or client bundle (NEXT_PUBLIC_ prefix leaking secrets)
- Middleware auth bypass — check
middleware.ts matches every protected route
- Server Component / Client Component boundary leaking server-only data
- Outdated
next.config.js security headers
Django:
- DEBUG=True in production
- ALLOWED_HOSTS misconfigured (wildcard
*)
- Missing CSRF middleware or
@csrf_exempt on state-changing views
- Raw SQL via
extra(), raw(), or RawSQL without parameterization
- Pickle deserialization in sessions (use JSON serializer)
- Secret key committed to source control
Rails:
- Mass assignment without strong parameters
- SQL injection via
where("column = '#{input}'")
- Unpatched Action Pack, Action View, or Active Record CVEs
- Insecure deserialization in cookies (verify secret_key_base rotation)
- CSRF token bypass in API-only mode
Express / Node.js:
- Prototype pollution through
Object.assign, lodash.merge, deep-extend
- ReDoS in validation regex patterns
- Path traversal through
req.params in file-serving routes
- Missing rate limiting on auth endpoints
eval() or Function() with user input
- Event loop blocking on synchronous operations
Spring / Java:
- Spring4Shell and related RCE vulnerabilities
- Deserialization attacks (Java native serialization, Jackson polymorphic types)
- SpEL injection in Spring Expression Language
- Missing CSRF protection on state-changing endpoints
- Actuator endpoints exposed without authentication
Laravel / PHP:
- APP_DEBUG=true in production (leaks env vars in error pages)
- SQL injection via raw DB queries without bindings
- Mass assignment without
$fillable / $guarded
- File upload without type validation (PHP execution via uploaded .php)
- Insecure deserialization in queued jobs
WordPress:
- Outdated core, theme, or plugin versions (most common attack vector)
- File editor enabled in wp-admin (allows code injection if admin is compromised)
- XML-RPC enabled (brute-force amplification, SSRF)
- Default admin username, weak passwords
- Unpatched plugin vulnerabilities (check WPScan database)
Step 4: Supply Chain Risks
Beyond CVEs, watch for supply-chain attack indicators.
Dependency confusion / substitution:
- Private package names that could be claimed on public registries
- Missing
.npmrc or pip.conf scoping to private registry
- No lockfile integrity verification
Typosquatting:
- Package names that are close misspellings of popular packages
- Recently published packages with very few downloads
- Packages that changed ownership recently
Malicious packages:
- Postinstall scripts making network requests or executing code (
scripts.postinstall in package.json)
- Packages with obfuscated code
- Excessive permission requests relative to functionality
Maintenance risk:
- Unmaintained packages (no commits in 2+ years, archived repos)
- Single-maintainer packages for critical functionality
- Packages with known but unpatched vulnerabilities (maintainer unresponsive)
Lockfile integrity:
- Is the lockfile committed to source control?
- Does CI install from the lockfile (
npm ci not npm install, pip install --require-hashes)?
- Are integrity hashes present and verified?
Step 5: Dev Tool and CI/CD Security
GitHub Actions:
pull_request_target trigger with checkout of PR code (code-injection risk)
- Secrets accessible in forked PR workflows
- Unpinned action versions (
uses: actions/checkout@main vs @v4.1.0 or SHA pin)
- Script injection via
${{ github.event.issue.title }} in run: blocks
Docker:
- Running as root in container (missing
USER directive)
- Base image with known CVEs (check with
trivy or docker scout)
- Secrets baked into image layers (visible via
docker history)
latest tag instead of pinned version
Terraform / IaC:
- Hardcoded secrets in
.tf files
- Unpinned provider versions
- Missing state file encryption
- Over-permissive IAM in provider configuration
Output Format
# Dependency & Stack Security Audit
## Project: [name]
## Stack: [language, framework, key tools]
## Date: [date]
### Stack Inventory
| Component | Version | Latest | Status |
|-----------|---------|--------|--------|
### Known Vulnerabilities (CVEs)
| Package | Installed | Vuln | Severity | CVE | Fix Version |
|---------|-----------|------|----------|-----|-------------|
### Framework-Specific Issues
#### [SEVERITY] [Title]
**Component:** [framework/tool name and version]
**Issue:** [description]
**Evidence:** [code or config snippet]
**Remediation:** [specific fix]
### Supply Chain Risks
| Risk | Package/Component | Details | Remediation |
|------|-------------------|---------|-------------|
### Dev Tool / CI Security
| Tool | Issue | Severity | Remediation |
|------|-------|----------|-------------|
### Prioritized Action Plan
1. [Critical — actively exploited CVEs, RCE vulnerabilities]
2. [High — known CVEs with public exploits, supply chain risks]
3. [Medium — framework misconfigurations, outdated dependencies]
4. [Low — maintenance risks, best practice improvements]
Boundaries
- Audit only code and configurations the user provides.
- For every CVE, verify it applies to the actual installed version.
- Provide specific fix versions or remediation steps for every finding.
- Note when a vulnerability requires specific conditions to exploit (reduces effective severity).
- Refuse to help exploit found vulnerabilities against unauthorized targets.
References
- OWASP Dependency-Check
- National Vulnerability Database (NVD)
- GitHub Advisory Database
- Snyk Vulnerability Database
- npm audit / pip-audit / bundler-audit documentation
- SLSA (Supply-chain Levels for Software Artifacts) framework
1---2name: iblai-vibe-security-dependency-audit3description: Audit project dependencies, frameworks, languages, and dev tools for known vulnerabilities, CVEs, and security anti-patterns. Use when the user mentions 'dependency audit,' 'npm audit,' 'CVE,' 'vulnerable packages,' 'supply chain security,' 'outdated dependencies,' 'known vulnerabilities,' 'security advisory,' 'package security,' 'framework vulnerability,' 'is this package safe,' or needs to check whether their stack has known security issues.4---56# /iblai-vibe-security-dependency-audit78Audit project dependencies, frameworks, language runtimes, and dev9tools for known CVEs, security anti-patterns, and supply-chain risks.1011Do NOT trust a CVE listing without verifying it applies to the12installed version. Every finding ships with a fix version or13remediation step.1415## Step 1: Inventory the Stack1617Catalog everything in use — direct deps and the chain below them.1819**Package manifests — read and catalog:**2021```22Node/JS: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml23Python: requirements.txt, Pipfile.lock, pyproject.toml, poetry.lock24Ruby: Gemfile, Gemfile.lock25Go: go.mod, go.sum26Rust: Cargo.toml, Cargo.lock27Java: pom.xml, build.gradle28PHP: composer.json, composer.lock29.NET: *.csproj, packages.config30```3132**Framework and runtime versions:**3334- Framework version (Next.js, Django, Rails, Spring, Laravel, Express, etc.)35- Language/runtime version (Node.js, Python, Ruby, Go, Java, PHP, .NET)36- Infrastructure tools (Docker base images, Terraform providers, Kubernetes versions)3738**Dev tools and CI/CD:**3940- CI/CD pipeline configs (.github/workflows, .gitlab-ci.yml, Jenkinsfile)41- Pre-commit hooks, linters, formatters42- Container base images and their update status43- IaC tool versions (Terraform, Pulumi, CDK)4445## Step 2: Run Automated Audit Tools4647Pick the right command for the stack:4849```bash50# Node.js51npm audit52npm audit --json # For structured output5354# Python55pip audit # If pip-audit installed56safety check # If safety installed5758# Ruby59bundle audit6061# Go62govulncheck ./...6364# Rust65cargo audit6667# PHP68composer audit6970# .NET71dotnet list package --vulnerable7273# Docker74docker scout cves <image>75trivy image <image>7677# General (if Trivy is available)78trivy fs .79```8081## Step 3: Framework-Specific Known Issues8283CVEs in packages are only half the story. Each framework ships its own84common-misconfiguration foot-guns. Search for recent advisories and85check these patterns by stack:8687**Next.js / React:**8889- Server Actions exposing internal endpoints (pre-14.1.1 middleware bypass CVE-2025-29927)90- `dangerouslySetInnerHTML` without sanitization91- SSRF through image optimization (`next/image` with unrestricted domains)92- Exposed `.env` files in public directory or client bundle (`NEXT_PUBLIC_` prefix leaking secrets)93- Middleware auth bypass — check `middleware.ts` matches every protected route94- Server Component / Client Component boundary leaking server-only data95- Outdated `next.config.js` security headers9697**Django:**9899- DEBUG=True in production100- ALLOWED_HOSTS misconfigured (wildcard `*`)101- Missing CSRF middleware or `@csrf_exempt` on state-changing views102- Raw SQL via `extra()`, `raw()`, or `RawSQL` without parameterization103- Pickle deserialization in sessions (use JSON serializer)104- Secret key committed to source control105106**Rails:**107108- Mass assignment without strong parameters109- SQL injection via `where("column = '#{input}'")`110- Unpatched Action Pack, Action View, or Active Record CVEs111- Insecure deserialization in cookies (verify secret_key_base rotation)112- CSRF token bypass in API-only mode113114**Express / Node.js:**115116- Prototype pollution through `Object.assign`, `lodash.merge`, `deep-extend`117- ReDoS in validation regex patterns118- Path traversal through `req.params` in file-serving routes119- Missing rate limiting on auth endpoints120- `eval()` or `Function()` with user input121- Event loop blocking on synchronous operations122123**Spring / Java:**124125- Spring4Shell and related RCE vulnerabilities126- Deserialization attacks (Java native serialization, Jackson polymorphic types)127- SpEL injection in Spring Expression Language128- Missing CSRF protection on state-changing endpoints129- Actuator endpoints exposed without authentication130131**Laravel / PHP:**132133- APP_DEBUG=true in production (leaks env vars in error pages)134- SQL injection via raw DB queries without bindings135- Mass assignment without `$fillable` / `$guarded`136- File upload without type validation (PHP execution via uploaded .php)137- Insecure deserialization in queued jobs138139**WordPress:**140141- Outdated core, theme, or plugin versions (most common attack vector)142- File editor enabled in wp-admin (allows code injection if admin is compromised)143- XML-RPC enabled (brute-force amplification, SSRF)144- Default admin username, weak passwords145- Unpatched plugin vulnerabilities (check WPScan database)146147## Step 4: Supply Chain Risks148149Beyond CVEs, watch for supply-chain attack indicators.150151**Dependency confusion / substitution:**152153- Private package names that could be claimed on public registries154- Missing `.npmrc` or `pip.conf` scoping to private registry155- No lockfile integrity verification156157**Typosquatting:**158159- Package names that are close misspellings of popular packages160- Recently published packages with very few downloads161- Packages that changed ownership recently162163**Malicious packages:**164165- Postinstall scripts making network requests or executing code (`scripts.postinstall` in package.json)166- Packages with obfuscated code167- Excessive permission requests relative to functionality168169**Maintenance risk:**170171- Unmaintained packages (no commits in 2+ years, archived repos)172- Single-maintainer packages for critical functionality173- Packages with known but unpatched vulnerabilities (maintainer unresponsive)174175**Lockfile integrity:**176177- Is the lockfile committed to source control?178- Does CI install from the lockfile (`npm ci` not `npm install`, `pip install --require-hashes`)?179- Are integrity hashes present and verified?180181## Step 5: Dev Tool and CI/CD Security182183**GitHub Actions:**184185- `pull_request_target` trigger with checkout of PR code (code-injection risk)186- Secrets accessible in forked PR workflows187- Unpinned action versions (`uses: actions/checkout@main` vs `@v4.1.0` or SHA pin)188- Script injection via `${{ github.event.issue.title }}` in `run:` blocks189190**Docker:**191192- Running as root in container (missing `USER` directive)193- Base image with known CVEs (check with `trivy` or `docker scout`)194- Secrets baked into image layers (visible via `docker history`)195- `latest` tag instead of pinned version196197**Terraform / IaC:**198199- Hardcoded secrets in `.tf` files200- Unpinned provider versions201- Missing state file encryption202- Over-permissive IAM in provider configuration203204## Output Format205206```markdown207# Dependency & Stack Security Audit208## Project: [name]209## Stack: [language, framework, key tools]210## Date: [date]211212### Stack Inventory213| Component | Version | Latest | Status |214|-----------|---------|--------|--------|215216### Known Vulnerabilities (CVEs)217| Package | Installed | Vuln | Severity | CVE | Fix Version |218|---------|-----------|------|----------|-----|-------------|219220### Framework-Specific Issues221#### [SEVERITY] [Title]222**Component:** [framework/tool name and version]223**Issue:** [description]224**Evidence:** [code or config snippet]225**Remediation:** [specific fix]226227### Supply Chain Risks228| Risk | Package/Component | Details | Remediation |229|------|-------------------|---------|-------------|230231### Dev Tool / CI Security232| Tool | Issue | Severity | Remediation |233|------|-------|----------|-------------|234235### Prioritized Action Plan2361. [Critical — actively exploited CVEs, RCE vulnerabilities]2372. [High — known CVEs with public exploits, supply chain risks]2383. [Medium — framework misconfigurations, outdated dependencies]2394. [Low — maintenance risks, best practice improvements]240```241242## Boundaries243244- Audit only code and configurations the user provides.245- For every CVE, verify it applies to the actual installed version.246- Provide specific fix versions or remediation steps for every finding.247- Note when a vulnerability requires specific conditions to exploit (reduces effective severity).248- Refuse to help exploit found vulnerabilities against unauthorized targets.249250## References251252- OWASP Dependency-Check253- National Vulnerability Database (NVD)254- GitHub Advisory Database255- Snyk Vulnerability Database256- npm audit / pip-audit / bundler-audit documentation257- SLSA (Supply-chain Levels for Software Artifacts) framework