Session Review
FreeCheck that a feature uses the server session and never a user id sent from the browser.
Purpose
Catch the common failure where the client picks whose data to read.
Procedure
--- name: session-review description: Check that a feature uses the server session and never a user id sent from the browser. ---
Session Review
Purpose
Catch the common failure where the client picks whose data to read.
Procedure
Find every server entry the feature added or changed.
Confirm:
- The user id comes from the session helper used in this codebase, not from the request body.
- A signed-out caller is rejected for personal data. Public catalog reads may proceed without a session.
- The code that runs in the browser does not decide roles. It may hide a button; the server still checks.
- Tokens, session cookies, and service credentials are not logged or returned in a skill body or error.
- A preview or dev fallback user is not accepted when a real database and real auth are on. Do not reintroduce a shared demo user.
Look for: hidden inputs named userId, query params like ?user=, and localStorage "currentUser" used as authority.
Report findings as file plus the specific check that failed. Do not rewrite the auth library. If the feature is correct, say what you checked and that you found no issue. Do not invent a vulnerability to seem thorough.
Example requests
1. Review a save endpoint
Request: Run Session Review on the save-skill server function. Expected: A pass or a specific finding: client-supplied user id, missing check, or correct session use.
Dependencies
None. Work in the repository that is already open. Do not add packages unless the procedure names one.
Compatibility
This document follows the Agent Skills layout (a folder named session-review containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it.
Example prompts
Review a save endpoint
Run Session Review on the save-skill server function.
Expected: A pass or a specific finding: client-supplied user id, missing check, or correct session use.
Choose the agent
This skill is installed for one agent at a time. Pick the section you are using.
Related
- Query Scoping
Scope every read and write of personal rows by the session user, in the query itself.
- Secrets Handling
Keep credentials on the server, out of the client bundle, and out of the repository.
- Threat Model a Change
Walk a change for spoofing, tampering, and data exposure before it ships.
Reviews
No reviews yet.
Sign in to review.
Report a problem
Inaccurate steps, an unsafe instruction, or a licensing concern.
Sign in to report.