agentleFS
LazyAGILazyAGI/LazyMind/skills/.curated/ui-secure-review/SKILL.md

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.

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
  1. Distinctive:

    Use this skill when the user asks for a frontend review with a security-first lens.

    line 8
  2. Distinctive:

    Run quick pattern scans for dangerous APIs and sinks.

    line 21
  3. Distinctive:

    Read high-risk files in detail and trace data from input to render.

    line 22
  4. Distinctive:

    Use these patterns as a first pass, then manually verify context.

    line 38
  5. Distinctive:

    Prefer safe templating and escaped rendering over raw HTML insertion.

    line 47
  6. Distinctive:

    Keep tokens in secure httpOnly cookies when architecture allows.

    line 49
  7. Distinctive:

    Add strict allowlists for cross-origin messaging and navigation targets.

    line 50

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Map changed files and rank risk by feature type.
  2. Run quick pattern scans for dangerous APIs and sinks.
  3. Read high-risk files in detail and trace data from input to render.
  4. Confirm exploitability, impact, and realistic attack path.
  5. Report findings ordered by severity with exact file and line references.
  6. 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" missing rel="noopener noreferrer".
  • Token exposure: auth tokens in query params, logs, localStorage, or error traces.
  • Cross-origin trust: postMessage without strict origin and source checks.
  • 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/src

Fix 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.