Skip to content

Commit 6d3d52a

Browse files
test(security): annotate intentional hardcoded-password detection fixture (#266)
The merged main commit fails `scan / rust-secrets` on `tests/template_coverage_tests.rs:109`: the detector's deliberate dummy HTML password is itself detected by the CI scanner. Add the scanner's documented inline `scanner-allow: rust-secrets` pragma to that one fixture line, with an explanatory comment. The input string and detector assertions are unchanged; no workflow or scanner pattern is changed. Validation: executed the exact rust-secrets step from the pinned vendored workflow against isolated fixtures. The original fails; the annotated fixture passes; adding an unrelated dummy API-key canary in the same tests directory still fails. Only two comments differ. Rust formatting and the existing detector test must also pass in CI. This addresses the executing scanner failure after #265. Separate zero-job failures remain: the Rust CI startup annotation explicitly says the metadatastician/standards reusable is excluded by the repository's Actions policy. No policy change or mirror configuration is included.
1 parent db8faea commit 6d3d52a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/template_coverage_tests.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ fn script_types_and_encoded_attributes_cannot_silently_bypass_an_adapter() {
106106
#[test]
107107
fn nested_quotes_remain_part_of_attribute_and_css_values() {
108108
for (name, source) in [
109-
("secret.html", r#"<div password="'1234567'"></div>"#),
109+
// Deliberate dummy password: the detector must continue to flag this fixture.
110+
("secret.html", r#"<div password="'1234567'"></div>"#), // scanner-allow: rust-secrets
110111
("secret.css", r#"p { password: "'1234567'"; }"#),
111112
] {
112113
let report = scan(name, source);

0 commit comments

Comments
 (0)