ui-secure-review
Skill78 starsChanged 5 months agoApache-2.0View on GitHub
Review frontend and UI changes for concrete security risks such as XSS, unsafe URL handling, token leakage, missing origin checks, and client-side authorization gaps. Use when users ask for a UI code review focused on safety and reliability.
In this repository6 other files it gives its agents.
- .cursor/rules/coding-standards.mdcCursor rule
- ui-resilient-accessibilitySkill
- ui-safe-form-patternsSkill
- image-prompt-craftSkill
- personal-document-searchSkill
- workflow-agent-kitSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when the user asks for a frontend review with a security-first lens.
- Distinctive: line 21
Run quick pattern scans for dangerous APIs and sinks.
- Distinctive: line 22
Read high-risk files in detail and trace data from input to render.
- Distinctive: line 38
Use these patterns as a first pass, then manually verify context.
- Distinctive: line 47
Prefer safe templating and escaped rendering over raw HTML insertion.
- Distinctive: line 49
Keep tokens in secure httpOnly cookies when architecture allows.
- Distinctive: line 50
Add strict allowlists for cross-origin messaging and navigation targets.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
UI Secure Review
Use this skill when the user asks for a frontend review with a security-first lens.
When to use
- Reviewing PRs that touch UI rendering, routing, auth, storage, or API calls.
- Auditing React, Vue, or plain JavaScript UI code for exploitable patterns.
- Hardening existing UI code before release.
When not to use
- Pure visual polish work with no logic or data handling changes.
- Backend-only or infra-only changes.
Review workflow
- Map changed files and rank risk by feature type.
- Run quick pattern scans for dangerous APIs and sinks.
- Read high-risk files in detail and trace data from input to render.
- Confirm exploitability, impact, and realistic attack path.
- Report findings ordered by severity with exact file and line references.
- Suggest minimum safe fix and regression tests for each finding.
High-risk patterns to check
- HTML injection:
dangerouslySetInnerHTML,v-html,innerHTML,outerHTML. - Script execution:
eval,new Function, string-based timers. - URL and navigation sinks: dynamic
href,window.open, router redirects from untrusted params. - Tabnabbing risk: external links with
target="_blank"missingrel="noopener noreferrer". - Token exposure: auth tokens in query params, logs, localStorage, or error traces.
- Cross-origin trust:
postMessagewithout strictoriginandsourcechecks. - Client-only authorization assumptions that can be bypassed in browser devtools.
- Sensitive data persistence in cache, URL, or browser storage.
Quick scan commands
Use these patterns as a first pass, then manually verify context.
rg -n "dangerouslySetInnerHTML|v-html|innerHTML|outerHTML|eval\(|new Function\(" frontend/src
rg -n "window\.open|postMessage|target=\"_blank\"|localStorage|sessionStorage" frontend/src
rg -n "token|authorization|auth|redirect|location\.href|router\.push" frontend/srcFix guidance
- Prefer safe templating and escaped rendering over raw HTML insertion.
- Validate and normalize all dynamic URLs before navigation.
- Keep tokens in secure httpOnly cookies when architecture allows.
- Add strict allowlists for cross-origin messaging and navigation targets.
- Enforce authorization on the server even if UI hides actions.
Output contract
- Findings first, ordered by severity.
- Include file path, line, risk, exploit scenario, and concrete fix.
- Explicitly say "No high-confidence findings" if nothing actionable is found.
- Mention residual test gaps or assumptions.
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
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.

