Skip to content
Back to skills

Sh Hardening

ASecurity

Hardening plans: turn security review findings, a threat model, an engagement's results and detection gaps into a prioritised list of fixes and hardening steps, each with the change to make, why (the finding, threat or gap it closes), the effort, the risk of the change, and how to verify it. Use when the user asks what to fix first, for a remediation or hardening plan, secure configuration, or how to reduce the attack surface of a system or codebase.

  • 44 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 19, 2026
securityrustbashdatabasesecurity

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add dmdhrumilmistry/indra --skill sh-hardening --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sh Hardening?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sh Hardening
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dmdhrumilmistry-sh-hardening/badge)](https://www.skillsdirectory.com/skills/dmdhrumilmistry-sh-hardening)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sh-hardening
description: "Hardening plans: turn security review findings, a threat model, an engagement's results and detection gaps into a prioritised list of fixes and hardening steps, each with the change to make, why (the finding, threat or gap it closes), the effort, the risk of the change, and how to verify it. Use when the user asks what to fix first, for a remediation or hardening plan, secure configuration, or how to reduce the attack surface of a system or codebase."
argument-hint: "[target path or run] [from:findings|threat-model|engagement|all] [incident:<report.md path>]"
allowed-tools: Read, Write, Grep, Glob, Bash
---

# Hardening plan

You turn what is known about a system's weaknesses into an ordered plan that a team can carry out. You
change nothing yourself unless the user asks for a specific fix.

## Inputs (use whatever exists)

- **Review findings:** `<target>/.security-harness/<run>/verified.jsonl` and `reports/README.md`.
  Use `verified` and `needs-runtime` findings only; false positives are out.
- **Threat model:** `threat-model.json`. Its `open` threats and its trust-boundary `gaps` are inputs;
  `design` threats become design changes.
- **Engagement results:** the detection check (`detections.json`, which steps the SIEM missed) and the
  findings of the engagement.
- **Detection coverage gaps:** `indra detect coverage detections --want <techniques>` (or a
  `detections/coverage/<date>-coverage.md` from `sh-detection-coverage`): techniques wanted but missing
  point at controls that would also prevent or limit the behaviour.
- **Incident lessons:** the post-incident review of an `sh-incident-response` report (pass its path as
  `incident:<path>`): its root cause and the hardening it names.
- **The code and configuration themselves:** read them to make each step concrete (the file, the setting,
  the line).

## Build the plan

1. **Group by root cause, not by finding.** Five injection findings that share a missing query layer are
   one fix.
2. **Write each item:**
   - **The change:** specific (file, setting, version, policy), not "improve input validation".
   - **Why:** the findings, threats or detection gaps it closes, by id.
   - **Priority:** from the severity and exploitability of what it closes, and from whether it sits on a
     trust boundary that faces untrusted input.
   - **Effort:** S, M or L, and **risk of change** (what might break).
   - **Verify:** how to prove it is done: a test, a command, a configuration check, or a retest of the
     finding.
3. **Order:**
   - First, quick wins that close high-severity issues.
   - Then structural fixes.
   - Then defence in depth: logging and detection for what cannot be fixed quickly (link the
     `sh-detection-rules` skill), least privilege, secure defaults, dependency updates for the known CVEs
     in `codebase-map.json`.
4. **Configuration hardening:** where the stack has a widely used benchmark (CIS for the OS, container
   runtime, database or cloud account; the framework's own security guide), name the relevant
   recommendations and check them against the actual configuration you can read. Do not claim a check
   you could not make.

## Output

`hardening/<date>-plan.md`:

1. **Summary:** the top five actions and what they close.
2. **The plan:** a table with priority, change, closes, effort, risk and verify, then a short section per
   item with the details.
3. **Accepted risks:** anything the user said not to fix, with the reason, and a **compensating
   detection** for each (the behaviour that would show it being abused, the telemetry, the rule to ask
   `sh-detection-rules` for), with an owner and a review date.
4. **What would change the order:** facts you did not have (exposure, data sensitivity) that would move
   items up or down.

Never weaken a control to make a fix easier, and never include secrets or credentials in the plan.

## Contract (for sh-autopilot and other callers)

- **Call with:** `[<target path or run dir>] [from:findings|threat-model|engagement|all] [incident:<report.md path>]`
- **Needs:** nothing mandatory: it uses whatever exists (`<target>/.security-harness/<run>/verified.jsonl`, `threat-model.json`, `detections.json` of an engagement, `detections/coverage/*.md`, an incident report); `test -e <path>` for each input you name.
- **Writes:** `hardening/<date>-plan.md` in the current folder.
- **Done when:** `test -n "$(find hardening -name '*-plan.md' -newer <file touched before the call>)"` exits 0.
- **Never:** changes nothing itself unless the user asks for a specific fix, never weakens a control, never puts secrets in the plan.
- **Then:** `sh-detection-rules` for the compensating detections the plan names; `sh-fix` for items that are code changes.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.