web-perimeter-owasp-2025-audit
Passive, non-destructive web perimeter security auditing mapped to OWASP Top 10:2025 surface leads, CDN Unkeyed Header Web Cache Poisoning (X-Forwarded-Host), supply chain manifest exposure, git object dumping prevention (/.git/HEAD), cryptographic headers, and AI crawler boundary governance (llms.txt, robots.txt). Use when auditing production domains, configuring Cloudflare/Vercel/Nginx edge security, or preparing pre-launch perimeter checks.
SKILL.md 原文预览
Web Perimeter Security Audit (OWASP Top 10:2025 Surface Leads)
Conduct non-destructive, deterministic perimeter security audits against web applications, APIs, and CDN edges. Map observable edge findings to relevant OWASP Top 10:2025 categories as perimeter leads, and verify fixes with reproducible checks before shipping to production.
Scope & Unverified Application-Layer Areas
External HTTP response headers, CDN cache behavior, crawler policies, and disclosure files only inspect the publicly observable edge perimeter. Passing this checklist does not establish full OWASP Top 10:2025 compliance. Always report the following application-layer areas as unverified by perimeter probing unless backed by separate code review and authenticated testing:
- Authorization & Object-Level Access Control (A01:2025): BOLA/IDOR, tenant isolation, and privilege escalation require authenticated multi-role integration tests (OWASP Authorization Cheat Sheet).
- Authentication & Session Lifecycle (A07:2025): MFA enforcement, credential stuffing defenses, token rotation, and server-side session revocation cannot be proven from
Set-Cookieflags alone (OWASP Authentication Cheat Sheet). - Injection & Business Logic Processing (A05 / A06:2025): SQL/NoSQL/command injection, SSRF, and race conditions require source analysis (SAST) and targeted DAST (OWASP Injection Prevention Cheat Sheet).
- Internal Security Logging & Alerting (A09:2025): Audit trail completeness, tamper resistance, and SIEM alerting must be verified inside the telemetry pipeline (OWASP Logging Cheat Sheet).
Important Safety Contract
- Never send destructive payloads, brute-force traffic, or unisolated cache-poisoning probes against shared production cache keys.
- Before sending any
X-Forwarded-HostorX-Forwarded-Schemeprobe against a live target, first prove query-key isolation using fresh, validated hexadecimal cache-busters (set -euo pipefail,CB_A=$(openssl rand -hex 8)andCB_B=$(openssl rand -hex 8)):
- Fail closed before sending any request if
CB_AorCB_Bis empty, equal, or does not match^[0-9a-f]{16}$. - Send a clean request with
?__cb=${CB_A}(--connect-timeout 3 --max-time 5), repeat the identical?__cb=${CB_A}request at most twice (max 3 requests total,--max-time 5each) to confirm a cacheHIT, and then send a single clean request with?__cb=${CB_B}(--max-time 5) and verify it produces a cacheMISS. - If
HITfollowed byMISSis not confirmed within those bounded attempts, abort the live probe and run it only against an isolated staging environment.
- Use a private
mktemp -dworking directory withtrapcleanup for all captured headers and bodies; never write to predictable shared/tmpfilenames. - Verify real HTTP responses rather than relying on framework defaults; reverse proxies and CDNs frequently strip or override upstream headers.
- Treat
403 Forbiddenon directory roots (such as/.git/) as insufficient unless direct object paths (/.git/HEAD,/.git/config) also return404/403. - Keep all checks local by default (
curl/ standard system tools). Only invoke external CLIs or remote scorecard APIs when the user explicitly opts in and approves sharing the target hostname.
When to Activate
- Auditing a live domain or staging environment before launch
- Reviewing Cloudflare, Vercel, AWS CloudFront, Nginx, or Next.js middleware security configurations
- Investigating CDN Web Cache Poisoning (
X-Forwarded-Host,X-Forwarded-Scheme) or CORS origin reflection - Hardening supply chain artifacts (
package-lock.json,/.npmrc,/.yarnrc.yml, source maps) and AI crawler boundaries (llms.txt,robots.txt,security.txt)
Perimeter Audit Workflow
1. Exposed Artifacts, CORS & Cache Isolation Leads (Related to A01 / A02:2025)
- Direct Git Object & Config Artifact Exposure (
git-dumpervector):
- Disabling directory indexing on
/.git/(403 Forbidden) does not prevent repository reconstruction if direct object paths remain readable. - Probe each path using a bounded, file-specific signature (
--connect-timeout 3 --max-time 5) without printing sensitive contents: /.git/HEAD: check if status is200and the first line matches^ref: refs/or a 40-character hex SHA (^[0-9a-f]{40}$)./.git/config: check if status is200and the body contains[core]or a[remote "section header./docker-compose.yml: check if status is200and the body contains a top-levelservices:block.- Environment configuration paths (such as
/<dotenv-artifact>): check if status is200and lines match^[A-Z][A-Z0-9_]+=without<!DOCTYPEor<html, reporting only a boolean detection signal and never echoing secret values.
- CORS Arbitrary Origin Reflection:
- Send
Origin: https://evil-probe.invalidwith--connect-timeout 3 --max-time 5. - If the response reflects
Access-Control-Allow-Origin: https://evil-probe.invalidtogether withAccess-Control-Allow-Credentials: true, record it as a **HIGH-priority perimet
评论
