agentleFS
mgkvibezmgkvibez/sentinel-skills/skills/harden-service/SKILL.md

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.

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
  1. Distinctive:

    Check authentication and authorization defaults: Default credentials, unauthenticated admin paths, and endpoints that skip the middleware …

    line 20
  2. Distinctive:

    Verify each control by reading configuration or running a check.

    line 47
  3. Distinctive:

    Prefer removing a surface over guarding it.

    line 49

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.