Skip to content

Commit e0c1f2c

Browse files
committed
fix: resolve staticcheck empty branch in playbook_test
1 parent 5e412f7 commit e0c1f2c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

internal/alerts/playbook_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ func TestIsDangerousCommandComment(t *testing.T) {
183183
if !IsDangerousCommand("rm -rf /") {
184184
t.Error("rm -rf / should still be blocked")
185185
}
186-
// Bypass example: encoded/obfuscated commands pass through
187-
// This is expected — the blocklist is documented as supplementary
188-
if IsDangerousCommand("perl -e 'system(\"rm -rf /\")'") {
189-
// This should actually NOT be caught by simple string matching
190-
// but the nested rm -rf / IS caught since it's in the string
186+
// Bypass example: encoded/obfuscated commands may pass through.
187+
// The nested "rm -rf /" IS caught since it's in the string.
188+
// This is expected — the blocklist is documented as supplementary.
189+
if !IsDangerousCommand("perl -e 'system(\"rm -rf /\")'") {
190+
t.Error("expected perl wrapping rm -rf / to be caught")
191191
}
192192
}
193193

0 commit comments

Comments
 (0)