1package tools
 2
 3import "runtime"
 4
 5var safeCommands = []string{
 6	// Bash builtins and core utils
 7	"cal",
 8	"date",
 9	"df",
10	"du",
11	"echo",
12	"env",
13	"free",
14	"groups",
15	"hostname",
16	"id",
17	"kill",
18	"killall",
19	"ls",
20	"nice",
21	"nohup",
22	"printenv",
23	"ps",
24	"pwd",
25	"set",
26	"time",
27	"timeout",
28	"top",
29	"type",
30	"uname",
31	"unset",
32	"uptime",
33	"whatis",
34	"whereis",
35	"which",
36	"whoami",
37
38	// Git
39	"git blame",
40	"git branch",
41	"git config --get",
42	"git config --list",
43	"git describe",
44	"git diff",
45	"git grep",
46	"git log",
47	"git ls-files",
48	"git ls-remote",
49	"git remote",
50	"git rev-parse",
51	"git shortlog",
52	"git show",
53	"git status",
54	"git tag",
55
56	// Go
57	"go build",
58	"go clean",
59	"go doc",
60	"go env",
61	"go fmt",
62	"go help",
63	"go install",
64	"go list",
65	"go mod",
66	"go run",
67	"go test",
68	"go version",
69	"go vet",
70}
71
72func init() {
73	if runtime.GOOS == "windows" {
74		safeCommands = append(
75			safeCommands,
76			// Windows-specific commands
77			"ipconfig",
78			"nslookup",
79			"ping",
80			"systeminfo",
81			"tasklist",
82			"where",
83		)
84	}
85}