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