Skip to content

docs(security): reconcile privacy coverage evidence - #2799

Merged
Sinity merged 4 commits into
masterfrom
feature/fanout/kwsb
Jul 12, 2026
Merged

Sinity merged 4 commits into
masterfrom
feature/fanout/kwsb

Conversation

@Sinity

@Sinity Sinity commented Jul 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Reconcile the security/privacy coverage manifest with current, executable evidence and point the remaining captured-content secret-hygiene work at its owning Bead.

Problem

The manifest still claimed XSS coverage was snapshot-only despite dedicated web-shell regression tests, and tracked a crawl-source permission gap although no crawl source exists. Its secrets entry conflated the existing log-leak guard with the unimplemented captured-content scanner.

Solution

  • Record the real HTML sanitizer and web-shell escaping suites, including the context-specific escaping contract.
  • Retire the false crawler premise; a future crawler must add its own permission contract.
  • Document the existing AST log-secret guard separately from the unimplemented candidate-only scanner, and link the remaining gap to polylogue-27m.

Acceptance criteria

Parent AC Status Evidence / residual
Every security/privacy manifest gap has an owner or test First slice satisfied Closed XSS and non-existent crawler gaps removed; remaining scanner/excision gap is owned by polylogue-27m.
Excision shares reset mutation/audit contract Open polylogue-27m remains the owning implementation task and is blocked by polylogue-b5l.
MCP destructive/admin path shares the audit-row contract Not assessed in this slice No MCP-envelope files were touched.

Verification

  • devtools test tests/unit/devtools/test_verify_manifests.py tests/unit/security/test_no_secret_leak_in_logs.py tests/unit/rendering/test_html_sanitizer_security.py tests/unit/daemon/test_web_shell_xss_escaping.py — 61 passed.
  • devtools verify manifests — manifest consistency checks passed.
  • Pre-push devtools verify --quick — passed (ruff, mypy, render, topology/layering, schema roundtrip, manifests, and verifier lanes).

Anti-vacuity: the cited tests exercise the production AST logger/print scan, real HTML sanitizer, and shipped web-shell JavaScript helpers through identified regression paths; removing or weakening those controls fails the tests.

The default affected-test gate was not claimed: this fresh worktree lacked a testmon seed, and the initial seed run was infrastructure-interrupted after its parent terminated.

Ref polylogue-kwsb

Problem: the security/privacy manifest still described closed XSS work as\nsnapshot-only coverage and carried a non-existent crawler gap, while the\nremaining captured-content secret-scanning risk had no Beads reference.\n\nWhat changed: record the real HTML and web-shell XSS regression suites,\nremove the stale crawler premise, and make the remaining candidate-only\nsecret scanner/excision handoff explicitly owned by polylogue-27m.\n\nCompatibility: documentation and verification-manifest metadata only.\n\nCo-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 710d5673-f7e7-47e7-b52f-b36007a2a94c

📥 Commits

Reviewing files that changed from the base of the PR and between 901825e and a32dc7d.

📒 Files selected for processing (1)
  • docs/plans/security-privacy-coverage.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fanout/kwsb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab15b43df6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Problem: the coverage manifest marked a captured-content scanner as\nimplemented even though only the independent log-leak guard exists.\n\nWhat changed: retain the implemented log-hygiene area and model captured\ncontent secret detection as the outstanding polylogue-27m coverage gap.\n\nCo-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 1

Finding (real gap): the machine-readable secrets_detection.implemented: true contradicted the same area’s statement that captured-content scanning was unimplemented. Both the inline Codex review and an independent cold review identified that the cited AST logger/print test could not exercise the missing scanner or excision handoff.

Fix: 840ae9813 splits the implemented secret_log_hygiene control from the outstanding security.captured-content-secret-detection gap, which remains explicitly owned by polylogue-27m.

Verification:

  • devtools test tests/unit/devtools/test_verify_manifests.py tests/unit/security/test_no_secret_leak_in_logs.py — 28 passed.
  • devtools verify manifests — passed.
  • Required pre-push devtools verify --quick — passed.

What survived scrutiny: the real HTML/web-shell XSS controls are backed by dedicated production-facing tests; the stale crawler gap remains an explicit non-goal because no crawler source exists. CodeRabbit supplied no substantive review because its review quota is rate-limited.

Problem: the security manifest still described retired regex and symlink\ndefences, and cited a log-only test as evidence for missing content scanning.\n\nWhat changed: align XSS and path controls with the live parser and\nmetadata boundary, and make the candidate-scanner test selector the next\nevidence required by the tracked gap.\n\nCo-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 2

Findings (real gaps):

  1. The outstanding captured-content scanner/excision gap used the logger/print AST test as next_evidence, although that test cannot exercise candidate detection, non-literal storage, or excision.
  2. The manifest still described a retired _SCRIPT_RE defense even though production uses an nh3 parser/allowlist, and still claimed sanitize_path blocks symlink attacks despite the CWD symlink probe having been deliberately removed.

Fix: 8085bc3ad changes the XSS control to the live parser-based mechanism, limits path sanitization claims to traversal/control-character/absolute-path handling, records the removed symlink probe as a non-protection, and points the outstanding scanner gap at the future secret_candidate test selection rather than a false log-guard proof.

Verification:

  • devtools test tests/unit/devtools/test_verify_manifests.py tests/unit/rendering/test_html_sanitizer_security.py tests/unit/security/test_path_sanitization.py tests/unit/security/test_no_secret_leak_in_logs.py — 78 passed.
  • devtools verify manifests — passed.
  • Required pre-push devtools verify --quick — passed.

What survived scrutiny: the scanner/excision path remains explicitly open under polylogue-27m; no implementation status is inferred from the coverage manifest. No new substantive PR comments appeared; the recurring all-jobs-at-init CI failures are the known billing infrastructure pattern.

The web-shell suite protects identified regression paths but does not maintain\na complete sink inventory. State that bounded claim precisely.\n\nCo-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 3

Finding (real claim gap): the manifest said the web-shell XSS suite checked “every known” JS-string and innerHTML sink, but the suite is regression-oriented rather than a complete sink inventory.

Noise classification: the reviewer also alleged two unescaped msgId action sinks in web_shell_paste.py; source inspection showed both buttons use the precomputed escJsAttr(String(m.id || '')) value, so no production XSS change was warranted.

Fix: a32dc7d51 narrows the manifest (and PR anti-vacuity statement) to identified regression paths.

Verification:

  • devtools test tests/unit/daemon/test_web_shell_xss_escaping.py tests/unit/devtools/test_verify_manifests.py — 35 passed.
  • devtools verify manifests — passed.
  • Required pre-push devtools verify --quick — passed.

What survived scrutiny: the two paste-action IDs are escaped through the canonical helper; no new substantive PR comments appeared, and the known billing-init CI failures remain unrelated.

@Sinity

Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Adversarial review — iteration 4 (converged)

A fresh cold review of the full origin/master...HEAD diff, the parent/member Beads and notes, the PR body/comments, and current production/test anchors found no legitimate new gaps. No new PR review comments required action.

Final parent-AC matrix

Parent acceptance criterion Status Evidence / durable residual
Excision (right-to-forget, secret redaction, blob excision) is execution-grade and shares reset’s mutation-audit/dry-run/--yes contract Deferred to polylogue-27m This remains the open implementation task, blocked by polylogue-b5l; this manifest-only PR does not claim local or backed-mode excision.
security-privacy-coverage.yaml gaps each have an owning Bead or test Satisfied for the current manifest XSS and log-boundary controls cite their actual production-facing tests; the sole remaining captured-content scanner/excision gap points to polylogue-27m and its future secret_candidate evidence selector.
MCP write/admin destructive path shares the same audit-row contract Deferred to polylogue-kwsb No MCP mutation/envelope code was changed or claimed by this PR; the parent epic remains open for that contract work.

Iteration record: 1 fixed the false implemented status for captured-content scanning; 2 corrected stale parser/symlink claims and unrelated evidence; 3 narrowed an over-broad XSS coverage claim (and dismissed the alleged paste sink as source-disproven); 4 found no new legitimate gap.

Focused verification for each fix and every required pre-push devtools verify --quick gate passed. The repeated GitHub Actions all-jobs-at-init failures are the known billing infrastructure condition, not a PR-specific failure.

@Sinity
Sinity merged commit 5015982 into master Jul 12, 2026
3 of 14 checks passed
@Sinity
Sinity deleted the feature/fanout/kwsb branch July 12, 2026 23:28
Sinity added a commit that referenced this pull request Jul 12, 2026
…803,2787,2798

013x (search-coverage, PR #2803) and g9f2 (write-model, PR #2798) fully
satisfied — closed. y8s5 (distribution, PR #2779), ttu (docs-ia, PR #2778),
kwsb (PR #2799), and n4hb/c52g/znwj (test-hardening, PR #2787) partially
satisfied — noted with disposition, left open per closure-discipline.

Co-Authored-By: Claude <[email protected]>
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant