← All tests

Cloudflare security-audit-skill — sleep-patterns

Slate 3: security audit of the live (public) Sleep Patterns app

2026-11-20FINDS - TESTSFind #27 (security-audit-skill)

Report

FINDS - TESTS · Slate 3, Test 1 — Cloudflare security-audit-skill (find #27) on sleep-patterns

Date: 2026-11-20 · Test: run Cloudflare's official security-audit skill, per its own method, against Ros's real sleep-patterns project (public because Cloudflare Access is not enabled; 301 nights of personal sleep data in the build). Strictly read-only — nothing in the target was modified, nothing deployed, no Cloudflare setting touched, no live endpoint contacted.

Skill provenance + upkeep

  • Repo: https://github.com/cloudflare/security-audit-skill — cloned to skill-repo/ in the work dir. This is Cloudflare's official security-audit skill repo (the name matches the find).
  • HEAD: c1c8a8c (2026-09-14). History: 14 commits since 2026-06-18. Releases/tags: none. License: MIT.
  • Contents: skills/security-audit/ — SKILL.md (router + Phase 0–6 method), RECONNAISSANCE.md, HUNTING.md, VALIDATION-AND-REPORTING.md, ATTACK-CLASSES.md, 10 companion files (CLIENT-SIDE, CLOUD-AND-DEPLOYMENT, DATA-ISOLATION-AND-LIFECYCLE, SUPPLY-CHAIN-AND-RELEASE, WEB-PROTOCOL-AND-AUTH, etc.), report-schema.json, and two zero-dependency Node validators (validate-coverage-ledger.cjs, validate-findings.cjs).
  • Upkeep read: young (5 months), small, actively-shaped but unreleased — no versioning discipline yet. Pin the clone (as done here) rather than tracking HEAD for repeat runs.

Method followed

The skill's own pipeline, full-audit mode, quick profile (the profile its docs prescribe for bounded targets):

  1. Phase 0–1 Recon: 4 parallel recon agents (product/stack, principals/controls, surfaces/sinks, execution/deployment) → audit-output/architecture.md (≤1,000 words) + run-metadata.json (run sleep-patterns-run-1).
  2. Coverage ledger: 8 source-derived units (surface × boundary × attack class), canonical percent-encoded IDs, seeded and passed through the skill's own validate-coverage-ledger.cjs.
  3. Phase 2 Hunting: one wave (quick profile), 3 hunters with HUNTING.md-compliant prompts (architecture verbatim, block maps, selected attack-class blocks verbatim, exclusions with reasons, core method + promotion procedure + validation rules, structured JSON contract).
  4. Final coverage critic: 1 fresh agent; accepted 1 missing unit (recorded deferred, reason quick_profile_final_critic, per quick rules), rejected 2 hunter proposals with reasons.
  5. Phase 3+5 Verification (merged, quick): 1 fresh verifier per candidate, each seeing only its candidate + linked unit checks + schema + companion validation rules.
  6. Phase 6 Reporting: findings.json + ledger both pass the skill's validators; REPORT.md / FINDINGS-DETAIL.md / NEEDS-VALIDATION.md derived from the final records only.

Deviations, all forced by the environment and recorded in the run metadata: - Source-only run. The skill requires an OS-enforced sandbox before any target-controlled execution; none could be established on this VM (no bwrap/firejail; unshare untested; no trusted promotion implementation). So: no page rendering, no browser tests, no live-endpoint contact. Every check is method source. Decisive evidence was source-complete for this target, so the cost landed exactly where the skill says it should — deployment-dependent claims became needs_validation instead of confirmed. - Hunters/verifiers read report-schema.json from the cloned repo rather than receiving the two verdict branches pasted into prompts; their returned records were schema-exact (the one malformed record in the run was my own parent-side reshaping, caught and fixed by the skill's validator — the enforcement point worked). - One ledger-modeling correction mid-run: the ledger's attempts array archives prior owners/waves only; wave-1 results live on the unit itself. The validator caught this too.

Findings

Raw skill output: audit-output/ (REPORT.md, FINDINGS-DETAIL.md, NEEDS-VALIDATION.md, findings.json, coverage-ledger.json, architecture.md, run-metadata.json).

# Finding (fingerprint) Evidence Skill severity My verification Classification
1 Worker serves the full sleep dataset with no access control (sleep-patterns:worker-passthrough-no-access-control) Worker is an 84-char unconditional env.ASSETS.fetch pass-through (deploy-manifest workerJs); serverActions clientOnly, migrations []; packaged index.html byte-identical to source (135,818 B) with SUMMARY + 301-record NIGHTS in plaintext (index.html:386-387); no _headers/wrangler/Access config anywhere in tree confirmed · high (likelihood high, impact high; confidence high) Confirmed by my own reading — recon greps + targeted manifest extraction established every source fact before the hunters ran; verifier independently re-extracted and re-parsed (exactly 301 records). The one non-source element (live + public, Access off) is Ros's own attestation, labelled as such in the record Real-but-known
2 Dataset replicated into derived copies a serving fix would not revoke (sleep-patterns:dataset-derived-copies-acl-drift) Byte-identical .space-build/index.html; CVM bundle copy; full page base64 in the deploy manifest (decodes to exactly 135,818 B); rendered plaintext + screenshots in 4 audits/ runs (document-text.txt 17,551–77,684 B each) needs_validation (no severity, per skill) Confirmed by my own reading — copy set and byte-identity verified in recon (1c) and independently re-run by the verifier (cmp, base64 decode, per-run sizes). Open fact is only store readership, which source cannot show Real-and-actionable
3 CVM bundle accepts a tunnel MessagePort from any parent window, no origin/source check (cvm-bundle:init-port-no-origin-check) onParentMessage (.space-build-cvm/index.html:1843-1878) checks only message shape; first port wins (:1848); bundle:ready broadcast to * (:1828) and re-announced every 120 ms (:1831-1842); port holder can forge http.res for the page's replaced fetch/XHR/WebSocket globals (:1859-1864, :1763-1772) needs_validation (no severity, per skill) Confirmed by my own reading — the handler and the missing check were read in recon (1c), re-traced by the hunter, and re-read a third time by the verifier. Conditional on the CVM build being served/framed, which source cannot establish Real-and-actionable (conditional)

Coverage beyond the findings: 5 units hunted to covered with named invariants (DOM injection — no controllable source reaches any of the 10 innerHTML sinks; storage/messaging — all such APIs verifiably absent; clickjacking — no state-changing action exists; obvious-things sweep — no secrets, credential files, debug surfaces, or dynamic execution; wildcard — deploy manifest ships exactly 2 files, icon provenance hash-verified). 1 unit deferred by the coverage critic: HTTP cache behaviour of the served page (no Cache-Control in source; a cached copy could outlive enabling Access) — a genuine catch, queued for a future run. 7 hardening notes recorded (headers/CSP, self-host Google Fonts, complete esc() if dataset provenance changes, scope the CVM handshake, audits/ retention, .gitignore, cache directives post-Access) — none inflated into findings.

Classification counts + noise ratio

  • Real-and-actionable: 2 (#2, #3) · Real-but-known: 1 (#1) · Noise / false-positive: 0
  • Noise ratio: 0 of 3 findings (0%). The more telling signal is what the gates rejected: the three most likely false positives for this target — missing framing headers, unpinned Google Fonts, and the partial esc() — were each hunted, traced, and correctly landed as covered/hardening instead of findings. The known gap (#1) was still severity-rated in the skill's own terms (high) rather than waved through as "known".

What the audit found beyond the known gap

The brief's interesting question — what ELSE does it find — has a real answer: (a) the derived-copies problem (#2): enabling Access, the fix Ros already has queued, revokes none of the ≥4 dataset copies sitting in build outputs, the deploy manifest, and the audit artifacts; (b) the CVM bundle's unauthenticated port handshake (#3), including the 120 ms re-announce detail that makes the race repeatable; (c) the cache-deception unit the critic added — directly relevant because the planned Access fix is exactly the change a stale cached copy would defeat.

Effort log

  • 11 child agents: 4 recon, 3 hunters, 1 coverage critic, 3 verifiers — plus parent orchestration (architecture synthesis, ledger construction/validation, consolidation, findings assembly, Phase 6 derivation).
  • Wall clock: recon through run-complete inside the 2026-11-20 session (agent completions 14:05–14:15 UTC for the hunting/verification stages).
  • Validator passes: coverage ledger validated at every stage (4 fixes applied en route, all caught by the validator, none by eye); findings validated after 1 schema-shape correction.
  • Target untouched: verified by method — all operations were reads; the deploy manifest was only ever inspected via targeted key extraction.

Draft verdict + test-record block (for FINDS-LIBRARY)

Subject: #27 — Cloudflare security-audit-skill What ran: The skill's full-audit method, quick profile, on sleep-patterns (source + 3 build outputs + Cloudflare deploy manifest): 4-agent recon, 8-unit coverage ledger, 3-hunter wave, coverage critic, 3 independent verifiers, both skill validators green. When: 2026-11-20 Outcome: 1 confirmed finding (high — the known public-exposure gap, fully evidenced and severity-rated), 2 needs-validation findings (dataset derived copies; CVM bundle port trust), 1 deferred coverage unit (HTTP caching), 5 units covered clean, 7 hardening notes. Zero noise. Output reference: ~/workspace/finds-tests/cf-security-audit-sleep-2026-11-20/audit-output/ (raw skill output) + this report. Reuse proposal — verdict: Adopt, scoped. The skill earns a standing slot in Ros's publish flow for his 52 Workers/Pages projects, at the pre-publish step: after build, before deploy — the point where its two best catches here (data baked into artifacts; serving code with no gate) are still cheap to fix. Scope it: run the quick profile on any project that embeds personal data or has any server surface (Workers with logic, KV/D1/R2 bindings, forms, auth); skip or spot-check purely public-by-design static pages, where this run's own gates show the yield collapses to hardening notes. Two limits to price in: (1) it audits source, not the live account — Access state, DNS, and cache behaviour remain owner/dashboard checks, and without owner attestation of deployment facts its exposure findings land as needs-validation rather than confirmed; (2) it is heavyweight for a one-file app (11 agents) — the value concentrates exactly on the data-bearing projects, which is where the pre-publish slot puts it. Pin the cloned commit (no releases exist) and re-clone deliberately when upstream moves.