fix(security): reject duplicate validation-evidence JSON keys - #280
Closed
seonghobae wants to merge 4 commits into
Closed
fix(security): reject duplicate validation-evidence JSON keys#280seonghobae wants to merge 4 commits into
seonghobae wants to merge 4 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Carry the security-validation evidence decoded-key integrity hardening across the protected exchange media-type integration while preserving the reviewed two-path diff and non-destructive history.
Carry the reviewed security-validation decoded-key integrity hardening across the protected replay-order integration while preserving the exact two-path diff and non-destructive history.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Test-first hardening for Noema's security-validation evidence parser. Protected
mainfatally decodes UTF-8 beforeJSON.parse, but duplicate decoded object keys can still be normalized by JavaScript's last-key-wins semantics beforeevaluateSecurityEvidence()sees them. That allows two contradictory source documents to collapse into one apparently valid evidence object.Exact RED identity
6bc8ed016dc07f95d4e041a3b79ac00c4086b182;274634a9bf57290a89f2b6baf8406d17f2820cf0;fix/security-evidence-duplicate-json-keys.The RED supplies both
ownerand its JSON-escape-equivalentow\u006eerso the protected parser currently resolves the later value instead of rejecting the ambiguous bytes. Acceptance requires fail-closedduplicate_keysevidence before policy evaluation.Intended GREEN
Reuse the repository's existing decoded-key JSON scanner rather than introducing a second parser. Reject any duplicate decoded object key before
JSON.parse, preserve fatal UTF-8 and malformed-JSON classifications, and keep the security checklist/evidence evaluator contract unchanged.Evidence boundary
Keep Draft until the unchanged final exact head obtains fresh application CI, exact 100% owned production statement/branch/function/line coverage, reviewer-ci, protected-base-eligible central Security Scan, and zero valid unresolved findings. Pending, queued, skipped, absent, neutral, failed, stale, predecessor, status-only, model-only, or rate-limited evidence is non-passing.
No repair/self-modifying workflow, package-lock hand edit, secret/reviewer invention, gate weakening, outbound-license decision, release, deployment, or acquisition-readiness claim.