# Scan Frontend Code for XSS Risks

Unsafe client-side rendering can expose users to script injection. This skill reviews common frontend sinks and provides prioritized remediation guidance.

## Install

```bash
npx skillstore add sickn33/frontend-mobile-security-xss-scan
```

## Metadata

- Status: approved
- Slug: sickn33-frontend-mobile-security-xss-scan
- Skillstore revision: r2
- Version status: missing
- Tree hash: b31f718f24e31d11f6d9ca6ddd7a0a07b9628096f5d58d2e6306d0a4b20a604a
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/frontend-mobile-security-xss-scan
- Ref: 88a8e9a07f4c54ab105c1c41b6267c287146b07b
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, external\_commands, filesystem
- Quality score: 70
- Public page: https://skillstore.pages.dev/skills/sickn33-frontend-mobile-security-xss-scan
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-frontend-mobile-security-xss-scan/manifest

## Capabilities

- Identifies innerHTML usage associated with common user-input indicators.
- Flags React unsafe HTML rendering when sanitization is not detected.
- Detects Vue v-html usage and recommends safer rendering options.
- Reviews URL assignments for common input indicators and unsafe protocols.
- Organizes findings by severity with file locations and remediation guidance.

## Use Cases

- Review a feature before merge: Check changed frontend components for unsafe HTML, URL assignments, and missing sanitization before code review.
- Triage an XSS assessment: Create an initial list of likely client-side injection sinks for manual verification and prioritization.
- Define secure rendering standards: Build a framework-specific checklist for React, Vue, Angular, and browser DOM code.

## Prompt Templates

### Check a frontend snippet

```
Review this frontend snippet for XSS risks. Identify unsafe sinks, explain each risk, and suggest a secure alternative: [paste snippet]
```

### Review a framework component

```
Analyze this [React, Vue, or Angular] component for unsafe HTML rendering, URL injection, and sanitizer misuse: [paste component]
```

### Triage repository findings

```
Review the frontend files in [path]. Prioritize exploitable XSS paths, list evidence, and separate confirmed issues from items needing manual validation.
```

### Perform advanced source-to-sink analysis

```
Trace untrusted data from [sources] to HTML, script, URL, and event-handler sinks. Evaluate sanitization by context and document likely false negatives.
```

## Limitations

- The included scanner code is illustrative and omits helper implementations and imports.
- String matching does not provide complete source-to-sink data-flow analysis.
- File-wide sanitization checks can miss unsafe values that bypass the sanitizer.
- The guidance does not cover native iOS or Android rendering APIs.

## Best Practices

- Provide complete files or relevant data-flow context around each suspected sink.
- Verify every reported path manually before treating it as exploitable.
- Run framework tests and browser security tests after applying remediation.

## Anti Patterns

- Do not assume a sanitizer import proves that every rendered value is sanitized.
- Do not classify every innerHTML occurrence as exploitable without tracing its input.
- Do not replace contextual validation with simple keyword matching.

## Security Audit

- Audited at: 2026-07-23T23:04:18.352\+00:00
- Summary: All 24 static findings are false positives caused by Markdown fences, TypeScript template literals, documented security commands, and expected local file reads. A separate medium-severity logic flaw can suppress valid React findings when any sanitization term appears elsewhere in a file.

## Stats

- Views: 101
- Downloads: 14
- Favorites: 0
- Popularity score: 0
