agentleFS
AetherdzAetherdz/huntpack/skills/understand/application-model-builder/SKILL.md

application-model-builder

Skill5 starsChanged 4 months agoMITView on GitHub

Mandatory first step BEFORE any payload testing. Build the Application Model (assets, actors, permissions, workflows, trust boundaries, state machines), then break assumptions systematically. Output must match schema below — unknowns marked as such.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before XSS/SQLi/SSRF: authorization, ownership, multi-user safety, tenant isolation, workflow integrity, approval flows, …

    line 20
  2. Distinctive:

    After any finding: does it combine with another?

    line 23
  3. Distinctive:

    Not a finding until: retested 3x · impact proven (attacker can actually DO) · zero-state exploitability · confirmed not intended.

    line 29
  4. Distinctive:

    After identifying any endpoint, discover siblings via:

    line 34
  5. Distinctive:

    Document each sibling's auth requirement, response shape, and data exposure.

    line 44
  6. Distinctive:

    No reference files yet. Patterns documented inline above.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “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

APPLICATION MODELING — mandatory before payloads

Build the model (6 parts)

Assets: PII, funds, subscriptions, files, tokens/keys, roles, premium content, transaction history. Actors: Guest, User, Premium, Moderator, Admin, Super Admin, Service Account, Support Agent. Permissions: Browse→Create→Edit-own→Purchase→Moderate→Manage-all→Full-access ladder. Workflows: login, registration, purchase, refund, invite, upgrade, approval, password reset, transfer, account deletion. Trust boundaries: browser↔API, user↔user, tenant↔tenant, frontend↔backend, internal↔external, session after password change, unverified-email privileges. State machines: per workflow states+transitions (Order: cart→pending→paid→shipped→delivered→refunded).

Break assumptions

For every workflow: what did the developer assume? Test breaking each: skip steps (POST /complete without /submit), reorder (DELETE before CREATE), repeat (redeem coupon twice, refund twice), parallelize (50 concurrent withdrawals), run as another user/tenant (swap IDs).

Business logic BEFORE technical

Before XSS/SQLi/SSRF: authorization, ownership, multi-user safety, tenant isolation, workflow integrity, approval flows, payment/coupon/subscription/wallet logic, invitation logic, role changes, state transitions.

Chain findings

After any finding: does it combine with another? IDOR on user_id (read email) → change email via endpoint with no OTP → password reset → ATO (Critical).

Multi-user analysis

Compare User A vs B vs Admin vs Guest: requests, responses (data leak?), ID guessability, permission differences, state changes.

False positive control

Not a finding until: retested 3x · impact proven (attacker can actually DO) · zero-state exploitability · confirmed not intended. Confidence: Low (possible FP) → Medium → High → Confirmed. Report only at Confirmed.

SIBLING ENDPOINT ANALYSIS (NEW)

After identifying any endpoint, discover siblings via:

  • Path prefix swap: /api/v1/orders → /api/v2/orders, /api/orders/admin, /internal/orders
  • HTTP method test: GET → POST/PUT/PATCH/DELETE/OPTIONS on same path
  • Adjacent resource: /api/users → /api/profiles, /api/accounts, /api/identities
  • ID reference shift: /api/orders/123 → /api/orders/123/invoice, /api/orders/123/items
  • Admin overlay: /api/orders → /admin/orders, /api/admin/orders, /manage/orders
  • Format extension: /api/orders → /api/orders.json, /api/orders.xml, /api/orders?format=json
  • Case mutation: /API/orders, /api/Orders, /Api/orders
  • Version crawl: /api/v1/ → /api/v2/, /api/v3/, /api/beta/

Document each sibling's auth requirement, response shape, and data exposure.

HYPOTHESIS GENERATION SIGNALS

For each model component, generate testable hypotheses from signals:

Signal in ModelHypothesisTest
Sequential IDs in assetIDOR: User A can read User B's resourceSwap IDs between sessions
role / permission field in responseMass Assignment: inject "role":"admin"PATCH/PUT with extra fields
Multi-step workflowState skip: POST final step without prior stepsReorder/omit workflow steps
Balance/wallet/creditsRace condition: parallel withdraws exceed balance30 concurrent requests
Org/workspace/team IDCross-tenant: Tenant A accesses Tenant B dataCreate 2 tenants, swap IDs
OTP/verification stepOTP bypass: skip step, change email mid-flowPOST next step without OTP
File uploadUpload abuse: MIME bypass, path traversalSend PHP in image/jpeg
Coupon/discount fieldCoupon abuse: negative quantity, race redemption"quantity":-1, parallel apply
Subscription/plan_idDowngrade abuse: access premium after expiryReuse old plan_id
Email in URL/bodyEnumeration: diff responses for existing vs non-existing emailsCompare response sizes/timing
Free tier with API keysKey abuse: use free-tier key for privileged actionsTest key on admin endpoints
Webhook/callback URLSSRF: point webhook to internal IPhttp://169.254.169.254/latest/meta-data/
Search/sort/filter paramsSQLi: inject ' OR 1=1-- in sort clauseBoolean diff test
Template/email body paramsSSTI: inject {{7*7}} in template fieldsCheck if 49 in response
Password reset tokenToken predictability: decode, check timestamp baseCollect 10 tokens, find pattern

RESPONSE-DRIVEN NEXT ACTIONS

What You ObserveWhat It MeansNext Action
200 OK but body is HTML/SPACatch-all, not endpointTry format extension, method override
403 on GET, 200 on POSTPartial auth — POST may bypassTest all methods, method override headers
200 with empty data arrayExists but no recordsTry other IDs, search params
500 on malformed JSONPoor input validationDeepen malformed input, probe for stack trace
Timing diff >500ms on valid vs invalidProcessing cost diffEnumeration → brute force
Response has admin field set to falseCan flip to trueTest mass assignment
Same response across all IDsCached/default response, not per-resourceAdd cache-buster param
Set-Cookie with no HttpOnly/SecureSession cookie misconfigCheck SameSite, path scope
GraphQL errors array with 200 statusPartial success, field-level access diffQuery each field individually
Content-Length: 0 on POST successCreated but empty — may not verify ownershipTry alternative methods on created resource

Output schema (fill before handing to build)

scope: | technology_stack: [] | archetype_hypotheses: [] | assets: [] | actors: []
permissions: [] | workflows: [] | trust_boundaries: [] | state_changes: []
sibling_endpoints: [{path, auth_required, data_exposed}]
opportunities: [{surface, score, reasons}]
hypotheses: [{workflow, assumption, break_test, expected_evidence}]
task_graph: [] | stop_conditions: []

Unknown fields marked unknown with how to discover them.

REFERENCE FILES

No reference files yet. Patterns documented inline above.

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.