You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Categorize the following command with a generalized pattern, defined as a **regex**, that captures the intent and considers risk factors. Include specific arguments or paths in the regex only if they significantly impact the risk level. If no regex is predefined for the command, generate one that appropriately generalizes the command's behavior while retaining any risk-relevant components.
61
-
62
-
For example:
63
-
- 'cat /etc/passwd' is risky due to sensitive user data, so it should be included as-is with the regex '^cat /etc/passwd$'.
64
-
- 'cat /etc/hosts' has low risk, so it should be generalized to '^cat /etc/.*$' to cover all files in the `/etc` directory.
65
-
- 'sudo rm -rf /important_dir' should include '/important_dir' if it's sensitive, but otherwise generalized to '^sudo rm -rf .*'.
66
-
67
-
Command: "%s"
68
-
69
-
**Categories to choose from:**
70
-
- PRIVILEGED: Commands that require elevated permissions or pose a risk if misused.
71
-
- DESTRUCTIVE: Commands that can delete or alter critical files or system configurations.
72
-
- INFORMATIONAL: Commands that retrieve information without altering the system state.
73
-
- GENERAL: Commands that do not fit into the above categories.
74
-
75
-
Respond in **JSON format** as follows:
76
-
{
77
-
"category": "<Category Name>",
78
-
"priority": <Numerical Priority>,
79
-
"pattern": "<Generalized regex Pattern>",
80
-
"rationale": "<Explain why this category and regex were chosen>"
81
-
}
82
-
61
+
62
+
For example:
63
+
- 'cat /etc/passwd' is risky due to sensitive user data, so it should be included as-is with the regex '^cat /etc/passwd$'.
64
+
- 'cat /etc/hosts' has low risk, so it should be generalized to '^cat /etc/.*$' to cover all files in the `/etc` directory.
65
+
- 'sudo rm -rf /important_dir' should include '/important_dir' if it's sensitive, but otherwise generalized to '^sudo rm -rf .*'.
66
+
67
+
Command: "%s"
68
+
69
+
**Categories to choose from:**
70
+
- PRIVILEGED: Commands that require elevated permissions or pose a risk if misused.
71
+
- DESTRUCTIVE: Commands that can delete or alter critical files or system configurations.
72
+
- INFORMATIONAL: Commands that retrieve information without altering the system state.
73
+
- GENERAL: Commands that do not fit into the above categories.
74
+
75
+
Respond in **JSON format** as follows:
76
+
{
77
+
"category": "<Category Name>",
78
+
"priority": <Numerical Priority>,
79
+
"pattern": "<Generalized regex Pattern>",
80
+
"rationale": "<Explain why this category and regex were chosen>"
0 commit comments