- Home
- Skills
- Code Quality & Review
- Actor-Can-Read Audit: Unreadable Approvals
Actor-Can-Read Audit: Unreadable Approvals
Find approve, sign, resolve and complete flows that act on content the actor never sees, and status values no route can ever reach. Per-stack search recipes, a findings template and a stdlib Python state-writer scanner.
$29
Works with the AI Agents you already use
Actor-Can-Read Audit: Unreadable Approvals
Example session with this skill installed
Audit our Express + Postgres app for the actor-can-read defect before we ship the new claims review queue. Repo is at ./api, the reviewer UI is in ./web.
- Read your context and instructions
- Compiled the actor-can-read audit
- Generated the document
Summary
Two instances of the defect and one dead workflow state. The claims queue you are about to ship is one of them: reviewers can approve a claim whose body no route returns to them.
Action surfaces
| Surface | Verdict | Read path | Role gate | UI renders | Notification |
|---|---|---|---|---|---|
POST /claims/:id/approve | exists-but-unwired | GET /claims/:id exists (api/routes/claims.js:41) but is gated to role=adjuster; reviewers get 403 | reviewer may POST (:88) | web/src/ClaimsQueue.tsx:120 renders only title, amount, submittedAt | email carries a count: "3 claims await review" (api/jobs/notify.js:19) |
POST /notes/:id/sign | missing | no GET /notes/:id; the queue returns {id, status} only (api/routes/notes.js:12) | ok | Sign button only | none |
POST /reports/:id/reject | works | GET /reports/:id returns body (:27), reviewer can reach it, ReportView.tsx:44 renders it, email links to it | ok | ok | ok |
Status columns
$ python scripts/find_state_writers.py ./api interpretation
== awaiting_review (declared 1, writes 1: 1 creation / 0 transition) <-- CREATION ONLY
written at: api/routes/assessments.js:33 [write-creation] interpretation: 'awaiting_review'
== reviewed (declared 1, writes 0) <-- NEVER WRITTEN
read at: web/src/AssessmentCard.tsx:17 [read] if (a.interpretation === 'reviewed')
Flags: interpretation: DEAD COLUMN (no transition write anywhere)
No route in the app can move an assessment out of awaiting_review. The card promises a review step that cannot happen.
Verified vs inferred
Verified in the running dev instance as reviewer: the 403 on GET /claims/:id and the leaked-ID case (a reviewer can read GET /reports/:id for another practice; filter is in the template, not the query, api/routes/reports.js:27). Inferred from source only: the notes-signing surface.
Required fixes
- Claims: add reviewer to the read gate on
GET /claims/:id; render the body in the queue detail pane; refuseapproveserver-side with 409 unless anopenedaudit row exists for this reviewer; link the email to the claim. - Notes: add
GET /notes/:id; gatesignthe same way. - Assessments: add
PATCH /assessments/:id/interpretationwith the reviewer role and the UI control, or remove the state and the promise. - Reports: move the practice filter into the query. Added a test that asserts the current leak with a comment to update, not delete.
Escape the claim body on first render; it is submitter-supplied text going into a staff browser.
ClaimsQueue.tsx
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
A focused audit for one defect class that passes ordinary code review: an actor can approve, sign, resolve or complete something the interface never shows them. Every piece looks correct (the action endpoint is authorized, the audit log records the decision, the notification fires) and the gap sits between two correctly built features. The same skill covers the sibling defect: a status value that is written at creation and that no route can ever change, so the workflow is permanently dead while the code reads as finished.
You get
- A procedure the agent follows surface by surface: is there a read path for the full content, can the acting role reach it, does the UI render it, does the notification carry content or a link, and can the submitter re-read their own submission.
reference/search-recipes.md: ripgrep recipes for Express, Next.js, Django, Rails, Laravel and Spring that list state-changing routes, status columns, projections and notification senders.scripts/find_state_writers.py(Python 3.10+, standard library, offline): given a repo and a column or enum name, lists every value, every file that writes it, whether each write is a creation or a transition, and flags values never written, values written only at creation, and columns with no transition at all.reference/findings-template.md: the report format with works / exists-but-unwired / missing verdicts and a verified-versus-inferred split.- The required fix shape (structural server-side 409 gate, audit the open, list views without bodies) and the security corollary for rendering user-supplied content.
- The traps that produce confident wrong answers: inverted authorization conditionals, filters in the template instead of the query, merged-is-not-deployed.
Limits
It does not replace an authorization audit, and the scanner is a text heuristic that cannot see triggers, stored procedures or other services.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Script uses text heuristics. Cannot detect writes from stored procedures, triggers, or cross-service calls. Requires Python 3.10 for the state writer script.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 19 days ago
- Software
Python 3.10+
ripgreporgrep
Python uses the standard library only.