File size: 5,994 Bytes
e1e980e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
 "questions": {
  "risk_level": {
   "type": "score",
   "instructions": "How much harm can running this shell command as written cause?",
   "criteria": [
    "Safe. Ordinary read-only or routine command with no plausible path to data loss, privilege change, or system disruption.",
    "Low. A local change that is quick to undo, such as deleting a cache or build folder that regenerates.",
    "Moderate. Repairable without backups, with some effort: one config file or dotfile overwritten, permissions changed on a limited path, one service or one user's processes killed, shell history cleared, or a secret printed to the user's own terminal.",
    "High. Needs backups to recover a directory tree, project, or database; exposes secrets to others; runs unverified code; widens one account's privileges; or takes the machine or its network down until a reboot or manual cleanup.",
    "Critical. Destroys a whole disk, filesystem, operating system, system directory, or home folder, or gives root-level control to any local user or remote party."
   ]
  },
  "risky": {
   "type": "noul",
   "instructions": "Is this shell command risky to run as written?",
   "criteria": {
    "true": "Running it can destroy data, change permissions or privileges, expose secrets, or disrupt the system.",
    "false": "It is read-only or routine, with no plausible path to harm."
   }
  },
  "data_destruction": {
   "type": "noul",
   "instructions": "Does this command carry data destruction risk?",
   "criteria": {
    "true": "Recursive or forced deletion, truncation, or in-place overwrite of files and directories.",
    "false": "Nothing in the command matches data destruction."
   }
  },
  "device_overwrite": {
   "type": "noul",
   "instructions": "Does this command carry device overwrite risk?",
   "criteria": {
    "true": "Writing to a block device, formatting a filesystem, or rewriting a partition table.",
    "false": "Nothing in the command matches device overwrite."
   }
  },
  "overbroad_permissions": {
   "type": "noul",
   "instructions": "Does this command carry overbroad permissions risk?",
   "criteria": {
    "true": "Granting world access or removing protection recursively, for example chmod or chown applied broadly.",
    "false": "Nothing in the command matches overbroad permissions."
   }
  },
  "privilege_escalation": {
   "type": "noul",
   "instructions": "Does this command carry privilege escalation risk?",
   "criteria": {
    "true": "Gaining or widening root or another user's authority, including editing sudoers or setuid bits.",
    "false": "Nothing in the command matches privilege escalation."
   }
  },
  "remote_code_execution": {
   "type": "noul",
   "instructions": "Does this command carry remote code execution risk?",
   "criteria": {
    "true": "Fetching content from a network location and executing it unverified, for example a download piped into a shell.",
    "false": "Nothing in the command matches remote code execution."
   }
  },
  "unsafe_download_exec": {
   "type": "noul",
   "instructions": "Does this command carry unsafe download exec risk?",
   "criteria": {
    "true": "Installing or trusting unverified packages, repositories, or signing keys.",
    "false": "Nothing in the command matches unsafe download exec."
   }
  },
  "resource_exhaustion": {
   "type": "noul",
   "instructions": "Does this command carry resource exhaustion risk?",
   "criteria": {
    "true": "Unbounded process, memory, or disk growth, including fork bombs and runaway loops.",
    "false": "Nothing in the command matches resource exhaustion."
   }
  },
  "credential_exposure": {
   "type": "noul",
   "instructions": "Does this command carry credential exposure risk?",
   "criteria": {
    "true": "Printing, world-readable, or logged secrets, keys, tokens, or password material.",
    "false": "Nothing in the command matches credential exposure."
   }
  },
  "irreversible_config": {
   "type": "noul",
   "instructions": "Does this command carry irreversible config risk?",
   "criteria": {
    "true": "Editing critical system configuration or disabling protection such as a firewall.",
    "false": "Nothing in the command matches irreversible config."
   }
  },
  "history_log_tampering": {
   "type": "noul",
   "instructions": "Does this command carry history log tampering risk?",
   "criteria": {
    "true": "Clearing or disabling shell history, audit logs, or system logs.",
    "false": "Nothing in the command matches history log tampering."
   }
  },
  "network_disruption": {
   "type": "noul",
   "instructions": "Does this command carry network disruption risk?",
   "criteria": {
    "true": "Flushing routes or firewall rules, downing interfaces, or killing networking.",
    "false": "Nothing in the command matches network disruption."
   }
  },
  "signal_kill": {
   "type": "noul",
   "instructions": "Does this command carry signal kill risk?",
   "criteria": {
    "true": "Broad or forced process termination that can take down sessions or the system.",
    "false": "Nothing in the command matches signal kill."
   }
  },
  "shell_footgun": {
   "type": "noul",
   "instructions": "Does this command carry shell footgun risk?",
   "criteria": {
    "true": "Quoting, word-splitting, globbing, or redirection behavior that causes accidental damage.",
    "false": "Nothing in the command matches shell footgun."
   }
  },
  "reversible": {
   "type": "noul",
   "instructions": "Can an average user undo the effect of this command without backups?",
   "criteria": {
    "true": "The effect can be undone without backups, or there is no effect to undo.",
    "false": "Undoing the effect needs backups or is not possible."
   }
  },
  "requires_root": {
   "type": "noul",
   "instructions": "Does the harm from this command need root or sudo?",
   "criteria": {
    "true": "The command needs root or sudo to do its harm.",
    "false": "An ordinary user can run it with the same effect."
   }
  }
 }
}