harden-service
Skill2 starsChanged 18 days agoMITView on GitHub
Harden a service or application before it faces the internet. Use when asked to harden, secure a deployment, review default configuration, or prepare a service for production exposure.
In this repository4 other files it gives its agents.
- cve-researchSkill
- review-diff-for-vulnsSkill
- threat-modelSkill
- triage-alertSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Check authentication and authorization defaults: Default credentials, unauthenticated admin paths, and endpoints that skip the middleware …
- Distinctive: line 47
Verify each control by reading configuration or running a check.
- Distinctive: line 49
Prefer removing a surface over guarding it.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Harden service
Reduce the exposed surface first, then the impact of a breach. Configuration before features.
When to use
- A service is about to be deployed publicly, or has just been.
- Someone asks to harden, prepare for production, or review deployment configuration.
Procedure
- Inventory the surface. List every listening port, public route, debug endpoint, admin interface, and outbound call. Anything not needed for the product is a finding. Done when: a table maps each port/route to its consumer and necessity.
- Check authentication and authorization defaults. Default credentials, unauthenticated admin paths, and endpoints that skip the middleware chain. Done when: each admin surface states its guard, or is filed as a finding.
- Apply transport and header controls: TLS configuration, HSTS, secure and httpOnly cookies with SameSite, and a content security policy where the app renders HTML. Done when: each control is verified in configuration, not assumed from a framework default.
- Constrain the runtime: non-root user, read-only filesystem where possible, dropped capabilities, resource limits, and secrets injected from the environment or a secret store rather than baked into images. Done when: the deployment manifest shows each constraint.
- Make failure safe: disable debug and verbose errors in production, ensure logs never contain secrets, and confirm rate limits exist on authentication and expensive endpoints. Done when: debug is off in the production config and a rate limit is named per sensitive route.
Output format
## Surface inventory
| surface | consumer | needed | guard |
## Findings
| severity | control gap | file/config | fix |
## Applied changes
## Verified
(command output proving each control)Rules
- Verify each control by reading configuration or running a check; never assert a framework default.
- Secrets are referenced by name and fingerprint, never printed.
- Prefer removing a surface over guarding it.
- State what remains unhardened and why.
Anti-patterns
- Adding headers while an admin panel stays unauthenticated.
- Copying a hardening checklist without mapping it to this deployment.
- Claiming a control is in place because a variable is set somewhere in the repo.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

