Logo van Perseus Client

Perseus Client

Community
kaivyy
perseus-client

Client-side security analysis (DOM XSS, React/Vue/Angular, SSR, prototype pollution)

Overzicht

Uitgeverkaivyy
Repositoryperseus
Skillnaamperseus-client
Sterren
68
Forks
14
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door kaivyy op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Perseus Client in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/kaivyy/perseus/tree/main/skills/perseus/specialists/client
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kaivyy/perseus.git /tmp/perseus
mkdir -p .claude/skills
cp -r /tmp/perseus/skills/perseus/specialists/client .claude/skills/perseus-client
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Perseus Client in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Perseus Client automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Perseus Client niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Perseus Client-Side Specialist

Context & Authorization

IMPORTANT: This skill performs client-side security analysis on the user's own codebase. This is defensive security testing to find browser-side vulnerabilities.

Authorization: The user owns this codebase and has explicitly requested this specialized analysis.


Multi-Framework Support

FrameworkVersionsSpecial Considerations
React16+, 18+, 19+RSC, Server Actions, JSX injection
Next.js12+, 13+, 14+, 15+App Router, Server Components, Middleware
Vue2, 3v-html, template injection
Angular12+bypassSecurityTrust*, template injection
Svelte3, 4, 5{@html}, SSR
SolidJS1.xinnerHTML, SSR
Vanilla JSES6+Direct DOM manipulation
jQueryAll.html(), .append()

Overview

This specialist skill performs deep client-side JavaScript security analysis, focusing on vulnerabilities in modern frameworks including React, Vue, Angular, and SSR frameworks.

When to Use: After /scan identifies significant client-side JavaScript, SPAs, or SSR applications.

Goal: Find DOM-based XSS, prototype pollution, and framework-specific vulnerabilities.

Engagement Mode Compatibility

ModeSpecialist Behavior
PRODUCTION_SAFECode-level and rendering-path analysis, minimal runtime probes
STAGING_ACTIVEControlled browser-side verification with throttling
LAB_FULLExpanded dynamic client attack-surface validation
LAB_RED_TEAMEnd-to-end client attack-chain simulation in isolated lab

Safety Gates (Required)

  1. Read deliverables/engagement_profile.md before active runtime testing.
  2. Default to PRODUCTION_SAFE when mode is not specified.
  3. Enforce kill-switch thresholds and stop on instability.
  4. Never execute persistent or user-impacting payloads in production.

Client-Side Risks Covered

RiskDescriptionImpact
DOM XSSClient-side script injectionAccount takeover, data theft
React XSSUnsafe HTML rendering, href injectionXSS via JSX
SSR InjectionServer component injectionRCE, data leak
Prototype PollutionObject prototype manipulationXSS, DoS, logic bypass
PostMessage AbuseCross-origin message issuesData leakage, XSS
DOM ClobberingHTML overwriting JS variablesXSS, security bypass
Client StorageSensitive data exposureSession hijacking

Execution Instructions

Step 0: Mode & Scope Alignment

  • Load mode/scope/limits from deliverables/engagement_profile.md.
  • Respect deliverables/verification_scope.md when present.
  • In PRODUCTION_SAFE, prefer static and minimal observable checks only.

Phase 1: React/Next.js Security Analysis (5 Parallel Agents)

  1. React XSS Analyst:

    • "Find React-specific XSS vectors."

    Vulnerable Patterns:

    jsx
    // VULNERABLE - Dangerous HTML rendering
    <div dangerouslySetInnerHTML={{ __html: userInput }} />
    
    // VULNERABLE - javascript: in href
    <a href={userUrl}>Click</a>
    // Attack: userUrl = "javascript:alert(1)"
    
    // VULNERABLE - Dynamic component
    const Component = components[userInput];
    return <Component />;
    
    // VULNERABLE - Spread props from user
    <div {...userProps} />
    // Attack: userProps = { dangerouslySetInnerHTML: { __html: '<script>...' } }
  2. Next.js Server Component Analyst:

    • "Analyze Next.js App Router and Server Components for security issues."

    Patterns:

    typescript
    // VULNERABLE - SQL in Server Component
    async function UserPage({ params }) {
      const user = await db.query(`SELECT * FROM users WHERE id = ${params.id}`);
      return <div>{user.name}</div>;
    }
    
    // VULNERABLE - Exposing secrets to client
    // In Server Component that passes to Client Component
    <ClientComponent apiKey={process.env.SECRET_KEY} />
    
    // VULNERABLE - Unvalidated redirect
    import { redirect } from 'next/navigation';
    redirect(userInput);
  3. Next.js Server Actions Analyst:

    • "Analyze Server Actions for security issues."

    Patterns:

    typescript
    // VULNERABLE - No auth check in Server Action
    'use server'
    async function deleteUser(userId: string) {
      await db.users.delete(userId);  // No auth check!
    }
    
    // VULNERABLE - SQL injection in Server Action
    'use server'
    async function searchUsers(query: string) {
      return db.query(`SELECT * FROM users WHERE name LIKE '%${query}%'`);
    }
    
    // VULNERABLE - CSRF (if custom implementation)
    // Server Actions have built-in CSRF protection, but check custom forms
  4. Next.js Middleware Analyst:

    • "Analyze Next.js middleware for security issues."

    Patterns:

    typescript
    // VULNERABLE - Open redirect
    export function middleware(request: NextRequest) {
      const url = request.nextUrl.searchParams.get('redirect');
      return NextResponse.redirect(url);  // No validation!
    }
    
    // VULNERABLE - Auth bypass via header manipulation
    export function middleware(request: NextRequest) {
      if (request.headers.get('x-admin') === 'true') {
        return NextResponse.next();  // Spoofable!
      }
    }
  5. React State Exposure Analyst:

    • "Check for sensitive data exposure in React state/props."

    Patterns:

    jsx
    // VULNERABLE - Secrets in client state
    const [config, setConfig] = useState({
      apiKey: 'sk-xxx',  // Exposed in React DevTools
      adminToken: '...'
    });
    
    // VULNERABLE - SSR hydration mismatch leaking data
    // Server renders with user data, client sees different user's data

Phase 2: Vue Security Analysis (3 Parallel Agents)

  1. Vue XSS Analyst:

    • "Find Vue-specific XSS vectors."

    Patterns:

    vue
    <!-- VULNERABLE - v-html with user input -->
    <div v-html="userContent"></div>
    
    <!-- VULNERABLE - Dynamic component -->
    <component :is="userComponent" />
    
    <!-- VULNERABLE - Template compilation -->
    <script>
    new Vue({
      template: userTemplate  // If user controls this
    });
    </script>
    
    <!-- VULNERABLE - javascript: in :href -->
    <a :href="userUrl">Link</a>
  2. Nuxt.js Analyst:

    • "Analyze Nuxt.js specific security issues."

    Patterns:

    typescript
    // VULNERABLE - Nuxt 3 server routes
    export default defineEventHandler((event) => {
      const id = getQuery(event).id;
      return db.query(`SELECT * FROM items WHERE id = ${id}`);
    });
    
    // VULNERABLE - Exposing secrets
    // nuxt.config.ts
    runtimeConfig: {
      public: {
        secretKey: process.env.SECRET  // Exposed to client!
      }
    }
  3. Vue State Analyst:

    • "Check Vuex/Pinia state for sensitive data exposure."

Phase 3: Angular Security Analysis (2 Parallel Agents)

  1. Angular XSS Analyst:

    • "Find Angular-specific XSS vectors."

    Patterns:

    typescript
    // VULNERABLE - bypassSecurityTrust*
    constructor(private sanitizer: DomSanitizer) {}
    
    getHtml() {
      return this.sanitizer.bypassSecurityTrustHtml(userInput);
    }
    
    // VULNERABLE - Template injection
    @Component({
      template: userTemplate  // If user controls this
    })
    
    // VULNERABLE - innerHTML binding
    <div [innerHTML]="userContent"></div>
  2. Angular SSR Analyst:

    • "Analyze Angular Universal for security issues."

Phase 4: DOM XSS Analysis (4 Parallel Agents)

  1. Source Identification Agent:

    • "Identify all DOM XSS sources across frameworks."

    Sources:

    javascript
    // URL-based sources
    location.hash
    location.search
    location.href
    document.URL
    document.documentURI
    document.referrer
    
    // Storage sources
    localStorage.getItem()
    sessionStorage.getItem()
    document.cookie
    
    // Message sources
    window.addEventListener('message', (e) => e.data)
    
    // Framework-specific
    // React: props from URL, useSearchParams()
    // Next.js: searchParams, params
    // Vue: $route.query, $route.params
  2. Sink Identification Agent:

    • "Identify all DOM XSS sinks across frameworks."

    Sinks:

    javascript
    // Direct sinks
    element.innerHTML = data
    element.outerHTML = data
    document.write(data)
    document.writeln(data)
    
    // jQuery sinks
    $(selector).html(data)
    $(selector).append(data)
    $(data)  // If data contains HTML
    
    // Eval sinks
    eval(data)
    new Function(data)
    setTimeout(data, 0)
    setInterval(data, 0)
    
    // Location sinks
    location.href = data
    location.assign(data)
    location.replace(data)
    window.open(data)
    
    // Framework-specific already covered above
  3. Flow Tracer Agent:

    • "Trace data flow from sources to sinks."
  4. URL Scheme Analyst:

    • "Check for javascript: and data: URL injection."

    Patterns:

    jsx
    // React
    <a href={url}>  // If url = "javascript:..."
    <iframe src={url}>
    
    // Check validation:
    if (!url.startsWith('https://')) { /* reject */ }

Phase 5: Prototype Pollution Analysis (3 Parallel Agents)

  1. Pollution Source Analyst:

    • "Find prototype pollution entry points."

    Patterns:

    javascript
    // VULNERABLE - Deep merge without __proto__ check
    function merge(target, source) {
      for (let key in source) {
        if (typeof source[key] === 'object') {
          target[key] = merge(target[key] || {}, source[key]);
        } else {
          target[key] = source[key];  // Can set __proto__
        }
      }
    }
    
    // VULNERABLE - URL params to object
    const params = Object.fromEntries(new URLSearchParams(location.search));
    // Attack: ?__proto__[isAdmin]=true
    
    // VULNERABLE libraries (check versions)
    // lodash < 4.17.12
    // jQuery < 3.4.0
    // minimist < 1.2.3
  2. Gadget Finder Agent:

    • "Find prototype pollution gadgets."

    Patterns:

    javascript
    // GADGET - Property access on polluted prototype
    if (options.isAdmin) {  // Can be polluted
      showAdminPanel();
    }
    
    // GADGET - HTML attribute setting
    element.setAttribute(key, config[key]);  // key from polluted proto
  3. Library Analyst:

    • "Check for vulnerable libraries."

Phase 6: PostMessage Analysis (2 Parallel Agents)

  1. PostMessage Receiver Analyst:

    • "Find all postMessage listeners."

    Patterns:

    javascript
    // VULNERABLE - No origin check
    window.addEventListener('message', (e) => {
      eval(e.data.code);  // RCE via any origin
    });
    
    // VULNERABLE - Weak origin check
    window.addEventListener('message', (e) => {
      if (e.origin.includes('trusted.com')) {  // trusted.com.evil.com bypasses
        // ...
      }
    });
    
    // SAFE
    window.addEventListener('message', (e) => {
      if (e.origin !== 'https://trusted.com') return;
      // ...
    });
  2. PostMessage Sender Analyst:

    • "Check postMessage sends for data leakage."

    Patterns:

    javascript
    // VULNERABLE - Sending to any origin
    parent.postMessage(sensitiveData, '*');
    
    // VULNERABLE - Token in message
    iframe.contentWindow.postMessage({ token: authToken }, '*');

Phase 7: Client Storage & Secrets (2 Parallel Agents)

  1. Storage Security Analyst:

    • "Analyze localStorage/sessionStorage usage."

    Issues:

    javascript
    // VULNERABLE - Token in localStorage (XSS accessible)
    localStorage.setItem('authToken', token);
    
    // VULNERABLE - Sensitive data persisted
    localStorage.setItem('user', JSON.stringify({
      ssn: '123-45-6789',
      creditCard: '4111...'
    }));
  2. Client Secret Analyst:

    • "Find secrets in client-side code."

    Patterns:

    javascript
    // Secrets in JS bundles
    const API_KEY = 'sk-xxx';
    const STRIPE_SECRET = 'sk_live_xxx';
    
    // Check .env files exposed
    // Check webpack/vite config for DefinePlugin exposure

Safe Payload Reference

AttackSafe Test PayloadVerification
DOM XSS#<img src=x onerror=alert(1)>Alert box appears
React hrefjavascript:alert(1)Alert on click
Prototype Pollution?__proto__[test]=polluted({}).test === 'polluted'
PostMessageSend from different originCheck if processed

Output Requirements

Create deliverables/client_side_analysis.md:

markdown
# Client-Side Security Analysis

## Summary
| Category | Issues Found | Critical | High | Medium |
|----------|--------------|----------|------|--------|
| React/Next.js XSS | X | Y | Z | W |
| Vue XSS | X | Y | Z | W |
| Angular XSS | X | Y | Z | W |
| DOM XSS | X | Y | Z | W |
| Server Components | X | Y | Z | W |
| Prototype Pollution | X | Y | Z | W |
| PostMessage | X | Y | Z | W |
| Client Storage | X | Y | Z | W |

## Framework Detected
- Primary: [React 18, Next.js 14, Vue 3, etc.]
- SSR: [Yes/No]
- Build Tool: [Vite, Webpack, Turbopack]

## Critical Findings

### [CLIENT-001] XSS via dangerouslySetInnerHTML
**Severity:** Critical
**Framework:** React
**Location:** `components/Comment.tsx:23`

**Vulnerable Code:**
```jsx
<div dangerouslySetInnerHTML={{ __html: comment.body }} />

Attack:

comment.body = "<img src=x onerror=alert(document.cookie)>"

Impact: Full XSS - can steal cookies, perform actions as user

Remediation:

jsx
import DOMPurify from 'dompurify';
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(comment.body) }} />

[CLIENT-002] SQL Injection in Server Action

Severity: Critical Framework: Next.js 14 Location: app/actions/search.ts:12

Vulnerable Code:

typescript
'use server'
async function searchProducts(query: string) {
  return db.query(`SELECT * FROM products WHERE name LIKE '%${query}%'`);
}

[CLIENT-003] Open Redirect in Next.js Middleware

Severity: High Location: middleware.ts:8


Framework Security Matrix

FrameworkAuto-EscapeCommon Pitfalls
ReactYes (JSX)dangerouslySetInnerHTML, href
Next.jsYesServer Actions auth, middleware
VueYesv-html, :href
AngularYesbypassSecurityTrust*

Recommendations

  1. Sanitize all user content with DOMPurify before rendering
  2. Validate URLs before using in href/src attributes
  3. Add authentication checks to all Server Actions
  4. Validate redirect URLs in middleware
  5. Move tokens from localStorage to HttpOnly cookies

**Next Step:** DOM XSS findings can be verified with browser testing.

Veelgestelde vragen

Wat doet de AI-skill Perseus Client?

Client-side security analysis (DOM XSS, React/Vue/Angular, SSR, prototype pollution)

Waarom Perseus Client gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Perseus Client bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Perseus Client in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/kaivyy/perseus/tree/main/skills/perseus/specialists/client. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Perseus Client gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Perseus Client gebruiken?

Zoveel als je wilt. Je kunt Perseus Client gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Perseus Client gratis?

Ja. Deze skill is door kaivyy op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇