Repository navigation
fix(reporting): drop PII evidence digests that redaction made stale - #348
Conversation
CI redaction can mask a credential inside a PII value that a finding shows in full. The finding kept evidence_sha256, the digest of the unmasked value, which lets anyone holding the report confirm a guess for the masked part. refresh_finding_identities now removes a digest that no longer matches the finding's reported value, alongside the finding IDs it already recomputes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
…ction Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia
left a comment
There was a problem hiding this comment.
Reviewed. Dropping evidence_sha256 unless it is the digest of the value the finding still shows is the right rule: once redaction masks part of a value, the original's digest would let anyone holding the report confirm a guess for the masked part. Checking against pii_evidence_sha256(check_name, matched_value) also covers older reports where the digest and the shown value already disagree, and the tests cover masked, unmasked and missing values. Nothing blocking.
The one failing CI job on the previous head was test_compose_stream_nested_secret_union_does_not_starve_event_loop (1.10 s < 1.0 s), a timing assertion in the Docker environment tests that this PR doesn't touch. I merged main into the branch to clear the CHANGELOG conflict, which also reruns CI.
Resolve the CHANGELOG.md conflict: main and this PR each started a "### Changed" list under Unreleased after 0.8.0. Keep one heading, with main's CI redaction entry (#348) first and this PR's entries after it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the CHANGELOG.md conflict: main and this PR each started a "### Changed" list under Unreleased after 0.8.0. Keep one heading, with main's CI redaction entry (#348) first and this PR's entries after it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the CHANGELOG.md conflict: main and this PR each started a "### Changed" list under Unreleased after 0.8.0. Keep one heading, with main's CI redaction entry (#348) first and this PR's entries after it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Unreleased Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
…Unreleased Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
…Unreleased (#371) Nine PRs merged after the v0.8.0 tag (8149356). Four of them rewrote bullets inside the 0.8.0 section and one added a new bullet there, so main's 0.8.0 notes described behavior that 0.8.0 does not have. Two fixes to 0.8.0 features added no entry. - Restore the 0.8.0 section and everything below it to the tagged text, byte for byte. - Move the agent skill entry (#366) to Unreleased, Added. - Add Documentation entries for the 0.8.0 wording that #360, #361 and #363 corrected (refusal coverage error, inline short texts, capitalized HTTP prose that still warns). - Add Fixed entries for #361, #365, #359, #364 and #363 that describe only what changed after 0.8.0. The #364 entry states that path masking skips text after a non-file: URL up to the next whitespace, which is how main behaves today. - Move the #348 entry to Fixed and say what 0.8.0 did: a CI-redacted PII finding kept the digest of its unmasked value. - The refusal docs test now reads the Documentation correction, which matches the docs, and still requires the switch's entry in 0.8.0. Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Follow-up to #307.
A PII finding reports
evidence_sha256, the digest a waiver uses, only while it shows its value in full. CI redaction runs after the report is written, throughci/secret_redaction.pyandci/publish_reports.py. It can mask a collected credential inside such a value, for exampleops-<token>@example.com. The finding then showed the masked value but kept the digest of the original, and anyone holding the report could use it to confirm a guess for the masked part. #310 closed the same gap for finding IDs.Change
refresh_finding_identitiesruns after redaction. It now removes a finding'sevidence_sha256unless it equalspii_evidence_sha256(check_name, matched_value)for the value the report shows. Digests of unmasked values are unchanged, so waivers keep working.pii_evidence_sha256is imported inside the helper. A module-level import would make everyskillevaluator.reportingimport load all validators, and would weaken the import guard intests/reporting/test_private_static_reports.py.--pii-waiversentry.Tests
tests/ci/test_secret_redaction.py:finding_summaryloads no validator modules.tests/ci,tests/reporting,test_pii_waivers.py,test_pii_grouping.pyandtest_oss_packaging.pygave 2404 passed and 21 skipped.tests/test_commands.py -k waivergave 17 passed.🤖 Generated with Claude Code