()
| 46 | } |
| 47 | |
| 48 | func init() { |
| 49 | appsecurity.RegisterCommandRuleAnalyzer(appsecurity.CommandRuleAnalyzer{ |
| 50 | GetSimpleCommandPrefix: GetSimpleCommandPrefix, |
| 51 | NeedsUserDecision: func(command string) bool { |
| 52 | return AnalyzeCommandPermissions(command).NeedsUserDecision |
| 53 | }, |
| 54 | }) |
| 55 | } |
| 56 | |
| 57 | func GetSimpleCommandPrefix(command string) string { |
| 58 | cleaned := StripAllSafeEnvPrefixes(command) |
nothing calls this directly
no test coverage detected