Skip to content

fix(evidence): reject provenance locator control injection - #162

Draft
seonghobae wants to merge 14 commits into
fix/evidence-error-contractfrom
fix/provenance-locator-control-injection
Draft

fix(evidence): reject provenance locator control injection#162
seonghobae wants to merge 14 commits into
fix/evidence-error-contractfrom
fix/provenance-locator-control-injection

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Buyer/security gap

ProvenanceRecord retains a channel-specific source locator in credential-safe evidence. Without explicit presentation-safety validation, CR/LF, tab, NUL, ESC, DEL, bidirectional controls, zero-width formatters, soft hyphen, BOM and related invisible formatting characters could cross the evidence boundary and later create ambiguous or forged line-oriented audit/log presentation.

Dependency and stack state

This Draft is stacked on exact current PR #157 head eac07a7125e541c4912b195a7522c319cb2b8792, because #157 owns the adjacent public EvidenceError standard-error contract. Current exact #162 head is a2855ac3a300626a6ca796850cbb33a3da000d1c.

The prerequisite moved from historical ab90ff5013bf1dfa4002de17816cafe3b86f156a to the protected-main-aligned #157 head. This child was therefore restacked non-destructively with a two-parent commit. Fresh compare reports ahead 14 / behind 0, merge base exactly eac07a7125e541c4912b195a7522c319cb2b8792, and exactly four intended changed files: CHANGELOG.md, crates/originweave-evidence/src/lib.rs, crates/originweave-evidence/tests/error_contract.rs, and crates/originweave-evidence/tests/provenance_locator.rs.

Keep Draft while #157 remains active. No prerequisite/predecessor check, review, approval, mergeability, synthetic-merge, skipped, cancelled, queued, absent, or status evidence transfers.

TDD and implementation lineage

Exact test-only head dadc9fe0067a6fd77386f7643cf3b8f67601411e added hostile CR/LF/tab/NUL/ESC/DEL locator cases while preserving printable channel-specific syntax containing spaces. The production line adds:

  • dedicated EvidenceError::InvalidLocator with deterministic credential-free Display and source-free std::error::Error behavior;
  • rejection of Unicode control characters;
  • rejection of reviewed invisible formatting characters including soft hyphen, Arabic letter mark, zero-width/bidi controls, isolates, word joiner and BOM;
  • focused regression coverage for every reviewed hostile character and a printable CSS-style locator; and
  • a truthful Unreleased CHANGELOG.md security entry.

Exact-current verification

On unchanged exact head a2855ac3a300626a6ca796850cbb33a3da000d1c against exact base eac07a7125e541c4912b195a7522c319cb2b8792:

  • CI run 31978800285: success;
  • Rust contracts job 95242235558: repository contracts, canonical formatting, locked workspace/all-target checks, full tests, strict Clippy and rustdoc success;
  • Production coverage job 95242235547: exact owned-production function/line/region/branch measurement and enforcement success;
  • GitHub reports the Draft mergeable against its exact prerequisite base.

Only exact-current-head evidence is represented as current proof. Protected-main-only central/SAST/Security workflows absent for this stacked Draft are absent, not passing.

Scope boundary

This is a bounded evidence-presentation integrity rule, not a locator grammar. Printable spaces and channel-specific CSS/XPath/JSONPath-like syntax remain allowed. No source URL, digest, network redaction, browser observation, persistence, retention, workflow, secret, authorization, model call, or release behavior changes.

Protected-main AGENTS.md forbids this scheduled actor from merging or self-approving; passing automation is not integration authority.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1492b891-377f-49c1-bd96-c7926556493a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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