Repository navigation
test(core): shared privacy filter test vectors for uteke-cloud parity (#1464, part 2a) - #1494
Merged
Merged
Conversation
| "Zq8vN2xL5mP9", | ||
| "aR4tW7yB3cD6" | ||
| ], | ||
| "expected": "API_KEY=[REDACTED:env-secret]", |
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
Collaborator
Author
|
Merging with code-scanning alert #788 still listed: it is anchored to the earlier commit 4ae0901 (no analysis was uploaded for the later head 3344146). The finding was that the fragmented vectors still look secret-shaped; the CHANGELOG and file claims were corrected and the file is excluded from Cora review in .cora.yaml (one data file, no rule loosened). Cora on the head commit: no issues found, 15/15 checks. Local deterministic scan (cora scan --no-llm and a no-LLM review of the PR diff): 0 issues. |
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.
What
docs/privacy-filter-cases.json: the shared test vectors of the privacy filter (uteke_core::privacy::redact, merged in #1491), as uteke-cloud asked in its answer on uteke-cloud#218 ("publish the cases as a small shared test-vector file ... cloud can then pin parity in CI the way it does withcore-contract.json").github-tokenin both shapes,aws-access-key,bearer-token,jwt,private-key,api-key, and fourenv-secretforms, plus a mixed case that fixes the per-kind counts) and 23 inputs that must stay untouched (hashes, UUIDs, paths, URLs,${VAR}references, placeholders, identifier-like values, and Rust code such asapi_key: self.api_key.clone()).name,input(an array of fragments, joined without a separator, so the file holds no string a secret scanner would flag),expectedtext andkindsas[kind, count]pairs ordered by kind. Theformatfield of the file says how to run it; the allowlist is empty.uteke-corepins it:the_shared_cases_file_matches_the_implementationreads the file at test time, checks text and kinds for every case, and that every expected text is a fixed point of the filter.No behaviour change. It is part 2a of #1464; part 2b wires the filter into the write paths (config, metadata, audit event, strict mode), part 2c the transports, part 3 the docs.
Why
Cloud reimplements the same detection (code is not copied between the repos). One file both repos test against is what keeps
[REDACTED:<kind>]and the masks identical, so a memory means the same thing in OSS and in cloud.Testing
cargo test -p uteke-core privacy: 12 pass (11 existing, 1 new); clippy is clean.aws-access-keytoaws-key) fails the test with the case name.