autonomous-coding-toolkit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +22 -0
- package/.claude-plugin/plugin.json +13 -0
- package/LICENSE +21 -0
- package/Makefile +21 -0
- package/README.md +140 -0
- package/SECURITY.md +28 -0
- package/agents/bash-expert.md +113 -0
- package/agents/dependency-auditor.md +138 -0
- package/agents/integration-tester.md +120 -0
- package/agents/lesson-scanner.md +149 -0
- package/agents/python-expert.md +179 -0
- package/agents/service-monitor.md +141 -0
- package/agents/shell-expert.md +147 -0
- package/benchmarks/runner.sh +147 -0
- package/benchmarks/tasks/01-rest-endpoint/rubric.sh +29 -0
- package/benchmarks/tasks/01-rest-endpoint/task.md +17 -0
- package/benchmarks/tasks/02-refactor-module/task.md +8 -0
- package/benchmarks/tasks/03-fix-integration-bug/task.md +8 -0
- package/benchmarks/tasks/04-add-test-coverage/task.md +8 -0
- package/benchmarks/tasks/05-multi-file-feature/task.md +8 -0
- package/bin/act.js +238 -0
- package/commands/autocode.md +6 -0
- package/commands/cancel-ralph.md +18 -0
- package/commands/code-factory.md +53 -0
- package/commands/create-prd.md +55 -0
- package/commands/ralph-loop.md +18 -0
- package/commands/run-plan.md +117 -0
- package/commands/submit-lesson.md +122 -0
- package/docs/ARCHITECTURE.md +630 -0
- package/docs/CONTRIBUTING.md +125 -0
- package/docs/lessons/0001-bare-exception-swallowing.md +34 -0
- package/docs/lessons/0002-async-def-without-await.md +28 -0
- package/docs/lessons/0003-create-task-without-callback.md +28 -0
- package/docs/lessons/0004-hardcoded-test-counts.md +28 -0
- package/docs/lessons/0005-sqlite-without-closing.md +33 -0
- package/docs/lessons/0006-venv-pip-path.md +27 -0
- package/docs/lessons/0007-runner-state-self-rejection.md +35 -0
- package/docs/lessons/0008-quality-gate-blind-spot.md +33 -0
- package/docs/lessons/0009-parser-overcount-empty-batches.md +36 -0
- package/docs/lessons/0010-local-outside-function-bash.md +33 -0
- package/docs/lessons/0011-batch-tests-for-unimplemented-code.md +36 -0
- package/docs/lessons/0012-api-markdown-unescaped-chars.md +33 -0
- package/docs/lessons/0013-export-prefix-env-parsing.md +33 -0
- package/docs/lessons/0014-decorator-registry-import-side-effect.md +43 -0
- package/docs/lessons/0015-frontend-backend-schema-drift.md +43 -0
- package/docs/lessons/0016-event-driven-cold-start-seeding.md +44 -0
- package/docs/lessons/0017-copy-paste-logic-diverges.md +43 -0
- package/docs/lessons/0018-layer-passes-pipeline-broken.md +45 -0
- package/docs/lessons/0019-systemd-envfile-ignores-export.md +41 -0
- package/docs/lessons/0020-persist-state-incrementally.md +44 -0
- package/docs/lessons/0021-dual-axis-testing.md +48 -0
- package/docs/lessons/0022-jsx-factory-shadowing.md +43 -0
- package/docs/lessons/0023-static-analysis-spiral.md +51 -0
- package/docs/lessons/0024-shared-pipeline-implementation.md +55 -0
- package/docs/lessons/0025-defense-in-depth-all-entry-points.md +65 -0
- package/docs/lessons/0026-linter-no-rules-false-enforcement.md +54 -0
- package/docs/lessons/0027-jsx-silent-prop-drop.md +64 -0
- package/docs/lessons/0028-no-infrastructure-in-client-code.md +49 -0
- package/docs/lessons/0029-never-write-secrets-to-files.md +61 -0
- package/docs/lessons/0030-cache-merge-not-replace.md +62 -0
- package/docs/lessons/0031-verify-units-at-boundaries.md +66 -0
- package/docs/lessons/0032-module-lifecycle-subscribe-unsubscribe.md +89 -0
- package/docs/lessons/0033-async-iteration-mutable-snapshot.md +72 -0
- package/docs/lessons/0034-caller-missing-await-silent-discard.md +65 -0
- package/docs/lessons/0035-duplicate-registration-silent-overwrite.md +85 -0
- package/docs/lessons/0036-websocket-dirty-disconnect.md +33 -0
- package/docs/lessons/0037-parallel-agents-worktree-corruption.md +31 -0
- package/docs/lessons/0038-subscribe-no-stored-ref.md +36 -0
- package/docs/lessons/0039-fallback-or-default-hides-bugs.md +34 -0
- package/docs/lessons/0040-event-firehose-filter-first.md +36 -0
- package/docs/lessons/0041-ambiguous-base-dir-path-nesting.md +32 -0
- package/docs/lessons/0042-spec-compliance-insufficient.md +36 -0
- package/docs/lessons/0043-exact-count-extensible-collections.md +32 -0
- package/docs/lessons/0044-relative-file-deps-worktree.md +39 -0
- package/docs/lessons/0045-iterative-design-improvement.md +33 -0
- package/docs/lessons/0046-plan-assertion-math-bugs.md +38 -0
- package/docs/lessons/0047-pytest-single-threaded-default.md +37 -0
- package/docs/lessons/0048-integration-wiring-batch.md +40 -0
- package/docs/lessons/0049-ab-verification.md +41 -0
- package/docs/lessons/0050-editing-sourced-files-during-execution.md +33 -0
- package/docs/lessons/0051-infrastructure-fixes-cant-self-heal.md +30 -0
- package/docs/lessons/0052-uncommitted-changes-poison-quality-gates.md +31 -0
- package/docs/lessons/0053-jq-compact-flag-inconsistency.md +31 -0
- package/docs/lessons/0054-parser-matches-inside-code-blocks.md +30 -0
- package/docs/lessons/0055-agents-compensate-for-garbled-prompts.md +31 -0
- package/docs/lessons/0056-grep-count-exit-code-on-zero.md +42 -0
- package/docs/lessons/0057-new-artifacts-break-git-clean-gates.md +42 -0
- package/docs/lessons/0058-dead-config-keys-never-consumed.md +49 -0
- package/docs/lessons/0059-contract-test-shared-structures.md +53 -0
- package/docs/lessons/0060-set-e-silent-death-in-runners.md +53 -0
- package/docs/lessons/0061-context-injection-dirty-state.md +50 -0
- package/docs/lessons/0062-sibling-bug-neighborhood-scan.md +29 -0
- package/docs/lessons/0063-one-flag-two-lifetimes.md +31 -0
- package/docs/lessons/0064-test-passes-wrong-reason.md +31 -0
- package/docs/lessons/0065-pipefail-grep-count-double-output.md +39 -0
- package/docs/lessons/0066-local-keyword-outside-function.md +37 -0
- package/docs/lessons/0067-stdin-hang-non-interactive-shell.md +36 -0
- package/docs/lessons/0068-agent-builds-wrong-thing-correctly.md +31 -0
- package/docs/lessons/0069-plan-quality-dominates-execution.md +30 -0
- package/docs/lessons/0070-spec-echo-back-prevents-drift.md +31 -0
- package/docs/lessons/0071-positive-instructions-outperform-negative.md +30 -0
- package/docs/lessons/0072-lost-in-the-middle-context-placement.md +30 -0
- package/docs/lessons/0073-unscoped-lessons-cause-false-positives.md +30 -0
- package/docs/lessons/0074-stale-context-injection-wrong-batch.md +32 -0
- package/docs/lessons/0075-research-artifacts-must-persist.md +32 -0
- package/docs/lessons/0076-wrong-decomposition-contaminates-downstream.md +30 -0
- package/docs/lessons/0077-cherry-pick-merges-need-manual-resolution.md +30 -0
- package/docs/lessons/0078-static-review-without-live-test.md +30 -0
- package/docs/lessons/0079-integration-wiring-batch-required.md +32 -0
- package/docs/lessons/FRAMEWORK.md +161 -0
- package/docs/lessons/SUMMARY.md +201 -0
- package/docs/lessons/TEMPLATE.md +85 -0
- package/docs/plans/2026-02-21-code-factory-v2-design.md +204 -0
- package/docs/plans/2026-02-21-code-factory-v2-implementation-plan.md +2189 -0
- package/docs/plans/2026-02-21-code-factory-v2-phase4-design.md +537 -0
- package/docs/plans/2026-02-21-code-factory-v2-phase4-implementation-plan.md +2012 -0
- package/docs/plans/2026-02-21-hardening-pass-design.md +108 -0
- package/docs/plans/2026-02-21-hardening-pass-plan.md +1378 -0
- package/docs/plans/2026-02-21-mab-research-report.md +406 -0
- package/docs/plans/2026-02-21-marketplace-restructure-design.md +240 -0
- package/docs/plans/2026-02-21-marketplace-restructure-plan.md +832 -0
- package/docs/plans/2026-02-21-phase4-completion-plan.md +697 -0
- package/docs/plans/2026-02-21-validator-suite-design.md +148 -0
- package/docs/plans/2026-02-21-validator-suite-plan.md +540 -0
- package/docs/plans/2026-02-22-mab-research-round2.md +556 -0
- package/docs/plans/2026-02-22-mab-run-design.md +462 -0
- package/docs/plans/2026-02-22-mab-run-plan.md +2046 -0
- package/docs/plans/2026-02-22-operations-design-methodology-research.md +681 -0
- package/docs/plans/2026-02-22-research-agent-failure-taxonomy.md +532 -0
- package/docs/plans/2026-02-22-research-code-guideline-policies.md +886 -0
- package/docs/plans/2026-02-22-research-codebase-audit-refactoring.md +908 -0
- package/docs/plans/2026-02-22-research-coding-standards-documentation.md +541 -0
- package/docs/plans/2026-02-22-research-competitive-landscape.md +687 -0
- package/docs/plans/2026-02-22-research-comprehensive-testing.md +1076 -0
- package/docs/plans/2026-02-22-research-context-utilization.md +459 -0
- package/docs/plans/2026-02-22-research-cost-quality-tradeoff.md +548 -0
- package/docs/plans/2026-02-22-research-lesson-transferability.md +508 -0
- package/docs/plans/2026-02-22-research-multi-agent-coordination.md +312 -0
- package/docs/plans/2026-02-22-research-phase-integration.md +602 -0
- package/docs/plans/2026-02-22-research-plan-quality.md +428 -0
- package/docs/plans/2026-02-22-research-prompt-engineering.md +558 -0
- package/docs/plans/2026-02-22-research-unconventional-perspectives.md +528 -0
- package/docs/plans/2026-02-22-research-user-adoption.md +638 -0
- package/docs/plans/2026-02-22-research-verification-effectiveness.md +433 -0
- package/docs/plans/2026-02-23-agent-suite-design.md +299 -0
- package/docs/plans/2026-02-23-agent-suite-plan.md +578 -0
- package/docs/plans/2026-02-23-phase3-cost-infrastructure-design.md +148 -0
- package/docs/plans/2026-02-23-phase3-cost-infrastructure-plan.md +1062 -0
- package/docs/plans/2026-02-23-research-bash-expert-agent.md +543 -0
- package/docs/plans/2026-02-23-research-dependency-auditor-agent.md +564 -0
- package/docs/plans/2026-02-23-research-improving-existing-agents.md +503 -0
- package/docs/plans/2026-02-23-research-integration-tester-agent.md +454 -0
- package/docs/plans/2026-02-23-research-python-expert-agent.md +429 -0
- package/docs/plans/2026-02-23-research-service-monitor-agent.md +425 -0
- package/docs/plans/2026-02-23-research-shell-expert-agent.md +533 -0
- package/docs/plans/2026-02-23-roadmap-to-completion.md +530 -0
- package/docs/plans/2026-02-24-headless-module-split-design.md +98 -0
- package/docs/plans/2026-02-24-headless-module-split.md +443 -0
- package/docs/plans/2026-02-24-lesson-scope-metadata-design.md +228 -0
- package/docs/plans/2026-02-24-lesson-scope-metadata-plan.md +968 -0
- package/docs/plans/2026-02-24-npm-packaging-design.md +841 -0
- package/docs/plans/2026-02-24-npm-packaging-plan.md +1965 -0
- package/docs/plans/audit-findings.md +186 -0
- package/docs/telegram-notification-format.md +98 -0
- package/examples/example-plan.md +51 -0
- package/examples/example-prd.json +72 -0
- package/examples/example-roadmap.md +33 -0
- package/examples/quickstart-plan.md +63 -0
- package/hooks/hooks.json +26 -0
- package/hooks/setup-symlinks.sh +48 -0
- package/hooks/stop-hook.sh +135 -0
- package/package.json +47 -0
- package/policies/bash.md +71 -0
- package/policies/python.md +71 -0
- package/policies/testing.md +61 -0
- package/policies/universal.md +60 -0
- package/scripts/analyze-report.sh +97 -0
- package/scripts/architecture-map.sh +145 -0
- package/scripts/auto-compound.sh +273 -0
- package/scripts/batch-audit.sh +42 -0
- package/scripts/batch-test.sh +101 -0
- package/scripts/entropy-audit.sh +221 -0
- package/scripts/failure-digest.sh +51 -0
- package/scripts/generate-ast-rules.sh +96 -0
- package/scripts/init.sh +112 -0
- package/scripts/lesson-check.sh +428 -0
- package/scripts/lib/common.sh +61 -0
- package/scripts/lib/cost-tracking.sh +153 -0
- package/scripts/lib/ollama.sh +60 -0
- package/scripts/lib/progress-writer.sh +128 -0
- package/scripts/lib/run-plan-context.sh +215 -0
- package/scripts/lib/run-plan-echo-back.sh +231 -0
- package/scripts/lib/run-plan-headless.sh +396 -0
- package/scripts/lib/run-plan-notify.sh +57 -0
- package/scripts/lib/run-plan-parser.sh +81 -0
- package/scripts/lib/run-plan-prompt.sh +215 -0
- package/scripts/lib/run-plan-quality-gate.sh +132 -0
- package/scripts/lib/run-plan-routing.sh +315 -0
- package/scripts/lib/run-plan-sampling.sh +170 -0
- package/scripts/lib/run-plan-scoring.sh +146 -0
- package/scripts/lib/run-plan-state.sh +142 -0
- package/scripts/lib/run-plan-team.sh +199 -0
- package/scripts/lib/telegram.sh +54 -0
- package/scripts/lib/thompson-sampling.sh +176 -0
- package/scripts/license-check.sh +74 -0
- package/scripts/mab-run.sh +575 -0
- package/scripts/module-size-check.sh +146 -0
- package/scripts/patterns/async-no-await.yml +5 -0
- package/scripts/patterns/bare-except.yml +6 -0
- package/scripts/patterns/empty-catch.yml +6 -0
- package/scripts/patterns/hardcoded-localhost.yml +9 -0
- package/scripts/patterns/retry-loop-no-backoff.yml +12 -0
- package/scripts/pipeline-status.sh +197 -0
- package/scripts/policy-check.sh +226 -0
- package/scripts/prior-art-search.sh +133 -0
- package/scripts/promote-mab-lessons.sh +126 -0
- package/scripts/prompts/agent-a-superpowers.md +29 -0
- package/scripts/prompts/agent-b-ralph.md +29 -0
- package/scripts/prompts/judge-agent.md +61 -0
- package/scripts/prompts/planner-agent.md +44 -0
- package/scripts/pull-community-lessons.sh +90 -0
- package/scripts/quality-gate.sh +266 -0
- package/scripts/research-gate.sh +90 -0
- package/scripts/run-plan.sh +329 -0
- package/scripts/scope-infer.sh +159 -0
- package/scripts/setup-ralph-loop.sh +155 -0
- package/scripts/telemetry.sh +230 -0
- package/scripts/tests/run-all-tests.sh +52 -0
- package/scripts/tests/test-act-cli.sh +46 -0
- package/scripts/tests/test-agents-md.sh +87 -0
- package/scripts/tests/test-analyze-report.sh +114 -0
- package/scripts/tests/test-architecture-map.sh +89 -0
- package/scripts/tests/test-auto-compound.sh +169 -0
- package/scripts/tests/test-batch-test.sh +65 -0
- package/scripts/tests/test-benchmark-runner.sh +25 -0
- package/scripts/tests/test-common.sh +168 -0
- package/scripts/tests/test-cost-tracking.sh +158 -0
- package/scripts/tests/test-echo-back.sh +180 -0
- package/scripts/tests/test-entropy-audit.sh +146 -0
- package/scripts/tests/test-failure-digest.sh +66 -0
- package/scripts/tests/test-generate-ast-rules.sh +145 -0
- package/scripts/tests/test-helpers.sh +82 -0
- package/scripts/tests/test-init.sh +47 -0
- package/scripts/tests/test-lesson-check.sh +278 -0
- package/scripts/tests/test-lesson-local.sh +55 -0
- package/scripts/tests/test-license-check.sh +109 -0
- package/scripts/tests/test-mab-run.sh +182 -0
- package/scripts/tests/test-ollama-lib.sh +49 -0
- package/scripts/tests/test-ollama.sh +60 -0
- package/scripts/tests/test-pipeline-status.sh +198 -0
- package/scripts/tests/test-policy-check.sh +124 -0
- package/scripts/tests/test-prior-art-search.sh +96 -0
- package/scripts/tests/test-progress-writer.sh +140 -0
- package/scripts/tests/test-promote-mab-lessons.sh +110 -0
- package/scripts/tests/test-pull-community-lessons.sh +149 -0
- package/scripts/tests/test-quality-gate.sh +241 -0
- package/scripts/tests/test-research-gate.sh +132 -0
- package/scripts/tests/test-run-plan-cli.sh +86 -0
- package/scripts/tests/test-run-plan-context.sh +305 -0
- package/scripts/tests/test-run-plan-e2e.sh +153 -0
- package/scripts/tests/test-run-plan-headless.sh +424 -0
- package/scripts/tests/test-run-plan-notify.sh +124 -0
- package/scripts/tests/test-run-plan-parser.sh +217 -0
- package/scripts/tests/test-run-plan-prompt.sh +254 -0
- package/scripts/tests/test-run-plan-quality-gate.sh +222 -0
- package/scripts/tests/test-run-plan-routing.sh +178 -0
- package/scripts/tests/test-run-plan-scoring.sh +148 -0
- package/scripts/tests/test-run-plan-state.sh +261 -0
- package/scripts/tests/test-run-plan-team.sh +157 -0
- package/scripts/tests/test-scope-infer.sh +150 -0
- package/scripts/tests/test-setup-ralph-loop.sh +63 -0
- package/scripts/tests/test-telegram-env.sh +38 -0
- package/scripts/tests/test-telegram.sh +121 -0
- package/scripts/tests/test-telemetry.sh +46 -0
- package/scripts/tests/test-thompson-sampling.sh +139 -0
- package/scripts/tests/test-validate-all.sh +60 -0
- package/scripts/tests/test-validate-commands.sh +89 -0
- package/scripts/tests/test-validate-hooks.sh +98 -0
- package/scripts/tests/test-validate-lessons.sh +150 -0
- package/scripts/tests/test-validate-plan-quality.sh +235 -0
- package/scripts/tests/test-validate-plans.sh +187 -0
- package/scripts/tests/test-validate-plugin.sh +106 -0
- package/scripts/tests/test-validate-prd.sh +184 -0
- package/scripts/tests/test-validate-skills.sh +134 -0
- package/scripts/validate-all.sh +57 -0
- package/scripts/validate-commands.sh +67 -0
- package/scripts/validate-hooks.sh +89 -0
- package/scripts/validate-lessons.sh +98 -0
- package/scripts/validate-plan-quality.sh +369 -0
- package/scripts/validate-plans.sh +120 -0
- package/scripts/validate-plugin.sh +86 -0
- package/scripts/validate-policies.sh +42 -0
- package/scripts/validate-prd.sh +118 -0
- package/scripts/validate-skills.sh +96 -0
- package/skills/autocode/SKILL.md +285 -0
- package/skills/autocode/ab-verification.md +51 -0
- package/skills/autocode/code-quality-standards.md +37 -0
- package/skills/autocode/competitive-mode.md +364 -0
- package/skills/brainstorming/SKILL.md +97 -0
- package/skills/capture-lesson/SKILL.md +187 -0
- package/skills/check-lessons/SKILL.md +116 -0
- package/skills/dispatching-parallel-agents/SKILL.md +110 -0
- package/skills/executing-plans/SKILL.md +85 -0
- package/skills/finishing-a-development-branch/SKILL.md +201 -0
- package/skills/receiving-code-review/SKILL.md +72 -0
- package/skills/requesting-code-review/SKILL.md +59 -0
- package/skills/requesting-code-review/code-reviewer.md +82 -0
- package/skills/research/SKILL.md +145 -0
- package/skills/roadmap/SKILL.md +115 -0
- package/skills/subagent-driven-development/SKILL.md +98 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +18 -0
- package/skills/subagent-driven-development/implementer-prompt.md +73 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +57 -0
- package/skills/systematic-debugging/SKILL.md +134 -0
- package/skills/systematic-debugging/condition-based-waiting.md +64 -0
- package/skills/systematic-debugging/defense-in-depth.md +32 -0
- package/skills/systematic-debugging/root-cause-tracing.md +55 -0
- package/skills/test-driven-development/SKILL.md +167 -0
- package/skills/using-git-worktrees/SKILL.md +219 -0
- package/skills/using-superpowers/SKILL.md +54 -0
- package/skills/verification-before-completion/SKILL.md +140 -0
- package/skills/verify/SKILL.md +82 -0
- package/skills/writing-plans/SKILL.md +128 -0
- package/skills/writing-skills/SKILL.md +93 -0
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
# Research: Dependency Auditor Agent for 8-Repo Workspace
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-02-23
|
|
4
|
+
**Status:** Research complete
|
|
5
|
+
**Scope:** Tool survey + pattern synthesis for a Claude Code agent that audits 8 project repos (6 Python, 1 Node/Preact, 1 Docker) for outdated packages, CVEs, and license compliance
|
|
6
|
+
**Method:** Web search across 7 tool categories + codebase reconnaissance on all 8 target repos
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Executive Summary
|
|
11
|
+
|
|
12
|
+
BLUF: The dependency auditor agent should use a 3-tool stack per ecosystem — **pip-audit** (CVEs, Python), **npm audit** (CVEs, Node), **Trivy** (Docker + multi-ecosystem cross-check) — unified by **OSV-Scanner** as the JSON-normalized aggregator, with **pip-licenses** and **license-checker** for license compliance. Existing Claude Code command examples confirm this is a well-trodden slash-command pattern. The agent can cover all 8 repos in a single orchestrated run, producing a per-repo severity table and a workspace rollup.
|
|
13
|
+
|
|
14
|
+
Confidence: high on tool selection, medium on Docker-specific scanning (gpt-researcher is the only Docker repo and uses a Python base image, so pip-audit still applies inside).
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 1. Target Repo Inventory
|
|
19
|
+
|
|
20
|
+
Surveyed from `~/Documents/projects/`:
|
|
21
|
+
|
|
22
|
+
| Repo | Package Manager | Manifest Files | Ecosystem |
|
|
23
|
+
|------|----------------|----------------|-----------|
|
|
24
|
+
| `ha-aria` | pip (pyproject.toml) | `pyproject.toml` | Python |
|
|
25
|
+
| `notion-tools` | pip | `requirements.txt` | Python |
|
|
26
|
+
| `ollama-queue` | pip (pyproject.toml) | `pyproject.toml` | Python |
|
|
27
|
+
| `telegram-agent` | pip | `requirements.txt` | Python |
|
|
28
|
+
| `telegram-brief` | pip | `requirements.txt` | Python |
|
|
29
|
+
| `telegram-capture` | pip | `requirements.txt` | Python |
|
|
30
|
+
| `superhot-ui` | npm | `package.json` | Node/Preact |
|
|
31
|
+
| `gpt-researcher` | pip + Poetry + Docker | `pyproject.toml`, `requirements.txt`, `poetry.toml`, `Dockerfile` | Python + Docker |
|
|
32
|
+
|
|
33
|
+
Key observations:
|
|
34
|
+
- 6 pure Python repos, split between `requirements.txt` and `pyproject.toml` — pip-audit handles both natively
|
|
35
|
+
- 1 Node repo (`superhot-ui`) with minimal deps (only `esbuild` and `preact` as devDeps) — npm audit is sufficient
|
|
36
|
+
- 1 hybrid Docker repo (`gpt-researcher`) — Python base image means pip-audit applies inside, Trivy adds layer analysis
|
|
37
|
+
- No Go, Rust, or Java — tool selection can be narrow
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 2. Source Research: CVE Scanners
|
|
42
|
+
|
|
43
|
+
### 2.1 pip-audit (Python)
|
|
44
|
+
|
|
45
|
+
**Source:** [pip-audit on PyPI](https://pypi.org/project/pip-audit/) | [pypa/pip-audit on GitHub](https://github.com/pypa/pip-audit)
|
|
46
|
+
|
|
47
|
+
The official PyPA vulnerability scanner, Google-backed, no paid subscription required. Queries the OSV database via the PyPI JSON API and the GitHub Python Advisory Database.
|
|
48
|
+
|
|
49
|
+
**Key capabilities:**
|
|
50
|
+
- Scans requirements.txt, pyproject.toml, and installed environments
|
|
51
|
+
- `--format json` produces structured output with: `name`, `version`, `vulns[].id` (PYSEC IDs), `vulns[].aliases` (CVE + GHSA IDs), `vulns[].fix_versions`, `vulns[].description`
|
|
52
|
+
- `--fix` flag auto-installs minimal fix version; `--fix --dry-run` previews without installing
|
|
53
|
+
- `--output-format cyclonedx-json` for SBOM output
|
|
54
|
+
- Operates on a requirements file without needing an installed environment: `pip-audit -r requirements.txt`
|
|
55
|
+
|
|
56
|
+
**Limitation:** Does not include vulnerability severity ratings (CVSS scores). OSV-Scanner or Trivy required for severity.
|
|
57
|
+
|
|
58
|
+
**CLI patterns for the agent:**
|
|
59
|
+
```bash
|
|
60
|
+
pip-audit -r requirements.txt -f json -o audit-results.json
|
|
61
|
+
pip-audit --pyproject pyproject.toml -f json -o audit-results.json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2.2 Safety (Python, secondary)
|
|
65
|
+
|
|
66
|
+
**Source:** [safety on PyPI](https://pypi.org/project/safety/)
|
|
67
|
+
|
|
68
|
+
Safety checks against the PyUp Safety DB, which includes some CVEs not yet in OSV. Useful as a cross-reference but requires account for full database access since Safety 3.x. Not recommended as primary — pip-audit's OSV backend has better coverage and no auth requirement.
|
|
69
|
+
|
|
70
|
+
### 2.3 OSV-Scanner (cross-language, aggregator)
|
|
71
|
+
|
|
72
|
+
**Source:** [google/osv-scanner on GitHub](https://github.com/google/osv-scanner) | [OSV-Scanner V2 announcement](https://security.googleblog.com/2025/03/announcing-osv-scanner-v2-vulnerability.html)
|
|
73
|
+
|
|
74
|
+
Google's unified scanner querying osv.dev — the largest aggregated open source vulnerability database (NVD, GitHub Advisories, ecosystem-specific advisories).
|
|
75
|
+
|
|
76
|
+
**Key capabilities:**
|
|
77
|
+
- Supports 11+ language ecosystems and 19+ lockfile types in one tool
|
|
78
|
+
- Scans Python lockfiles (`requirements.txt`, `Pipfile.lock`, `poetry.lock`), npm lockfiles (`package-lock.json`, `yarn.lock`), and Docker images
|
|
79
|
+
- JSON output format: `osv-scanner --format json`
|
|
80
|
+
- V2 (March 2025): adds guided remediation for npm and Maven, container image scanning with layer analysis, interactive HTML reports
|
|
81
|
+
- Handles the `superhot-ui` package.json and all Python repos in a single scan command
|
|
82
|
+
|
|
83
|
+
**CLI patterns:**
|
|
84
|
+
```bash
|
|
85
|
+
# Scan all repos in one pass
|
|
86
|
+
osv-scanner scan --recursive /home/justin/Documents/projects/ --format json
|
|
87
|
+
|
|
88
|
+
# Scan single repo
|
|
89
|
+
osv-scanner scan --lockfile requirements.txt --format json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Why this is the aggregation layer:** Produces a single normalized JSON report across all 8 repos with consistent severity scoring. pip-audit is more Python-authoritative, but OSV-Scanner provides the cross-repo rollup.
|
|
93
|
+
|
|
94
|
+
### 2.4 npm audit (Node.js)
|
|
95
|
+
|
|
96
|
+
**Source:** [npm audit documentation](https://www.nodejs-security.com/blog/how-to-use-npm-audit)
|
|
97
|
+
|
|
98
|
+
Built-in to npm — no installation needed. Scans `package-lock.json` against the npm Advisory Database.
|
|
99
|
+
|
|
100
|
+
**Key capabilities:**
|
|
101
|
+
- `npm audit --json` produces structured output with severity, CVE IDs, CVSS scores, and fix recommendations
|
|
102
|
+
- `npm audit fix` auto-installs fixes; `npm audit fix --dry-run` previews
|
|
103
|
+
- For `superhot-ui`, which only has `esbuild` and `preact` as devDeps, audit run time is sub-second
|
|
104
|
+
- Limitation: requires `package-lock.json` to exist; `superhot-ui` uses no lockfile currently (check before running)
|
|
105
|
+
|
|
106
|
+
**CLI pattern:**
|
|
107
|
+
```bash
|
|
108
|
+
cd /home/justin/Documents/projects/superhot-ui
|
|
109
|
+
npm audit --json
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 2.5 Trivy (Docker + multi-ecosystem)
|
|
113
|
+
|
|
114
|
+
**Source:** [aquasecurity/trivy on GitHub](https://github.com/aquasecurity/trivy) | [Trivy docs](https://trivy.dev/)
|
|
115
|
+
|
|
116
|
+
Aqua Security's open source scanner. Covers containers, filesystems, Kubernetes, and code repositories. Best tool for the `gpt-researcher` Docker image.
|
|
117
|
+
|
|
118
|
+
**Key capabilities:**
|
|
119
|
+
- Scans Docker images with layer analysis: shows which layer introduced each vulnerability
|
|
120
|
+
- Supports Python (pip), Node.js (npm), Go, Java, and 15+ other ecosystems
|
|
121
|
+
- Detects OS-level CVEs (apt/dpkg) inside Docker images — critical for the `python:3.12-slim-bookworm` base in `gpt-researcher`
|
|
122
|
+
- `--format json` for machine-parseable output; `--format sarif` for GitHub Security tab integration
|
|
123
|
+
- `--severity HIGH,CRITICAL` to filter noise; `--exit-code 1` for CI blocking
|
|
124
|
+
|
|
125
|
+
**CLI patterns:**
|
|
126
|
+
```bash
|
|
127
|
+
# Scan Dockerfile context (builds and scans)
|
|
128
|
+
trivy image --format json gpt-researcher:local
|
|
129
|
+
|
|
130
|
+
# Scan filesystem without container build
|
|
131
|
+
trivy fs --format json /home/justin/Documents/projects/gpt-researcher/
|
|
132
|
+
|
|
133
|
+
# Scan Docker image for OS + Python CVEs
|
|
134
|
+
trivy image --scanners vuln --severity HIGH,CRITICAL --format json python:3.12-slim-bookworm
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 2.6 OWASP dep-scan (secondary, multi-ecosystem)
|
|
138
|
+
|
|
139
|
+
**Source:** [owasp-dep-scan/dep-scan on GitHub](https://github.com/owasp-dep-scan/dep-scan) | [OWASP dep-scan PyPI](https://pypi.org/project/owasp-depscan/)
|
|
140
|
+
|
|
141
|
+
Next-generation OWASP tool combining vulnerability scanning, license checking, and reachability analysis in one tool. Installable via pip (`pip install owasp-depscan`) or Docker.
|
|
142
|
+
|
|
143
|
+
**Key capabilities:**
|
|
144
|
+
- Supports Python, JavaScript, Java, Go, and more
|
|
145
|
+
- Includes license compliance checking alongside CVE detection
|
|
146
|
+
- Reachability analysis for Python, JavaScript, TypeScript — distinguishes actually-called vulnerable code from unused deps
|
|
147
|
+
- Reports in JSON, HTML, SARIF, CycloneDX
|
|
148
|
+
- Docker mode: `docker run --rm -v $PWD:/app ghcr.io/owasp-dep-scan/dep-scan depscan --src /app`
|
|
149
|
+
|
|
150
|
+
**Assessment:** More complex setup than pip-audit + OSV-Scanner combo. The reachability analysis is genuinely valuable for ha-aria (large codebase), but adds operational overhead. Classify as optional enhancement, not baseline.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 3. Source Research: License Compliance
|
|
155
|
+
|
|
156
|
+
### 3.1 pip-licenses (Python)
|
|
157
|
+
|
|
158
|
+
**Source:** [pip-licenses on PyPI](https://pypi.org/project/pip-licenses/)
|
|
159
|
+
|
|
160
|
+
The standard Python license inventory tool.
|
|
161
|
+
|
|
162
|
+
**Key capabilities:**
|
|
163
|
+
- Outputs per-package license info in JSON, Markdown, CSV, HTML formats
|
|
164
|
+
- Detection strategy: mixed-mode by default (Trove classifiers first, then package metadata)
|
|
165
|
+
- `--from=mixed` is default and most accurate
|
|
166
|
+
- `--format json --with-urls --with-description` for full metadata
|
|
167
|
+
- `--fail-on "GPL"` to exit non-zero if GPL-licensed deps found (CI-blocking)
|
|
168
|
+
- `--allow-only "MIT;Apache Software License;BSD License;ISC License"` to enforce allowlist
|
|
169
|
+
|
|
170
|
+
**Limitation:** Must run inside a virtualenv where deps are installed; cannot operate on requirements.txt without installation.
|
|
171
|
+
|
|
172
|
+
**CLI pattern:**
|
|
173
|
+
```bash
|
|
174
|
+
# Inside each repo's .venv
|
|
175
|
+
.venv/bin/pip-licenses --format json --with-urls --fail-on "GPL-3.0"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**For the agent:** Run per-repo after activating the virtualenv. Agent should detect venv path from `.venv/`, `venv/`, or `env/`.
|
|
179
|
+
|
|
180
|
+
### 3.2 pip-license-checker (Python + JS)
|
|
181
|
+
|
|
182
|
+
**Source:** [pilosus/pip-license-checker on GitHub](https://github.com/pilosus/pip-license-checker) | [pilosus/action-pip-license-checker](https://github.com/pilosus/action-pip-license-checker)
|
|
183
|
+
|
|
184
|
+
Detects license types (permissive, copyleft, proprietary) for PyPI and npm packages. Supports Python, JavaScript, iOS, and Android — unique in spanning ecosystems.
|
|
185
|
+
|
|
186
|
+
**Key capabilities:**
|
|
187
|
+
- Works on requirements.txt directly (no venv installation needed) — advantage over pip-licenses
|
|
188
|
+
- Classifies licenses into permissive / weak-copyleft / strong-copyleft / proprietary
|
|
189
|
+
- Supports `--fail-on-copyleft` and `--fail-on-proprietary` flags
|
|
190
|
+
- GitHub Action available for CI integration
|
|
191
|
+
|
|
192
|
+
**Assessment:** Better than pip-licenses for the license-type classification use case (permissive vs. copyleft), but pip-licenses is better for generating the full license inventory report. Use both: pip-license-checker for compliance gating, pip-licenses for the report.
|
|
193
|
+
|
|
194
|
+
### 3.3 license-checker (Node.js)
|
|
195
|
+
|
|
196
|
+
**Source:** [license-checker npm package](https://www.npmjs.com/package/license-checker)
|
|
197
|
+
|
|
198
|
+
Standard Node.js license inventory tool.
|
|
199
|
+
|
|
200
|
+
**Key capabilities:**
|
|
201
|
+
- `license-checker --json` for machine-parseable output
|
|
202
|
+
- `--excludePrivatePackages` to skip private packages
|
|
203
|
+
- `--onlyAllow "MIT;ISC;BSD"` for compliance enforcement (exits non-zero on violation)
|
|
204
|
+
- `--failOn "GPL"` to block on specific licenses
|
|
205
|
+
|
|
206
|
+
**CLI pattern:**
|
|
207
|
+
```bash
|
|
208
|
+
cd /home/justin/Documents/projects/superhot-ui
|
|
209
|
+
npx license-checker --json --onlyAllow "MIT;ISC;BSD;CC0"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 4. Source Research: Dependency Update Tools
|
|
215
|
+
|
|
216
|
+
### 4.1 Renovate (primary recommendation)
|
|
217
|
+
|
|
218
|
+
**Source:** [renovatebot/renovate on GitHub](https://github.com/renovatebot/renovate) | [Renovate vs Dependabot comparison](https://www.turbostarter.dev/blog/renovate-vs-dependabot-whats-the-best-tool-to-automate-your-dependency-updates)
|
|
219
|
+
|
|
220
|
+
The strongest Dependabot alternative. AGPL-3.0, self-hostable, supports GitHub, GitLab, Bitbucket, Azure DevOps.
|
|
221
|
+
|
|
222
|
+
**Advantages over Dependabot:**
|
|
223
|
+
- Dependency Dashboard — single issue showing all pending updates per repo
|
|
224
|
+
- Organization-level shared presets — define update rules once for all 8 repos
|
|
225
|
+
- Per-package, per-manager, per-repo update rules
|
|
226
|
+
- Grouping rules — batch related updates into one PR (e.g., "all pytest-related updates")
|
|
227
|
+
- Supports pyproject.toml, requirements.txt, package.json, Dockerfile (base image updates)
|
|
228
|
+
|
|
229
|
+
**Limitation for this use case:** Renovate generates PRs, it doesn't produce audit reports. The auditor agent is the scanner; Renovate would be the automated fixer. These are complementary, not competing.
|
|
230
|
+
|
|
231
|
+
**Assessment for this project:** All 8 repos are private. Renovate can run self-hosted via `npx renovate` or as a cron job. Worth noting in the agent design as the "automated fix" companion to the audit agent's "detect" role. Not in scope for the auditor agent itself.
|
|
232
|
+
|
|
233
|
+
### 4.2 pip-compile / pip-tools (Python update workflow)
|
|
234
|
+
|
|
235
|
+
**Source:** Standard Python tooling
|
|
236
|
+
|
|
237
|
+
`pip-compile` from pip-tools upgrades requirements.txt files to latest compatible versions and generates pinned lockfiles. The agent can surface outdated packages via `pip list --outdated --format json` without pip-tools, but pip-tools provides the safe upgrade path.
|
|
238
|
+
|
|
239
|
+
**CLI pattern for the agent (detect only):**
|
|
240
|
+
```bash
|
|
241
|
+
pip list --outdated --format json
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### 4.3 npm-check-updates (Node.js)
|
|
245
|
+
|
|
246
|
+
**Source:** Standard npm ecosystem
|
|
247
|
+
|
|
248
|
+
`ncu` (npm-check-updates) lists packages with available updates beyond what `package.json` allows.
|
|
249
|
+
|
|
250
|
+
**CLI pattern:**
|
|
251
|
+
```bash
|
|
252
|
+
npx npm-check-updates --jsonUpgraded
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 5. Source Research: SBOM Generators
|
|
258
|
+
|
|
259
|
+
### 5.1 Syft (multi-ecosystem)
|
|
260
|
+
|
|
261
|
+
**Source:** [anchore/syft on GitHub](https://github.com/anchore/syft)
|
|
262
|
+
|
|
263
|
+
Anchore's SBOM generator. Supports Python, Go, Java, JavaScript, Ruby, Rust, PHP, .NET, and container images.
|
|
264
|
+
|
|
265
|
+
**Key capabilities:**
|
|
266
|
+
- Output formats: CycloneDX JSON, SPDX JSON, Syft JSON
|
|
267
|
+
- Works on project directories and container images
|
|
268
|
+
- Integrates with Grype (Anchore's vulnerability scanner) for CVE correlation against the SBOM
|
|
269
|
+
|
|
270
|
+
**CLI patterns:**
|
|
271
|
+
```bash
|
|
272
|
+
syft /home/justin/Documents/projects/ha-aria -o cyclonedx-json=ha-aria-sbom.json
|
|
273
|
+
syft ./gpt-researcher -o spdx-json=gpt-researcher-sbom.json
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### 5.2 CycloneDX (ecosystem-specific)
|
|
277
|
+
|
|
278
|
+
**Source:** [CycloneDX/cyclonedx-python on GitHub](https://github.com/CycloneDX/cyclonedx-python) | [CycloneDX/cyclonedx-node-npm](https://github.com/CycloneDX/cyclonedx-node-npm)
|
|
279
|
+
|
|
280
|
+
The OWASP CycloneDX standard has official generators for Python and npm. More accurate than Syft for single-ecosystem repos.
|
|
281
|
+
|
|
282
|
+
**CLI patterns:**
|
|
283
|
+
```bash
|
|
284
|
+
# Python — from requirements.txt
|
|
285
|
+
cyclonedx-py requirements -r requirements.txt -o bom.json
|
|
286
|
+
|
|
287
|
+
# Node — from package-lock.json
|
|
288
|
+
cyclonedx-npm --package-lock-only --output-file bom.json
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Assessment for this project:** SBOM generation is not a core requirement for the auditor agent — it's useful for downstream tooling (Grype, Dependency-Track). Mark as optional output format. The auditor agent's primary output is a human-readable severity report and a JSON summary for programmatic use.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## 6. Source Research: Claude Code Agent Patterns
|
|
296
|
+
|
|
297
|
+
### 6.1 Existing Claude Code Command Suites
|
|
298
|
+
|
|
299
|
+
**Source:** [qdhenry/Claude-Command-Suite on GitHub](https://github.com/qdhenry/Claude-Command-Suite) | [wshobson/commands on GitHub](https://github.com/wshobson/commands)
|
|
300
|
+
|
|
301
|
+
The community has established these dependency audit patterns in Claude Code slash commands:
|
|
302
|
+
|
|
303
|
+
**From Claude-Command-Suite:**
|
|
304
|
+
- `/security:dependency-audit` — dedicated command for checking outdated dependencies
|
|
305
|
+
- Integrates with Bandit, Safety, Trivy, Semgrep, Snyk, and GitGuardian
|
|
306
|
+
|
|
307
|
+
**From wshobson/commands:**
|
|
308
|
+
- `/tools:deps-audit` — examines security vulnerabilities, license compliance, and version conflicts
|
|
309
|
+
- `/tools:deps-upgrade` — manages version updates with breaking change detection and rollback support
|
|
310
|
+
- Tool integrations listed: Bandit, Safety, Trivy, Semgrep, Snyk, GitGuardian
|
|
311
|
+
|
|
312
|
+
**Pattern confirmed:** Community separates "audit" (read-only detection) from "upgrade" (state-changing fix) into distinct commands. Adopt this separation.
|
|
313
|
+
|
|
314
|
+
### 6.2 Existing Lesson Scanner Agent (Internal Reference)
|
|
315
|
+
|
|
316
|
+
The `lesson-scanner.md` agent in this toolkit (at `agents/lesson-scanner.md`) provides the structural template:
|
|
317
|
+
|
|
318
|
+
1. **Input:** project root directory
|
|
319
|
+
2. **Step 1:** Load configuration (lessons from files; for auditor: tool availability check)
|
|
320
|
+
3. **Step 2:** Detect project type (Python/Node/Docker from manifest files)
|
|
321
|
+
4. **Step 3:** Run appropriate tools per ecosystem
|
|
322
|
+
5. **Step 4:** Normalize results
|
|
323
|
+
6. **Step 5:** Report with severity tiers (CRITICAL/HIGH/MEDIUM/LOW)
|
|
324
|
+
|
|
325
|
+
Key design principles from lesson-scanner to adopt:
|
|
326
|
+
- Dynamic dispatch based on detected project type, not hardcoded paths
|
|
327
|
+
- "Do not hallucinate findings" — report only what tools emit
|
|
328
|
+
- Structured tabular output with actionable fix guidance
|
|
329
|
+
- Run ALL checks even if earlier ones find issues
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## 7. Cross-Cutting Synthesis
|
|
334
|
+
|
|
335
|
+
### 7.1 Tool Coverage Matrix
|
|
336
|
+
|
|
337
|
+
| Repo | CVE Scanner | License Checker | Outdated Packages | SBOM (optional) |
|
|
338
|
+
|------|-------------|-----------------|-------------------|-----------------|
|
|
339
|
+
| ha-aria | pip-audit + OSV-Scanner | pip-licenses | pip list --outdated | Syft/CycloneDX |
|
|
340
|
+
| notion-tools | pip-audit + OSV-Scanner | pip-licenses | pip list --outdated | Syft/CycloneDX |
|
|
341
|
+
| ollama-queue | pip-audit + OSV-Scanner | pip-licenses | pip list --outdated | Syft/CycloneDX |
|
|
342
|
+
| telegram-agent | pip-audit + OSV-Scanner | pip-licenses | pip list --outdated | Syft/CycloneDX |
|
|
343
|
+
| telegram-brief | pip-audit + OSV-Scanner | pip-licenses | pip list --outdated | Syft/CycloneDX |
|
|
344
|
+
| telegram-capture | pip-audit + OSV-Scanner | pip-licenses | pip list --outdated | Syft/CycloneDX |
|
|
345
|
+
| superhot-ui | npm audit + OSV-Scanner | license-checker | ncu | CycloneDX npm |
|
|
346
|
+
| gpt-researcher | pip-audit + Trivy + OSV-Scanner | pip-licenses | pip list --outdated | Syft |
|
|
347
|
+
|
|
348
|
+
### 7.2 Key Patterns to Adopt
|
|
349
|
+
|
|
350
|
+
**Pattern 1: Two-pass CVE scanning (per-ecosystem + cross-language)**
|
|
351
|
+
Run pip-audit/npm audit first for ecosystem-authoritative results, then OSV-Scanner for normalized aggregation. OSV-Scanner catches some CVEs the per-ecosystem tools miss (especially newer disclosures).
|
|
352
|
+
|
|
353
|
+
**Pattern 2: JSON output everywhere**
|
|
354
|
+
Every tool should emit `--format json` or `--json`. Agent parses JSON, not human-readable output. This makes the reporting layer independent of tool output format changes.
|
|
355
|
+
|
|
356
|
+
**Pattern 3: Severity gating**
|
|
357
|
+
- CRITICAL/HIGH: block and report immediately (map to lesson-scanner BLOCKER tier)
|
|
358
|
+
- MEDIUM: report as SHOULD-FIX
|
|
359
|
+
- LOW/INFORMATIONAL: report as NICE-TO-HAVE
|
|
360
|
+
- Use `--severity HIGH,CRITICAL` to suppress LOW noise in CI mode
|
|
361
|
+
|
|
362
|
+
**Pattern 4: Detect-then-fix separation**
|
|
363
|
+
The auditor agent is read-only. It does not `pip install`, `npm audit fix`, or modify any files. Output is a report + optional JSON summary. Fixes are a separate workflow (either manual or Renovate-driven).
|
|
364
|
+
|
|
365
|
+
**Pattern 5: venv-aware Python scanning**
|
|
366
|
+
pip-audit and pip-licenses must run inside the correct virtualenv per repo. The agent needs to detect the venv path (`ls .venv/bin/pip-audit 2>/dev/null || ls venv/bin/pip-audit 2>/dev/null`) and invoke tools through that path. If no venv exists, fall back to scanning the manifest file directly (`pip-audit -r requirements.txt`).
|
|
367
|
+
|
|
368
|
+
**Pattern 6: Outdated != vulnerable**
|
|
369
|
+
Separate outdated packages (version drift) from vulnerable packages (known CVE). These are different signals with different urgency. Outdated = maintenance debt; CVE = security risk.
|
|
370
|
+
|
|
371
|
+
**Pattern 7: License allowlist enforcement**
|
|
372
|
+
Define a workspace-level allowlist (MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, Python Software Foundation, CC0). Any dep outside the allowlist is flagged. GPL-3.0 and AGPL are blockers for commercial code.
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## 8. Recommended Agent Structure
|
|
377
|
+
|
|
378
|
+
### 8.1 Agent Identity
|
|
379
|
+
|
|
380
|
+
```yaml
|
|
381
|
+
name: dependency-auditor
|
|
382
|
+
description: Scans all 8 project repos for CVEs, outdated packages, and license compliance.
|
|
383
|
+
Produces a per-repo severity table and workspace rollup. Read-only — no packages
|
|
384
|
+
are installed or updated.
|
|
385
|
+
tools: Bash, Read, Glob, Grep
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### 8.2 Execution Steps
|
|
389
|
+
|
|
390
|
+
**Step 0: Tool availability check**
|
|
391
|
+
```bash
|
|
392
|
+
which pip-audit osv-scanner trivy npm npx 2>/dev/null
|
|
393
|
+
```
|
|
394
|
+
Report which tools are available. If pip-audit is missing, install it: `pip install pip-audit`. OSV-Scanner and Trivy require separate installation (flag if absent).
|
|
395
|
+
|
|
396
|
+
**Step 1: Repo detection**
|
|
397
|
+
For each repo under `~/Documents/projects/`, detect:
|
|
398
|
+
- Python: presence of `requirements.txt`, `pyproject.toml`, `Pipfile`, `poetry.lock`
|
|
399
|
+
- Node: presence of `package.json`
|
|
400
|
+
- Docker: presence of `Dockerfile`
|
|
401
|
+
- venv path: `.venv/`, `venv/`, `env/`
|
|
402
|
+
|
|
403
|
+
Exclude: `_archived/`, `autonomous-coding-toolkit/` (toolkit itself, no runtime deps).
|
|
404
|
+
|
|
405
|
+
**Step 2: CVE scanning (per repo)**
|
|
406
|
+
|
|
407
|
+
For Python repos:
|
|
408
|
+
```bash
|
|
409
|
+
# With venv
|
|
410
|
+
.venv/bin/pip-audit -f json 2>/dev/null || pip-audit -r requirements.txt -f json
|
|
411
|
+
|
|
412
|
+
# With pyproject.toml
|
|
413
|
+
pip-audit --pyproject pyproject.toml -f json
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
For Node repos:
|
|
417
|
+
```bash
|
|
418
|
+
npm audit --json
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
For Docker repos (additional pass):
|
|
422
|
+
```bash
|
|
423
|
+
trivy fs --format json --severity HIGH,CRITICAL .
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
**Step 3: CVE aggregation (OSV-Scanner)**
|
|
427
|
+
```bash
|
|
428
|
+
osv-scanner scan --recursive ~/Documents/projects/ --format json 2>/dev/null
|
|
429
|
+
```
|
|
430
|
+
Cross-reference with per-ecosystem results. OSV output is the source of truth for severity scores.
|
|
431
|
+
|
|
432
|
+
**Step 4: Outdated package detection (per repo)**
|
|
433
|
+
|
|
434
|
+
For Python:
|
|
435
|
+
```bash
|
|
436
|
+
.venv/bin/pip list --outdated --format json 2>/dev/null
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
For Node:
|
|
440
|
+
```bash
|
|
441
|
+
npx npm-check-updates --jsonUpgraded 2>/dev/null
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
**Step 5: License compliance (per repo)**
|
|
445
|
+
|
|
446
|
+
For Python:
|
|
447
|
+
```bash
|
|
448
|
+
.venv/bin/pip-licenses --format json --with-urls 2>/dev/null
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
For Node:
|
|
452
|
+
```bash
|
|
453
|
+
npx license-checker --json 2>/dev/null
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Flag any dep outside: `["MIT", "Apache-2.0", "Apache Software License", "BSD-2-Clause", "BSD-3-Clause", "BSD License", "ISC", "Python Software Foundation License", "CC0-1.0", "Public Domain", "Unlicense"]`
|
|
457
|
+
|
|
458
|
+
**Step 6: Report**
|
|
459
|
+
|
|
460
|
+
```
|
|
461
|
+
## Dependency Audit Report
|
|
462
|
+
Workspace: ~/Documents/projects/
|
|
463
|
+
Scanned: <timestamp>
|
|
464
|
+
Repos scanned: 8
|
|
465
|
+
|
|
466
|
+
### CRITICAL / HIGH CVEs — Fix immediately
|
|
467
|
+
| Repo | Package | Version | CVE | Severity | Fix Version |
|
|
468
|
+
|------|---------|---------|-----|----------|-------------|
|
|
469
|
+
|
|
470
|
+
### MEDIUM CVEs — Fix this sprint
|
|
471
|
+
| Repo | Package | Version | CVE | Fix Version |
|
|
472
|
+
|------|---------|---------|-----|-------------|
|
|
473
|
+
|
|
474
|
+
### Outdated Packages (no known CVE)
|
|
475
|
+
| Repo | Package | Current | Latest | Drift |
|
|
476
|
+
|------|---------|---------|--------|-------|
|
|
477
|
+
|
|
478
|
+
### License Compliance Issues
|
|
479
|
+
| Repo | Package | License | Issue |
|
|
480
|
+
|------|---------|---------|-------|
|
|
481
|
+
|
|
482
|
+
### Workspace Rollup
|
|
483
|
+
- Total CVEs: N (X critical, Y high, Z medium)
|
|
484
|
+
- Total outdated packages: N
|
|
485
|
+
- License violations: N
|
|
486
|
+
- Cleanest repos: [list]
|
|
487
|
+
- Highest risk repos: [list]
|
|
488
|
+
|
|
489
|
+
### Recommended Fix Order
|
|
490
|
+
1. [Highest-severity finding with repo, package, fix version, pip install command]
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
### 8.3 Slash Command Definition
|
|
494
|
+
|
|
495
|
+
File: `~/.claude/commands/dep-audit.md` (global) or `commands/dep-audit.md` (toolkit)
|
|
496
|
+
|
|
497
|
+
```markdown
|
|
498
|
+
---
|
|
499
|
+
description: Audit all 8 project repos for CVEs, outdated packages, and license compliance
|
|
500
|
+
---
|
|
501
|
+
|
|
502
|
+
Invoke the dependency-auditor agent against ~/Documents/projects/.
|
|
503
|
+
Scan mode: $ARGUMENTS (options: all | <repo-name> | cve-only | license-only)
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### 8.4 Systemd Timer (optional)
|
|
507
|
+
|
|
508
|
+
Weekly scan via systemd user timer, writing JSON output to `~/Documents/projects/autonomous-coding-toolkit/logs/dep-audit-latest.json`. Alert via Telegram if CRITICAL CVEs found (using existing telegram-capture pipeline).
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## 9. Tool Installation Requirements
|
|
513
|
+
|
|
514
|
+
Tools not yet confirmed installed on this system:
|
|
515
|
+
|
|
516
|
+
| Tool | Install Command | Purpose |
|
|
517
|
+
|------|----------------|---------|
|
|
518
|
+
| pip-audit | `pip install pip-audit` | Python CVE scanning |
|
|
519
|
+
| OSV-Scanner | `curl -L https://github.com/google/osv-scanner/releases/latest/download/osv-scanner_linux_amd64 -o ~/.local/bin/osv-scanner && chmod +x ~/.local/bin/osv-scanner` | Cross-ecosystem aggregation |
|
|
520
|
+
| Trivy | `curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh \| sh -s -- -b ~/.local/bin` | Docker + OS CVE scanning |
|
|
521
|
+
| pip-licenses | `pip install pip-licenses` | Python license inventory |
|
|
522
|
+
| license-checker | `npx license-checker` (no install needed) | Node license inventory |
|
|
523
|
+
| npm-check-updates | `npx npm-check-updates` (no install needed) | Node outdated packages |
|
|
524
|
+
|
|
525
|
+
Note: Verify with `which pip-audit osv-scanner trivy` before agent execution.
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## 10. Open Questions / Pivot Triggers
|
|
530
|
+
|
|
531
|
+
1. **venv coverage gap:** If a Python repo has no `.venv/` (e.g., managed by Poetry or system-level install), pip-licenses cannot run. The agent must fall back to manifest-only scanning for that repo and flag the limitation.
|
|
532
|
+
|
|
533
|
+
2. **superhot-ui lockfile:** `superhot-ui` has `package.json` but may not have `package-lock.json` (repo uses minimal deps, lockfile may not be committed). npm audit requires a lockfile. Agent must check and prompt if missing: `cd superhot-ui && npm install --package-lock-only`.
|
|
534
|
+
|
|
535
|
+
3. **gpt-researcher Docker image:** Trivy image scanning requires a built Docker image. The agent should scan the Dockerfile filesystem path (`trivy fs .`) as a fallback when no image is built, accepting reduced accuracy for OS-level CVEs.
|
|
536
|
+
|
|
537
|
+
4. **OSV-Scanner V2 availability:** OSV-Scanner V2 was released March 2025. The agent should check version (`osv-scanner --version`) and note if V1 is installed (V2 has better guided remediation).
|
|
538
|
+
|
|
539
|
+
5. **Scope of license enforcement:** GPL-3.0 and AGPL-3.0 are blockers for commercial code but may be acceptable for personal tooling. Confirm allowlist policy before blocking.
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## Sources
|
|
544
|
+
|
|
545
|
+
- [pip-audit on PyPI](https://pypi.org/project/pip-audit/)
|
|
546
|
+
- [pypa/pip-audit on GitHub](https://github.com/pypa/pip-audit)
|
|
547
|
+
- [OSV-Scanner V2 announcement](https://security.googleblog.com/2025/03/announcing-osv-scanner-v2-vulnerability.html)
|
|
548
|
+
- [google/osv-scanner on GitHub](https://github.com/google/osv-scanner)
|
|
549
|
+
- [OSV open source vulnerability DB](https://osv.dev/)
|
|
550
|
+
- [safety on PyPI](https://pypi.org/project/safety/)
|
|
551
|
+
- [OWASP dep-scan](https://github.com/owasp-dep-scan/dep-scan)
|
|
552
|
+
- [aquasecurity/trivy on GitHub](https://github.com/aquasecurity/trivy)
|
|
553
|
+
- [Renovate vs Dependabot comparison](https://www.turbostarter.dev/blog/renovate-vs-dependabot-whats-the-best-tool-to-automate-your-dependency-updates)
|
|
554
|
+
- [renovatebot/renovate on GitHub](https://github.com/renovatebot/renovate)
|
|
555
|
+
- [anchore/syft on GitHub](https://github.com/anchore/syft)
|
|
556
|
+
- [CycloneDX/cyclonedx-python on GitHub](https://github.com/CycloneDX/cyclonedx-python)
|
|
557
|
+
- [CycloneDX/cyclonedx-node-npm on GitHub](https://github.com/CycloneDX/cyclonedx-node-npm)
|
|
558
|
+
- [pip-licenses on PyPI](https://pypi.org/project/pip-licenses/)
|
|
559
|
+
- [pilosus/pip-license-checker on GitHub](https://github.com/pilosus/pip-license-checker)
|
|
560
|
+
- [qdhenry/Claude-Command-Suite on GitHub](https://github.com/qdhenry/Claude-Command-Suite)
|
|
561
|
+
- [wshobson/commands on GitHub](https://github.com/wshobson/commands)
|
|
562
|
+
- [npm audit documentation](https://www.nodejs-security.com/blog/how-to-use-npm-audit)
|
|
563
|
+
- [Top Open Source Dependency Scanners 2025 (Aikido)](https://www.aikido.dev/blog/top-open-source-dependency-scanners)
|
|
564
|
+
- [Best SBOM Tools 2025 (Kusari)](https://www.kusari.dev/blog/best-sbom-tools-2025)
|