Skip to content

Commit 3fe2cdd

Browse files
committed
fix: ignore hardcoded test password in rust-secrets
1 parent c0ecba0 commit 3fe2cdd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bots/cipherbot/src/analyzers/infra.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ mod tests {
186186
#[test]
187187
fn test_detect_hardcoded_cred() {
188188
let analyzer = InfraAnalyzer;
189-
let content = r#"password = "SuperSecretPass123!""#;
189+
let content = r#"password = "SuperSecretPass123!""#; // scanner-allow: rust-secrets
190190
let usages = analyzer.analyze_content(Path::new("infra/main.tf"), content);
191191
assert!(!usages.is_empty(), "Should detect hardcoded credential");
192192
assert_eq!(usages[0].status, CryptoStatus::Reject);
@@ -204,7 +204,7 @@ mod tests {
204204
#[test]
205205
fn test_skip_non_infra_file() {
206206
let analyzer = InfraAnalyzer;
207-
let content = r#"password = "SuperSecretPass123!""#;
207+
let content = r#"password = "SuperSecretPass123!""#; // scanner-allow: rust-secrets
208208
let usages = analyzer.analyze_content(Path::new("src/main.rs"), content);
209209
assert!(usages.is_empty(), "Should skip non-IaC files");
210210
}

0 commit comments

Comments
 (0)