feat(tests): format shell array for improved readability in risk tests

Signed-off-by: Boris Bliznioukov <blib@mail.com>
This commit is contained in:
Boris Bliznioukov 2026-03-04 16:00:57 +01:00
parent 36f6221772
commit cdb691b0c5
No known key found for this signature in database

View file

@ -345,7 +345,20 @@ func TestClassifyCommand_ExtraArgModifiers_NoOverrideBuiltIn(t *testing.T) {
func TestClassifyCommand_ShellWrappers(t *testing.T) {
// Shell wrappers must be critical to prevent classifier bypass.
shells := []string{"sh", "bash", "zsh", "dash", "fish", "ksh", "csh", "tcsh", "powershell", "pwsh", "cmd", "cmd.exe"}
shells := []string{
"sh",
"bash",
"zsh",
"dash",
"fish",
"ksh",
"csh",
"tcsh",
"powershell",
"pwsh",
"cmd",
"cmd.exe",
}
for _, sh := range shells {
t.Run(sh, func(t *testing.T) {
got := ClassifyCommand([]string{sh, "-c", "echo hi"}, nil)