Skip to content

Commit ab9c544

Browse files
committed
chore(oracle): annotate two test-fixture strings to clear governance false-positive
src/oracle/src/lib.rs has two test fixtures that contain string literals representing hardcoded secrets the oracle should *reject*: - line 732: password = "supersecretpassword123" - line 1051: const API_KEY = "abcdef1234567890abcdef" The governance/secret-detector grep was matching these as real secrets, but the secondary filter (grep -v 'example|sample|test|mock|placeholder') wasn't catching them because the lines lacked any of those words. Adding 'example test fixture' inline comments — single-line addition each — so the filter excludes them. Semantics unchanged.
1 parent 397591b commit ab9c544

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/oracle/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ mod tests {
729729
action_type: ActionType::CreateFile {
730730
path: "config.rs".to_string(),
731731
},
732+
// example test fixture: string the oracle should reject as a hardcoded secret
732733
content: r#"let password = "supersecretpassword123""#.to_string(),
733734
files_affected: vec!["config.rs".to_string()],
734735
llm_confidence: 0.9,
@@ -1048,6 +1049,7 @@ mod tests {
10481049
action_type: ActionType::CreateFile {
10491050
path: "config.rs".to_string(),
10501051
},
1052+
// example test fixture: string the oracle should reject as a hardcoded API key
10511053
content: r#"const API_KEY = "abcdef1234567890abcdef""#.to_string(),
10521054
files_affected: vec!["config.rs".to_string()],
10531055
llm_confidence: 0.9,

0 commit comments

Comments
 (0)