Skip to content

AI code review & agentic pentesting

Find the bugs.
Ship with confidence.

Feluda reviews your pull requests and tests your app for vulnerabilities. Trace every finding. Fix it before you ship.

Continue with Puku →
Pentests / checkout-api / FEL-142
DEMO
ASSESSMENT #2
CRITICAL · CVSS 9.1✓ Validated by 2 agentsFEL-142 · OWASP API:2023

Any customer can read another tenant’s orders

WHAT HAPPENED

Logged in as customer-b, the agent changed the order ID and received tenant-a’s order. The handler loads by ID without checking the caller’s tenant.

PROOF Replayed as customer-b · 1 request
200 OK
GET /v1/orders/8812
Host
staging.checkout.puku.sh
Authorization
Bearer demo_customer_b
Owns resource
No · belongs to tenant-a
SUGGESTED FIXScope access to the caller
src/orders/handler.ts+2 −1
41   const order = await db.orders.findFirst({42 −   where: { id: params.id },42 +   where: { id: params.id, tenantId: ctx.user.tenantId },43   });44 + if (!order) throw new NotFound();
Changes only this demo.

Choose a finding, replay the exploit, then apply and retest its fix.

Interactive demo · sample data · no account needed

PROLOGUE · THE CRIME

Bugs and breaches don’t break in. They’re let in, one approved pull request at a time.

EXHIBIT A · THE REVIEWER

400 lines, 10 minutes before standup, and a “LGTM” that means “looks too long to read.”

EXHIBIT B · THE BLIND SPOT

The diff looks fine. The bug lives in the caller three files away, or in production traffic no one connects back.

EXHIBIT C · THE INTRUDER

Whatever slips through, someone outside will find. They’re patient, and they test every door.

You don't need another linter. You need a detective who reads the whole case, every time.

ENTER FELUDA ↓
02:14:07.402  POST /v1/refresh       200  112ms02:14:07.403  POST /v1/refresh       200  109ms02:14:07.611  GET  /v1/me            401    6ms   user=7f3a02:14:07.612  WARN token revoked     sid=c91e   reason=reuse

×2 · 1 ms apart → no lock → race

EXHIBIT D · CASE 0482 · HOW FELUDA WORKED IT

Case 0482. Closed in two minutes.

Watch the full trace

Feluda read 3 files and 1,204 log lines and found the cause in 2 minutes. It reviews every pull request like this one.

FELUDA / 02

Feluda follows
the trace.

02 / INVESTIGATE · 2¢

WHERE THE WORK HAPPENS · SCROLL

It shows up in the pull request. Nowhere else to check.

puku/api-gateway · Pull request #482

Refresh session tokens in background #482

Opensamnan wants to merge 3 commits into main
ConversationCommits 3Checks 2Files changed 3
  40    const token = await store.get(session.id)
  41 +  if (isExpired(token)) {
  42 +    const next = await provider.refresh(token)
feludabotHIGH · RACE

Two parallel requests can refresh the same token; the provider revokes the first and logs a user out. Seen in 0.4% of 401s since Sep 28.

feluda / review — 1 high found so far…
GITLAB · MERGE REQUEST !482feluda commented on session/refresh.ts:42 · Pipeline: feluda-review passed with findings

HOW IT WORKS

Five layers between a push and a verdict.

Evidence comes in from your providers. Feluda builds the case layer by layer, and only the conclusion reaches your PR.

PR commentAnalyticsGitHubGitLabProd logsPuku context05 · RESOLVEPR comment + analytics04 · CODEBASE GRAPHEvery caller, every import03 · INVESTIGATEFollows the trace to root cause02 · DIFF READERWhat changed and why01 · OBSERVEEvery PR, every push

HOVER A LAYER

LIVE REVIEW · INTERACTIVE

Catches the bug your reviewer scrolled past.

Click any finding to jump to the line. Hit “Apply fix” to see the suggested commit.

PR #482 · api-gateway

Refresh session tokens in background

CONFIDENCE

3 / 5 · Safe to merge after the fix

session/refresh.ts+12 −4
39 export async function refresh(session) {
40 const token = await store.get(session.id)
41 + if (isExpired(token)) {
42 + const next = await provider.refresh(token)
43 + await store.set(session.id, next)
44 + }
feludacommented just now

Two parallel requests can both see an expired token and refresh it twice. The provider then revokes the first refresh token, so one user is randomly logged out. I traced this to the 0.4% of 401s in production since Sep 28.

+ return lock(session.id, async () => {
+   const next = await provider.refresh(token)
+   await store.set(session.id, next)
+ })

REVIEW CONFIGURATION · TRY IT

Tell the detective what to report.

Turn a section on and the preview updates. These are the same four steps your team sees in onboarding.

PREVIEW · WHAT FELUDA POSTS ON YOUR PR

Moves token refresh into middleware. Introduces a race when two requests refresh at once.

HIGH  session/refresh.ts:42   race on refresh
MED   session/retry.ts:18     unhandled reject
LOW   orders/list.ts:31       N+1 on items
+ return lock(session.id, refreshOnce)

FELUDA ATTACK · AGENTIC PENTESTS

Then it breaks in, before someone else does.

402 agents form hypotheses about your app, try them for real, and only report what they could actually exploit.

✓ COMPLETED · 4H 32M · CHECKOUT-API
WHAT RECON FOUND42 endpoints · 7 flows

Checkout & payments

POST /v1/cart · POST /v1/coupons/apply · POST /v1/checkout · GET /v1/orders/{id}

Auth & sessions

POST /auth/login · POST /auth/refresh · POST /auth/2fa · JWT (HS256)

Integrations

POST /v1/webhooks (outbound URL) · S3 uploads · Stripe callbacks

Trust boundaries

3 roles · 2 tenants · admin API on same host

Attack plan · 18 hypotheses

5 confirmed · 11 disproved · 2 skipped

● CONFIRMEDSequential order ids + no tenant filter → cross-tenant readFEL-142
● CONFIRMEDJWT library accepts alg=none → impersonate any userFEL-143
○ DISPROVEDWebhook URL reaches cloud metadata (SSRF)blocked · 422
○ DISPROVEDCustomer can PATCH own role to adminblocked · 403
– SKIPPEDCheckout with stolen 2FA session — needed a codeRun with human in the loop
AGENTWHAT IT TRIEDRESULTTIMEREPLAY
idor-07Swap order ids between tenant-a and tenant-b sessions▲ Exploited · FEL-1425m 40s
jwt-01Re-sign tokens with alg=none, HS/RS confusion, weak secrets▲ Exploited · FEL-1433m 12s
sqli-0360 SQL/NoSQL payloads on /v1/coupons/apply✓ Blocked7m 03s
ssrf-01Point webhook URL at 169.254.169.254 and internal hosts✓ Blocked2m 48s
biz-05Replay checkout with a hijacked session behind 2FA– Skipped · needs input0m 40s

YOUR NEXT CASE

Put Feluda on your next pull request.

Continue with PukuIncluded in Puku Team & Enterprise