Auditing Guard Gaps logo

Auditing Guard Gaps

Organization
UnboundCompute
auditing-guard-gaps

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.

Overview

PublisherUnboundCompute
Repositorysecurity-agent-skills
Skill nameauditing-guard-gaps
Stars
27
Forks
8
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by UnboundCompute on GitHub. Read the source before you install it.

Installation

Install the Auditing Guard Gaps AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-guard-gaps
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-guard-gaps .claude/skills/auditing-guard-gaps
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Auditing Guard Gaps in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Auditing Guard Gaps on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Auditing Guard Gaps is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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. Enumerate the structural peers. Widen past same-file neighbors - the point is structural kinship: functions that reach the same sink; overrides of the same interface/virtual method; handlers in the same route table / dispatch map / command switch; parallel members of a class (get_x/set_x/delete_x); callers of a shared helper where some sanitize the argument and some pass it raw. Peers that reach the same sink are the strongest signal.

  4. Diff each peer against the anchor - by what the guard enforces, not its name. For every peer, ask whether an equivalent check dominates the same sink. Classify the gap:

    • absent - no equivalent check at all.
    • bypassable - present but skippable on some path (early return, a short-circuiting ||, a branch that jumps the check).
    • weaker-than-peer - a different kind of check: authentication where the anchor does authorization; a type check where the anchor does bounds; one field where the anchor checks the sibling field too.
    • after-sink - the check runs, but after the dangerous operation.
    • wrong-context - a real check that doesn't cover this sink's payload class (an encoder that's wrong for the sink's language).
  5. Confirm reachability with attacker input. An unguarded sink is only a bug if untrusted input reaches it. Trace the peer's dangerous argument back to a real source (hand to adjudicating-taint-paths). A peer only ever called with constants is not a finding.

  6. Record as a diff - in the schema. State it as: "anchor A guards sink S with check C (dominating); peer B reaches S with guard_status = <absent / bypassable / weaker-than-peer / after-sink / wrong-context>, and B's argument is attacker-controlled via ." Emit per the finding schema.

Worked example

Anchor: delete_own_post(user, post_id) - checks post.owner == user.id (dominates) before db.delete(post). Peer: admin_bulk_delete(ids) reaches the same db.delete sink; the only gate is a route-level @login_required, no per-object ownership check. Diff: guard_status = weaker-than-peer - authentication present, authorization (ownership) absent. Reachability: ids comes straight from the request body; any authenticated user hits it. Confirmed IDOR/BFLA, severity high - "any logged-in user deletes any user's posts by id."

Rationalizations to reject

  • "There's a check in the function, so it's guarded." → Only if it dominates the sink. A check on a branch the sink skips is no guard.
  • "Both functions have auth, they're equivalent." → Authentication is not authorization; a type check is not a bounds check. Compare what's enforced.
  • "The peer looks unguarded - report it." → Not until you confirm attacker input reaches the sink. Unreachable ≠ finding.
  • "Same-file neighbors only." → The dangerous peer often lives in another module reaching the same sink. Enumerate by structure, not by file.

Executing this in practice

You need tooling that can group functions by the sink they reach and show the exact body of each, so you can diff guard-for-guard and check domination. A code property graph makes "which peers reach this sink, and which validate first" directly answerable; otherwise enumerate peers by hand from the call sites of the shared sink or helper and read each. The reachability step reuses adjudicating-taint-paths.

Related

  • adjudicating-taint-paths - confirm the peer's sink is reachable with input.
  • hunting-bugs-with-a-code-graph - the master loop this feeds.
  • FINDING-SCHEMA.md - the shape every finding takes.

Frequently asked questions

What does the Auditing Guard Gaps AI skill do?

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.

Why use Auditing Guard Gaps on TypingMind?

Because you install it once and use it with any model. Auditing Guard Gaps is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Auditing Guard Gaps in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-guard-gaps. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Auditing Guard Gaps?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Auditing Guard Gaps?

As many as you like. As long as a model supports skills, you can use Auditing Guard Gaps with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Auditing Guard Gaps AI skill free?

Yes. It is published on GitHub by UnboundCompute under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇