auditing-guard-gaps

Solid

Find the missing-check bug by comparing sibling functions that reach the same sink - one validates its input, its peer does not. Use on an authorized source target to surface broken access control, missing bounds checks, and skipped sanitization that linear file-reading hides; when you suspect one handler in a family forgot the check its siblings all perform. Covers finding a guarded anchor, enumerating structural peers, diffing guard-for-guard by what each actually enforces, and confirming the unguarded peer is reachable with attacker input.

AI & Automation 4 stars 1 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Auditing guard gaps: the unguarded peer is the bug Most access-control and missing-validation bugs aren't exotic - they're one handler in a family that forgot the check its siblings perform. The `admin_delete` that checks a role and the `bulk_delete` that doesn't. The `read_bounded` that validates length and the `read_fast` that trusts it. Reading files top-to-bottom hides these; comparing *peers* surfaces them. This is one of the highest-yield whitebox moves. ## The asymmetry you're hunting ``` guard → sink (the intended, safe path) ??? → sink (a peer path with the guard missing - the bug) ``` ## When to use - A sink is reachable from several call sites and you suspect one skips a check. - You're auditing an authz model, a parser family, or a handler group for a forgotten check. - A finding needs its "why is this wrong" framed as a concrete diff against a correct peer. ## Scope check Authorized source only. If you can't name the authorization, stop. ## The loop 1. **Pick a guarded anchor.** Find a function that *does* validate before a sensitive sink - an authz/ownership check, a bounds check, an allowlist, a sanitizer. This is your reference for "what correct looks like here." 2. **Pin the guard to the sink it protects.** Name the exact check and the exact sink. "Correct" means the guard **dominates** the sink: on *every* path through the anchor, the check runs before the sink. Mere presence in the function is not domination. 3....

Details

Author
UnboundCompute
Repository
UnboundCompute/security-agent-skills
Created
5 days ago
Last Updated
yesterday
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

defect-hunting

Use when reviewing code, auditing an app, writing a guard rule or test, or certifying any threshold/constant/formula. Finds the defects a diff review structurally cannot see — the second write path, the mis-calibrated constant, the rule that cannot fail. Triggers from code-reviewer, /app-audit, qa-engineer, verification-engineer, and any task that adds a lint rule, architecture test, or CI grep.

4 Updated 1 weeks ago
vmobifystudio
AI & Automation Listed

scope-guard

Judgment check before calling substantial work done or proposing a commit. Use before "done", before committing more than a trivial change, and whenever you notice yourself building something nobody asked for. The judgment layer above the automated gates, not a duplicate of them.

2 Updated 1 weeks ago
Tradebaas
Code & Development Solid

gating

Build and audit deterministic verification gates — checks that block a pipeline and can be shown to go red. Use when writing a calibration gate, CI check, validation script, or pre-publication check for a numeric or empirical result; when a result is about to be published, acted on, or merged and a plausible-but-wrong value would survive review; when asking whether an existing test suite, linter rule, or check could actually fail; and when a check suite passes first try, passes suspiciously often, or was written by the same process that produced the thing it checks. Triggers on "verification loop", "calibration gate", "can this check fail", "known-bad", "negative control", "sanity check my results", "is this test actually testing anything".

146 Updated today
oaustegard