Web Logic Auditor logo

Web Logic Auditor

Community
ptn1411
web-logic-auditor

Authorized testing of access-control and business-logic flaws that pattern scanners cannot find — IDOR/BOLA, broken function-level authorization, mass assignment, business-logic abuse, and race conditions. A reasoning-driven methodology (Subject×Object×Action matrices, state-machine modeling, invariant analysis) plus two helper tools: authz_diff.py (two-identity response differ) and race_probe.py (concurrency probe).

Overview

Publisherptn1411
Repositoryskill
Skill nameweb-logic-auditor
Stars
275
Forks
133
Bundled files
2
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.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Web Logic Auditor 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/ptn1411/skill/tree/main/web-logic-auditor
  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/ptn1411/skill.git /tmp/skill
mkdir -p .claude/skills
cp -r /tmp/skill/web-logic-auditor .claude/skills/web-logic-auditor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Web Logic Auditor 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 Web Logic Auditor 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 Web Logic Auditor 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.

Web Logic Auditor

Access-control and business-logic testing for authorized web apps/APIs. These classes require reasoning about intent — who may do what, and which invariants must hold — not regex signatures. Use alongside web-app-scanner, which covers the automatable injection/misconfig classes.

Language rule: All skill instructions use English. Final summary presented to the user must be in Vietnamese.


0. Authorization & Routing

Operates under MASTER_POLICY.md §1–§2. Test only apps you own or are explicitly authorized to assess. Every technique here sends real requests as real users; several are state-changing (mass assignment, race conditions) — use disposable/staging accounts and the --allow-write gate. If scope is unclear, ask one concise question first.

You need at least two test accounts for most of this: an owner (A) and a non-owner (B), plus an admin where roles exist, and an anonymous baseline.

Sibling skillWhen
web-app-scannerAutomatable classes: XSS, SQLi, SSRF, SSTI, redirects, exposed files
network-interceptorCapture the app's real API calls to map hidden endpoints/flows
pentest-script-generatorTurn a confirmed finding into a PoC/verify script

Why reasoning, not regex

A scanner cannot know that "a discount and a referral credit are mutually exclusive", that "refund must follow capture", or that "order 1001 belongs to user A, not user B". These flaws live in the intended behavior of the app. The method is: model the domain, then look for states/transitions/accesses the model forbids but the app allows.


Step 1 — Map the surface and the model

  1. Drive the app (or read network-interceptor captures) to enumerate endpoints, parameters, and object identifiers. Note every id, uuid, order, account, file, tenant reference.
  2. Build a Subject × Object × Action matrix: rows = principals (anon, user A, user B, premium, admin), columns = actions on resources. Fill in what should be allowed.
  3. For stateful flows (checkout, signup→trial→paid, approval), draw the state machine: states, valid transitions, preconditions, and invariants ("balance never increases without a payment", "coupon usable once per user").

Step 2 — IDOR / BOLA (object-level authorization)

Discover object IDs from list/search/export endpoints, pagination cursors, JS bundles, emails, webhooks. Then replay A's request as B (and anonymously) and compare responses.

powershell
python web-logic-auditor\scripts\authz_diff.py --url "https://app/api/orders/1001" `
    --auth-a "Cookie: session=OWNER" --auth-b "Cookie: session=OTHER" --baseline-unauth --authorized

authz_diff.py reports an IDOR/BOLA candidate when B (or anon) gets a 2xx whose body closely matches A's (--threshold, default 0.85). Confirm manually.

Extra vectors:

  • Batch/array endpoints — authorization often checked only on the first element; inject a cross-tenant ID mid-array.
  • PATCH partial updates — silent unauthorized field writes.
  • Gateway header trust — try X-User-Id / X-Organization-Id overrides.
  • Second transport — the same object via REST and GraphQL; authorization may differ.

Step 3 — Broken function-level authorization (BFLA)

Call privileged endpoints as a low-privileged user: admin routes (/admin/*, /api/internal/*), management verbs (DELETE, role changes), and functions hidden only in the UI. Use authz_diff.py with A = admin token, B = normal user; a 2xx for B on an admin action is a finding. Also test stale capabilities: downgrade a premium account and confirm premium features are actually revoked.


Step 4 — Mass assignment / parameter tampering

Add fields the client never sends and see if the server honors them (state-changing — --allow-write):

  • Privilege: "role":"admin", "is_admin":true, "verified":true, "plan":"enterprise".
  • Ownership: "user_id":<other>, "tenant_id":<other>, "account":<other>.
  • Economics: negative/oversized quantities, "price":0, extra "balance"/"credits" fields.

Send the tampered body, then read the object back and check whether the injected field stuck. The bug is confirmed by persisted state, not by the write's status code.


Step 5 — Business-logic abuse

Work the state machine from Step 1:

  • Skip / reorder / replay steps (reach payment-confirmation without payment; re-POST a one-time step).
  • Value tampering across a trusted boundary — change price/total after approval but before capture; trust line items where the server only re-checks the total.
  • Discount/coupon — stack mutually-exclusive offers; reuse a per-user coupon across accounts; apply after tax.
  • Quotas/inventory — reservation leaks, off-by-one on limits, time-window reset abuse.
  • Multi-tenant — actions whose DB WHERE clause omits the tenant key.

Each candidate is confirmed by an invariant violation you can state in one sentence ("the ledger balance rose without a payment").


Step 6 — Race conditions / idempotency

For "should happen once" actions (redeem, withdraw, apply, vote), fire many concurrent identical requests and check whether more than one succeeds:

powershell
python web-logic-auditor\scripts\race_probe.py --url "https://app/api/redeem" --method POST `
    --data "code=SAVE10" --header "Cookie: session=YOU" -n 20 --authorized --allow-write

race_probe.py reports the 2xx distribution; >1 success suggests a race window or an idempotency key scoped to the path instead of the principal. Confirm by reading server-side state (balance, coupon uses, inventory) afterwards.


Step 7 — Validate & report

For every finding record: the endpoint, the two principals used, the exact request/response pair (owner vs non-owner), and the invariant that was violated. Reproduce cross-transport where possible. Redact real data (MASTER_POLICY §3).

False-positive guards:

  • Public-by-design resources (marketing pages, shared links) are not IDOR.
  • Similar bodies that are generic error/empty templates are not access — check authz_diff.py's denied-heuristic and read the body.
  • A single 2xx in race_probe.py is normal; only multiple successes indicate a race.

Defensive fixes to recommend:

  • IDOR/BOLA → enforce per-object ownership server-side on every read/write; never trust client-supplied IDs.
  • BFLA → centralized function-level authorization; deny-by-default on privileged routes.
  • Mass assignment → allow-list bindable fields (DTOs / attr_accessible); never bind request bodies straight to models.
  • Business logic → re-validate invariants in every service/queue/job, not just the entry point.
  • Race conditions → atomic operations, DB constraints/locks, and idempotency keys scoped to the principal.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Web Logic Auditor AI skill do?

Authorized testing of access-control and business-logic flaws that pattern scanners cannot find — IDOR/BOLA, broken function-level authorization, mass assignment, business-logic abuse, and race conditions. A reasoning-driven methodology (Subject×Object×Action matrices, state-machine modeling, invariant analysis) plus two helper tools: authz_diff.py (two-identity response differ) and race_probe.py (concurrency probe).

Why use Web Logic Auditor on TypingMind?

Because you install it once and use it with any model. Web Logic Auditor 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 Web Logic Auditor in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ptn1411/skill/tree/main/web-logic-auditor. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Web Logic Auditor?

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 Web Logic Auditor?

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

Is the Web Logic Auditor AI skill free?

It is published on GitHub by ptn1411. Check the repository for licensing terms. 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 👇