harden

Audits codebases read-only for dependency CVEs, container CVEs, and code-level hardening gaps, emitting execution-ready plan items.

5|1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/ai-hero/hero-skills --skill harden-ai-hero
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harden
Source: https://github.com/ai-hero/hero-skills/tree/main/skills/harden
Command: npx skills add https://github.com/ai-hero/hero-skills --skill harden-ai-hero

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security audits often stop at a list of vulnerabilities, leaving engineers to figure out reachability, batching, and verification themselves. This Skill audits a repository read-only across dependency CVEs, container image CVEs, and code-level robustness, then writes plan items precise enough for a downstream executor to apply, test, and verify with zero context from the audit session. ## Core Features & Use Cases - Dependency CVE audit: Reads open Dependabot alerts and PRs via the GitHub CLI, judges reachability and upgrade risk, and specifies a single batched branch with one lockfile regeneration and explicit closing of superseded Dependabot PRs. - Container CVE audit: Scans runtime-stage base images with both Docker Scout and Trivy, enumerates every upgrade axis (tag refresh, runtime major, OS generation, variant) before declaring a CVE unfixable, and requires dual-scanner rescans plus boot checks in verification. - Code-level hardening audit: Sweeps for boundary validation gaps, silent failures, secrets hygiene issues, auth seams, unsafe defaults, missing timeouts, and injection surfaces, keeping only findings with concrete failure scenarios. - Use Case: During a wayfare sync run, the audit finds 5 Dependabot alerts and 10 fixable container CVEs, then emits five .plans/ items with execution recipes, verification steps, and rollback notes that a cheaper model executes later. ## Quick Start Ask the AI to run the harden audit with scope 'all' so it scans dependencies, Docker images, and code, then writes execution-ready security plan items into the .plans directory without modifying any source files.

Frequently Asked Questions about harden

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a repository for dependency CVEs with Dependabot?

Run the audit with the deps scope to list open Dependabot alerts via the gh CLI, judge reachability and upgrade risk for each, and emit a plan item that batches all bumps onto one fresh branch with a single lockfile regeneration and one test run.

Why scan Docker images with both Scout and Trivy?

Scout and Trivy use different advisory databases, and each misses CVEs the other catches. The audit reports the union of both scanners and requires dual-scanner rescans in every container plan item's verification section.

Does this audit modify source code or dependency files?

No. The audit is strictly read-only and its only writes are plan items under the git-ignored .plans directory. A self-check with git diff and git status verifies no tracked files were touched before the summary prints.

What happens when Docker Scout reports no fix for a base image CVE?

The audit does not trust a clean scout recommendations result, especially for gcr.io/distroless bases. It enumerates every upgrade axis (tag refresh, runtime major, OS generation, variant) and scans candidates directly before a plan may claim no fix is available.

Can I run the harden audit standalone outside wayfare sync?

Yes, it accepts deps, docker, code, or all as an argument and works standalone, but it is designed as a stage of wayfare sync, which ready-marks the emitted items and groups them into a security goal during its planning postflight.

Why do superseded Dependabot PRs need manual closing after a batched fix merges?

GitHub only auto-closes a Dependabot PR when that PR itself is merged, and it does not reliably detect a batched fix landing via a different commit. The execution recipe closes each superseded PR explicitly with a comment referencing the merged PR.