File tree Expand file tree Collapse file tree
bots/cipherbot/src/analyzers Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments