Application attack surface modeling

From xalgorix/xalgorix · View interactive version

Application attack surface modeling is an AI agent skill from the GitHub repository xalgorix/xalgorix. Build a working model of the application as a system - roles, resources, workflows, state transitions, trust and tenant boundaries - from black-box behavior, and turn that model into prioritized hypotheses. The foundation skill that converts a recon endpoint list into application-level reasoning.

How to use this skill

Skill file

Application Attack-Surface Modeling

Purpose

Reconnaissance produces a list of routes and endpoints. That list is not yet an application. This skill turns observed runtime behavior into a structured model - who exists, what exists, what flows exist, what states exist, and where the boundaries are - and converts the model into testable hypotheses for the ledger. Load this skill when the endpoint inventory feels like "many URLs, little meaning", or before starting systematic application-level testing.

Entry Conditions

Application Model: What to Capture

Work through these dimensions in order; each one generates hypothesis material:

1. Roles and privilege states

Enumerate the distinct identities the application recognizes, not just the accounts you hold:

Anonymous
  -> signup -> User
  -> email verification -> Verified User
  -> subscription -> Pro User
  -> invite member -> Organization Admin
  -> platform grant -> Moderator / Support / Owner

Signals for role discovery: signup/register forms, pricing tiers, invite flows, admin links, role names in API responses, menu differences between your test accounts, X-Tenant-ID / X-Org-ID headers, role claims in decoded cookies/tokens.

2. Resources and object types

Every ID-bearing endpoint names a resource type: users, orders, documents, invoices, tickets, messages, api_keys, webhooks, exports, workspaces, tenants. For each: how are IDs generated (sequential, UUID, slug)? Who can create/read/update/delete? Are they tenant-scoped or global? Sequential IDs across tenants are an enumeration lead; UUIDs are not.

3. Workflows and state transitions

Every multi-step flow is a state machine. For each transition capture:

| Field | Question |

|---|---|

| Expected transition | e.g. OrderCreated -> Paid |

| Who can initiate | role AND ownership AND tenant |

| Required precursor state | what must be true first |

| Invariant | what must remain true (one coupon per order, one vote per user) |

| Externally triggerable | webhooks, emails, background jobs, third-party callbacks |

| Async? | polling endpoints, job status routes, out-of-band notification |

Representative flows to map: signup/verification, password reset, MFA enrollment, checkout/payment/refund, KYC/approval, invite/accept, subscription change/cancel, file import/processing, content publish/moderation, support ticket lifecycle, export/report generation.

4. Trust and privilege boundaries

5. Sensitive operations

List operations where a broken rule causes real impact: money movement (charge, refund, withdraw, transfer, credit), access changes (invite, role change, API key mint, MFA change, email change), data egress (export, report, share link), destructive actions (delete, cancel, purge), and integration surfaces (webhook URLs, third-party fetch, import-by-URL).

From Model to Hypotheses

For every transition and boundary, generate candidate violations and record them with record_hypothesis (set vuln_class, endpoint, parameter, role, baseline, next_action):

Chaining: preserve weak intermediate observations in the ledger instead of discarding them as low-impact. Username enumeration + reset weakness becomes account takeover; invite leakage + object-level access becomes tenant breach. A primitive that looks minor may be the first link of a chain - record it, do not delete it.

Xalgorix Tool Strategy

Common Misses

False Positives

Stopping Rule

The model is complete enough when: every discovered workflow has initiator/precursor-state/invariant annotations, every role/tenant boundary has at least one boundary-testing hypothesis, and two further interactions produce no new resource type or transition. Stop modeling then; pursue the highest-value hypotheses deeply instead of endlessly broadening the model.

Handoffs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.