Skip to content

security(evidence): reject malformed UTF-8 validation bytes #118

Description

@seonghobae

Problem

Protected main c85d710804139c0697d7ef8fa47d02b1389e6d84 reads the security checklist and security-validation-evidence.json through non-fatal UTF-8 decoding. A byte-invalid retained artifact can therefore be replacement-normalized before checklist/JSON semantics are evaluated.

This is a separate retained-evidence boundary from #112/#114 release/publication hardening and from the stale acquisition-integrity stack #69.

RCA

  • First failing boundary: retained security validation bytes -> decoded checklist/evidence values.
  • Immediate cause: ordinary UTF-8 string decoding replaces malformed byte sequences.
  • Root cause: semantic validation ran without an explicit valid-byte/text boundary.
  • Systemic risk: corrupted evidence can become a different Unicode value before buyer/security acceptance logic observes it.

Active test-first repair

PR #119 (fix(security): reject malformed UTF-8 validation evidence) is the current direct-main repair.

  • protected/live base: c85d710804139c0697d7ef8fa47d02b1389e6d84;
  • RED head: cc599f9ee50b7f8f550c4eb03ddbe7007bd25931;
  • current exact GREEN head: 64083f906171884a4b00ea90ea8e0b93ee960851;
  • current compare: 2 commits ahead / 0 behind live main, merge base exactly the protected head;
  • PR state: Ready, mergeable, direct main.

The GREEN reads exact bytes and applies fatal TextDecoder decoding before checklist or JSON semantics. File-read, invalid-UTF-8 and invalid-JSON failures remain distinct. Valid fixtures preserve existing behavior.

Exact current proof

For unchanged #119 head 64083f906171884a4b00ea90ea8e0b93ee960851:

  • application ci 31442220383: terminal success;
  • reviewer-ci 31442220598: terminal success;
  • eligible central Security Scan 31442220406: terminal success;
  • formal reviews: 0;
  • inline review threads: 0;
  • CodeRabbit review was rate-limited on this exact head and remains non-passing/non-approval evidence.

Acceptance

Repository-owned implementation on #119 current exact head

  • Malformed UTF-8 in otherwise passing evidence returns non-zero and cannot emit a passing audit.
  • Malformed UTF-8 checklist bytes fail closed before checklist semantics.
  • Valid UTF-8 passing fixtures remain passing.
  • Invalid JSON remains failing independently of UTF-8 validity.
  • Focused RED -> GREEN plus exact-head application CI, reviewer-ci, eligible central Security Scan and current review/thread validation are complete.
  • No workflow/gate weakening, release/deployment claim, outbound-license choice, or fabricated operational/acquisition evidence is introduced.

Remaining protected integration / operation

  • Obtain live governance and qualifying independent formal-review evidence actually required by chore(governance): protect main and enforce release checks #27/chore(operations): provision and activate hourly maintainer App #29; a rate-limited model review is not a substitute.
  • Merge only an unchanged exact head after all applicable gates remain satisfied.
  • Re-run malformed-byte and valid-evidence contracts from protected main after integration and retain protected-source evidence separately from PR/check/model evidence.
  • Continue to treat actual security validation, release/deployment, production operation, legal rights and acquisition evidence as separate facts.

Related: #5, #27, #29, #68, #112, #114, #119

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions