Make the copied-secret ignore rules user-configurable #5
Labels
No labels
ci
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/breadclip#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Broken out from ECO-15 (bread-ecosystem audit, 2026-09-05). Verified still open on main as of 2026-09-09.
breadclipd/src/ignore_rules.rsis a fixedis_sensitive(&text)heuristic (one-time codes, Luhn-valid card numbers, private key blocks,password:lines, known API token prefixes). CLIP-3's PR body notes the original spec called for user-configurable match rules (MIME, app, regex, documented inEVENTS.md); what shipped is the fixed heuristic with no config surface, described as simpler and documented as such.breadclip-core'sConfigtoday is justretention,panel_width,capture_primary(breadclip-core/src/config.rs). Add an[ignore]section so users can:Follow bread-utils' non-destructive TOML discipline that the rest of the config already uses. Keep the built-in heuristic as the default when the section is absent.
PR: #6
Added an
[ignore]section toconfig.tomlwith two lists:patterns: extra regexes; matching text is treated as sensitive and never persisted. Invalid patterns are logged and skipped.disable: built-in rule names to switch off (private_key,credential_line,otp,card_number,api_token).An absent section leaves the built-in heuristic byte-for-byte unchanged (
Ruleset::default()).is_sensitiveis now a method on aRulesetcompiled from config once per capture event. Parsing uses the same non-destructivetoml_editpath as the rest of the config. Newregexdep inbreadclipd.Verified:
cargo build --workspace+--release --locked,cargo test --workspace --locked(all pass, incl. new parsing / pattern / disable / invalid-pattern tests),cargo clippy --workspace --all-targets --locked -- -D warningsclean. Docs updated in README,contrib/config.toml.example, and module comments.One choice worth a look in review: the config keys are
patternsanddisable(the issue left the exact schema open).Reviewed and merged (squash, PR #6).
Acceptance criteria: (1) add an [ignore] section for extra patterns and rule disabling, (2) follow bread-utils' non-destructive TOML discipline, (3) keep the built-in heuristic as default when the section is absent. All three are met: IgnoreConfig.patterns/disable on Config, parsed through the same toml_edit DocumentMut path, Ruleset::default() byte-for-byte the old behavior. Tests assert actual classification outcomes (a given text plus config disables/adds a rule and is_sensitive reflects it), not just structure. CI green, no conflicts. Clean work.