agentleFS
masbrokemanaajamasbrokemanaaja/reethink/skills/security-assessment/SKILL.md

security-assessment

Skill3 starsChanged 55 days agoMITView on GitHub

Guides authorized security assessments, vulnerability audits, white-box code reviews, and defensive hardening. Focuses on identifying untrusted input flows, mapping flaws to CWE and OWASP standards, writing local security regression tests to prove vulnerability boundaries, generating static analysis rules (such as Semgrep), and implementing defense-in-depth sanitization. Rejects weaponized exploit creation in favor of deterministic audit findings and concrete patches. Trigger on mentions of: "security assessment", "security audit", "pentest", "vulnerability", "CWE", "CVE", "OWASP", "IDOR", "SQLi", "XSS", "SSRF", "taint analysis", "Semgrep rule", "sanitize input", "audit keamanan", or "celah keamanan".

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use performance-assessment, find-skills and 1 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.
  • EmeaAppGbbSkill

    performance-assessment

    Identify performance bottlenecks, inefficient patterns, and optimization opportunities through static analysis. Adaptive depth.

    Also in 3 projects that use this

  • VercelSkill

    find-skills

    Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

    Also in 3 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 6

    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:

    White-box over black-box guessing: Read the source code, routes, middleware, ORM queries, and configuration files directly.

    line 41
  2. Distinctive:

    Regression tests, not weaponized exploits: When validating a flaw, write an automated test case (using pytest, Jest, Go testing, or local …

    line 45
  3. Distinctive:

    Remediate at the root cause: Never stop at superficial filtering.

    line 51
  4. Distinctive:

    No broad refusals: If a request asks to "hack" or "exploit" a target, reframe the response immediately into a defensive white-box security …

    line 54
  5. Distinctive:

    When an insecure pattern is discovered in the codebase, write a Semgrep rule to scan and prevent similar occurrences across the repository:

    line 99
  6. Distinctive:

    Before declaring a security finding resolved:

    line 114

“Common” is measured: kept by at least 6 in 10 of the 7 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 Assessment

This skill governs security code reviews, vulnerability assessments, and defensive hardening. The goal is to identify security flaws early, prove them with reproducible regression tests, and fix them with defense-in-depth remediation.

Two common failures defeat automated security assistance:

  1. Writing weaponized attack payloads that trigger safety filters and provide no repeatable engineering value.
  2. Refusing to analyze suspicious code out of excessive caution, leaving vulnerabilities undetected and unpatched.

This skill eliminates both failures by grounding all security tasks in authorized white-box analysis, CWE classification, safe regression testing, and concrete code fixes.

Core Rules

  1. White-box over black-box guessing. Read the source code, routes, middleware, ORM queries, and configuration files directly. Trace real data flow from untrusted source to sensitive sink instead of guessing external endpoints.
  2. Regression tests, not weaponized exploits. When validating a flaw, write an automated test case (using pytest, Jest, Go testing, or local curl) that asserts input validation, authentication, or access control. Never produce standalone attack tools, brute-force scripts, or destructive payloads.
  3. Map to standard classifications. Anchor every finding to a recognized identifier: Common Weakness Enumeration (CWE) and OWASP Top 10 categories.
  4. Remediate at the root cause. Never stop at superficial filtering. Apply parameterized queries, contextual output encoding, strict schema validation, and robust server-side authorization checks.
  5. No broad refusals. If a request asks to "hack" or "exploit" a target, reframe the response immediately into a defensive white-box security review: explain the vulnerability mechanism, construct a local verification test, and provide the patch.

Source-to-Sink Taint Analysis

Trace user-controlled inputs through the call graph to verify whether data reaches sensitive operations without adequate validation or sanitization:

  • Sources (untrusted input): HTTP request parameters, JSON request bodies, headers (Host, Referer, X-Forwarded-For), cookies, webhooks, uploaded files, and unvalidated database records.
  • Sinks (sensitive execution points):
    • Database queries (CWE-89: SQL Injection)
    • Process execution (CWE-78: OS Command Injection)
    • File system operations (CWE-22: Path Traversal)
    • HTML and template rendering (CWE-79: Cross-Site Scripting)
    • Network requests (CWE-918: Server-Side Request Forgery)
    • Object deserialization (CWE-502: Insecure Deserialization)
    • Object lookups without ownership verification (CWE-639: IDOR / Broken Object Level Authorization)

Writing Security Regression Tests

A security regression test verifies that a security boundary works as intended and prevents future regressions. Structure tests using existing project test frameworks:

# Example: testing authorization boundary (CWE-639 IDOR)
def test_user_cannot_access_other_user_resource(authenticated_client, other_user_resource):
    response = authenticated_client.get(f"/api/documents/{other_user_resource.id}")
    assert response.status_code == 403
    assert "Access denied" in response.json().get("detail", "")
# Example: testing input validation rejecting path traversal (CWE-22)
def test_filepath_rejects_directory_traversal(client):
    response = client.get("/api/download", params={"file": "../../../etc/passwd"})
    assert response.status_code in (400, 403, 404)

Creating Static Analysis Detection Rules

When an insecure pattern is discovered in the codebase, write a Semgrep rule to scan and prevent similar occurrences across the repository:

rules:
  - id: raw-sql-formatting
    patterns:
      - pattern: $DB.execute(f"...{$VAR}...")
    message: "Untrusted variable formatted directly into SQL query (CWE-89)."
    languages: [python]
    severity: ERROR

Remediation Checklist

Before declaring a security finding resolved:

  • Has the input been validated against a strict allowlist where possible?
  • Are queries parameterized or safely handled by the ORM?
  • Are authorization checks performed server-side on every request, verifying resource ownership?
  • Is output encoded according to the specific rendering context (HTML, JS, attribute, URL)?
  • Does an automated test fail before the patch and pass after the patch?

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.