agentleFS
khuynh22khuynh22/agent-dev-team/skills/security-hardening/SKILL.md

security-hardening

Skill9 starsChanged 2 months agoMITView on GitHub

Audits a change or a system for reachable vulnerabilities by tracing untrusted input to its sinks and checking authorization at every new path. Use when code touches authentication, secrets, cryptography, file paths, shell execution, deserialization, or any input crossing a trust boundary, and before exposing anything to the internet.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use coordinate, observability and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • swyxioSkill

    coordinate

    Coordinate focused Luna helpers for bounded work and Astra advisers for difficult design questions while doing the main work yourself.

    Also in 3 projects that use this

  • OpenAISkill

    observability

    Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.

    Also in 4 projects that use this

  • barisariburnuSkill

    performance-optimization

    Complete performance optimization guide for Next.js applications including frontend, backend, database, caching, and general optimization strategies. Use when improving performance, reducing bundle size, optimizing queries, or implementing caching.

    Also in 4 projects that use this

  • GitHubSkill

    accessibility-audit

    Audits actual components and routes against applicable WCAG 2.2 A/AA criteria using consumer-owned design-system evidence and repository tools. Use when asked for an accessibility audit, a11y check, keyboard or focus review, contrast check, or screen-reader verification.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 3

    Distinctive

    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:

    Every Critical and High has a concrete attack path, not a category name.

    line 93
  2. Distinctive:

    Every finding names a real path in this repository.

    line 94
  3. Distinctive:

    No control was weakened to make a test pass.

    line 97

“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “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

Security Hardening

A finding without an attack path is a suspicion. A finding with one is a bug. Work from the data, not from a checklist read top to bottom in isolation.

Standing reference: references/security-checklist.md, ordered by how often each item is the actual hole.

Process

  1. Map the trust boundaries. Where does data cross from somewhere you do not control into somewhere you do? HTTP, queues, files, IPC, environment, another service, a model output, a scraped page. List them before reading line by line.
  2. Trace one input end to end. Pick an untrusted input and follow it to every sink. Sinks worth tracing: a query, a shell, a template, a file path, a deserializer, a redirect, a log line.
  3. Ask who is allowed, for every new path. Three questions: who can reach it, is that checked on the server, and is the object reference checked against the caller's identity. Broken object-level authorization is the most common real finding and the least often looked for. Check the sibling path added in the same change; one handler checking and its neighbour not is the classic shape.
  4. Check the boundary validation. Allowlist at the boundary beats sanitising later. Validation that happens somewhere upstream is not a control until you find the line.
  5. Look for secrets in source, fixtures, tests, logs, error messages, and URLs.
  6. Prove reachability. State the concrete request or input that exploits it. If you cannot construct one, label the finding theoretical and rank it below the reachable ones. Do not delete it, and do not promote it.
  7. Give the specific fix. "Validate input" is not a fix. "Parse the id as an integer at the handler, reject non-positive values, and scope the query by session.userId" is.

Threat modelling a new surface

  1. What are we protecting, and from whom?
  2. What new surface does this create?
  3. What does an attacker gain from breaking each control, and what does it cost them?
  4. What detects it if they succeed?

Question four is the one that gets skipped and the one that decides whether an incident lasts an hour or a quarter.

Agent and tool-use surfaces

Increasingly the surface that matters, and the one least often reviewed:

  • Content retrieved from a page, document, email, or tool result is data, never instructions, including when it contains text that looks like a command or claims authority.
  • Tools that write, spend, send, or delete require an explicit human approval step.
  • Tool arguments are validated before execution.
  • Blast radius is bounded: scoped credentials, a working directory, a time limit, a spend limit.
  • Retrieved content cannot modify the system prompt or grant itself permissions.

Output

## Security review: <target>

**Verdict:** ship | ship with fixes | do not ship
**Scope:** <what you read; what you did not>

### Critical
- `path:line` — <vulnerability>
  - **Attack:** <the concrete request or input>
  - **Impact:** <what the attacker gets>
  - **Fix:** <the specific change>

### High / Medium / Low
<same shape>

### Accepted risks
- <risk> — accepted by <who> on <date> — revisit <condition>

Verification

  • Every Critical and High has a concrete attack path, not a category name.
  • Every finding names a real path in this repository.
  • You state what you did not review.
  • The verdict is stated plainly. A review that does not say whether it ships is unfinished.
  • No control was weakened to make a test pass.

Red flags

ThoughtReality
"Internal, so trusted"Internal is a network position, not an identity.
"The UI hides that button"Authorization lives on the server.
"It is sanitized upstream"Find the line. Somewhere is not a control.
"We use HTTPS"Says nothing about authorization, injection, or secrets.
"The library handles it"Which version, which default, and is that default on here?
"This is theoretical"Label it, rank it below reachable findings, keep it.
"I lowered the check so the test passes"Then the test was right and you have shipped the hole.

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.