security-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSecurity Audit
安全审计
Find what a site exposes to visitors and attackers: leaked secrets, open files and endpoints, weak headers and cookies, mixed content, and signs of compromise. Then fix it in the order that limits damage.
This is not a penetration test. squirrelscan reports what it can see and prove from outside; a clean run means these checks found nothing, not that the site is secure.
找出站点向访问者和攻击者暴露的内容:泄露的密钥、开放的文件和端点、不安全的响应头与 Cookie、混合内容,以及网站遭入侵的迹象。然后按照能够将损害降到最低的顺序进行修复。
这不是渗透测试。squirrelscan 报告其从外部能够观察并证实的问题;一次干净的运行仅表示这些检查未发现问题,并不代表站点安全。
Before the first audit
首次审计前
Run . If it fails, install the CLI from squirrelscan.com/download (the skill has ). Then run :
squirrel --versionsquirrelscanreferences/install.mdsquirrel auth status- Signed out, or : the audit runs on this machine, is free, and nothing is published.
--offline - Signed in: the audit is billed in credits (50 plus 2 per audited page, plus 1 per distinct external link the cloud verifies), adds the site to the user's dashboard, can turn on recurring audits and publishes an unlisted report. Tell the user the cost () and get a yes. Offer
squirrel creditsor--offline. For a site the user does not own, add--no-publish: nothing is added to the dashboard, scheduled or published.--ephemeral
Every flag below is checked against the squirrel CLI docs (https://docs.squirrelscan.com/cli/audit). Rule docs: .
https://docs.squirrelscan.com/rules/{category}/{rule_id}运行 。如果失败,则从 squirrelscan.com/download 安装 CLI( skill 中包含 )。随后运行 :
squirrel --versionsquirrelscanreferences/install.mdsquirrel auth status- 未登录或使用 :审计将在本机运行,免费,且不会发布任何内容。
--offline - 已登录:审计将消耗 credits 计费(50 credits,另加每个受审计页面 2 credits,以及云端验证的每个不同外部链接 1 credits),并将站点添加到用户仪表板;它还可以启用定期审计,并发布一份非公开报告。请告知用户费用()并获得用户同意。提供
squirrel credits或--offline选项。对于用户并不拥有的站点,添加--no-publish:不会将站点添加到仪表板,不会安排定期审计,也不会发布报告。--ephemeral
以下使用的每个 flag 均已根据 squirrel CLI 文档核对(https://docs.squirrelscan.com/cli/audit)。规则文档:`https://docs.squirrelscan.com/rules/{category}/{rule_id}`。
Who owns the site decides the probe level
站点所有权决定探测级别
squirrelscan can send probes beyond the crawl (see ). Ask first: "Do you own this site, or are you authorized to test it?"
--probe| Situation | Command |
|---|---|
| Not the user's site, or unknown | |
| The user's own site, normal check | |
| The user's own site, deep check | Only after the user says in this conversation that they own it or may test it: |
Never add or on your own. Aggressive probing makes many requests and many 404s, requests paths that disallows on purpose, can trip a WAF, and is what runs and . An aggressive run also asks for , which makes an exposed Spring server write a dump to disk.
--aggressive--pentestrobots.txtsecurity/exposed-filessecurity/supabase-rls/actuator/heapdump--offline--passivesquirrelscan 可以发送超出抓取范围的探测请求(参见 )。首先询问:“你拥有此站点,或是否获授权测试它?”
--probe| 情况 | 命令 |
|---|---|
| 不是用户的站点,或所有权未知 | |
| 用户自己的站点,常规检查 | |
| 用户自己的站点,深度检查 | 仅在用户于当前对话中声明拥有该站点或有权测试后使用: |
绝不要自行添加 或 。激进探测会发送大量请求并产生大量 404,请求 明确禁止访问的路径,还可能触发 WAF; 和 规则也需要通过这种模式运行。激进运行还会请求 ,这会使暴露该端点的 Spring 服务器将堆转储写入磁盘。
--aggressive--pentestrobots.txtsecurity/exposed-filessecurity/supabase-rls/actuator/heapdump--offline--passiveReading the findings
读取审计结果
- Export the full list: (the
squirrel audit <url> --rule-include security,integrity --format json -o security.jsonformat samples 5 pages and 5 items per rule).llm - Read ,
skippedChecksand thesummary.skippedline. A probe rule that was skipped (Not checked:,probing-passive,probing-not-aggressive) is not clean: say which checks did not run and what would run them.external-requests-off - Re-render later without recrawling: .
squirrel report <audit-id> --group security --severity error --format llm - Never paste a leaked secret into chat, a commit or a PR. Name the rule, the file or URL and the key type only.
- 导出完整清单:(
squirrel audit <url> --rule-include security,integrity --format json -o security.json格式仅采样 5 个页面以及每条规则 5 个项目)。llm - 读取 、
skippedChecks和summary.skipped行。被跳过的探测规则(Not checked:、probing-passive、probing-not-aggressive)不能视为干净:应说明哪些检查未运行,以及怎样才能运行它们。external-requests-off - 稍后无需重新抓取即可重新渲染报告:。
squirrel report <audit-id> --group security --severity error --format llm - 绝不要将泄露的密钥粘贴到聊天、commit 或 PR 中。只需注明规则名称、文件或 URL 以及密钥类型。
Fix order
修复顺序
- findings first (injected pages, cloaking, phishing kits, obfuscated scripts,
integrity/*). These can mean the site is compromised. Tell the user before changing anything; do not just delete files, since the entry point (a plugin, a CI token, a stolen login) is still open. Hand off to their host or incident process.integrity/known-malicious-url - Leaked secrets (,
security/leaked-secrets): removing the key from the code is not enough. Rotate it at the provider, then remove it, then check git history. A key that shipped to browsers was read.security/token-storage - Exposed files and endpoints (,
security/exposed-files,security/exposed-actuator,security/graphql-introspection,security/graphql-get-mutations,security/unauthenticated-api,security/json-sensitive-fields,security/auth-endpoint-disclosure): block at the server or the edge, or add authentication. Hiding a link does not fix an open endpoint.security/client-side-authz - Supabase tables (): use the
security/supabase-rlsskill.supabase-security-audit - Transport (,
security/https,security/http-to-https,security/tls-certificate,security/mixed-content,security/hsts,security/form-https).security/password-form-get - Headers (,
security/csp,security/x-frame-options,security/x-content-type,security/referrer-policy): use thesecurity/permissions-policyskill for the config.security-headers - Cookies and third parties (,
security/cookie-flags,security/third-party-cookies,security/sri,security/open-redirect,security/new-tab,security/version-disclosure).security/security-txt
- 首先处理 发现(注入页面、cloaking、phishing kit、混淆脚本、
integrity/*)。这些问题可能意味着站点已遭入侵。在进行任何更改前先告知用户;不要只是删除文件,因为入口点(插件、CI token 或被盗登录凭据)仍然存在。将问题移交给站点托管方或其事件响应流程。integrity/known-malicious-url - 泄露的密钥(、
security/leaked-secrets):仅从代码中删除密钥并不足够。先在密钥提供方处轮换密钥,然后删除旧密钥,再检查 Git 历史。任何已经下发到浏览器的密钥都应视为已被读取。security/token-storage - 暴露的文件和端点(、
security/exposed-files、security/exposed-actuator、security/graphql-introspection、security/graphql-get-mutations、security/unauthenticated-api、security/json-sensitive-fields、security/auth-endpoint-disclosure):在服务器或边缘层进行阻断,或添加身份验证。仅仅隐藏链接无法修复开放端点。security/client-side-authz - Supabase 表():使用
security/supabase-rlsskill。supabase-security-audit - 传输安全(、
security/https、security/http-to-https、security/tls-certificate、security/mixed-content、security/hsts、security/form-https)。security/password-form-get - 响应头(、
security/csp、security/x-frame-options、security/x-content-type、security/referrer-policy):使用security/permissions-policyskill 进行配置。security-headers - Cookie 和第三方服务(、
security/cookie-flags、security/third-party-cookies、security/sri、security/open-redirect、security/new-tab、security/version-disclosure)。security/security-txt
Where the fix usually lives
修复通常位于何处
| Stack | Look here |
|---|---|
| Next.js | |
| WordPress | |
| Shopify | theme code ( |
| Webflow | Site settings, custom code (head and body), the hosting settings; headers are limited to what Webflow exposes |
| Cloudflare | Rules, then Transform Rules (modify response headers); SSL/TLS, Always Use HTTPS, WAF custom rules for blocking paths |
| Vercel | |
| Netlify | |
| Supabase | Row Level Security policies, the API keys page, Edge Functions; see |
| 技术栈 | 查看位置 |
|---|---|
| Next.js | |
| WordPress | |
| Shopify | 主题代码( |
| Webflow | 站点设置、自定义代码(页头和正文)、托管设置;响应头只能使用 Webflow 开放的功能 |
| Cloudflare | Rules,然后是 Transform Rules(用于修改响应头);SSL/TLS、Always Use HTTPS、用于阻断路径的 WAF 自定义规则 |
| Vercel | |
| Netlify | |
| Supabase | Row Level Security 策略、API keys 页面、Edge Functions;参见 |
Stop condition
停止条件
Stop when a re-audit with the same command and shows no error-severity findings in and , every probe rule that applies was checked (not skipped), exposed secrets are rotated (ask the user to confirm), and anything left is a documented decision. A finding that is intentional (a public file listed in , a table public by design) is waived with an entry that has a , not by disabling the rule. See in the skill.
--refreshsecurityintegritysecurity/exposed-files[[ignore]]reasonreferences/configuration.mdsquirrelscan当使用相同命令并添加 重新审计后, 和 中不再存在 error 严重度的发现、所有适用的探测规则均已检查(未被跳过)、暴露的密钥均已轮换(请用户确认),且所有遗留项都有书面决定时,即可停止。有意保留的发现(例如 中列出的公开文件、按设计公开的表)应通过带 的 条目豁免,而不是禁用规则。参见 skill 中的 。
--refreshsecurityintegritysecurity/exposed-filesreason[[ignore]]squirrelscanreferences/configuration.mdHand off
移交给其他 skill
- Supabase app: . Header and CSP config:
supabase-security-audit.security-headers - Findings outside security (SEO, links, performance): .
audit-website - Gate it in CI: .
website-ci-gate
- Supabase 应用:。响应头和 CSP 配置:
supabase-security-audit。security-headers - 安全范围之外的发现(SEO、链接、性能):。
audit-website - 在 CI 中设置门禁:。
website-ci-gate