@probelabs/probe 0.6.0-rc256 → 0.6.0-rc258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/bin/binaries/probe-v0.6.0-rc258-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/FallbackManager.js +4 -4
- package/build/agent/ProbeAgent.js +8 -10
- package/build/agent/bashDefaults.js +171 -162
- package/build/agent/bashPermissions.js +98 -45
- package/build/agent/index.js +459 -415
- package/build/agent/shared/prompts.js +40 -8
- package/build/tools/bash.js +2 -2
- package/cjs/agent/ProbeAgent.cjs +3461 -5626
- package/cjs/index.cjs +3461 -5626
- package/package.json +1 -1
- package/src/agent/FallbackManager.js +4 -4
- package/src/agent/ProbeAgent.js +8 -10
- package/src/agent/bashDefaults.js +171 -162
- package/src/agent/bashPermissions.js +98 -45
- package/src/agent/shared/prompts.js +40 -8
- package/src/tools/bash.js +2 -2
- package/bin/binaries/probe-v0.6.0-rc256-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc256-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc256-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc256-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc256-x86_64-unknown-linux-musl.tar.gz +0 -0
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ const agent = new ProbeAgent({
|
|
|
91
91
|
sessionId: 'my-session', // Optional: for conversation continuity
|
|
92
92
|
path: '/path/to/your/project',
|
|
93
93
|
provider: 'anthropic', // or 'openai', 'google'
|
|
94
|
-
model: 'claude-
|
|
94
|
+
model: 'claude-sonnet-4-6', // Optional: override model
|
|
95
95
|
allowEdit: true, // Optional: enable edit + create tools for code modification
|
|
96
96
|
debug: true, // Optional: enable debug logging
|
|
97
97
|
allowedTools: ['*'], // Optional: filter available tools (see Tool Filtering below)
|
|
@@ -128,7 +128,7 @@ export GOOGLE_API_KEY=your_google_key
|
|
|
128
128
|
export FORCE_PROVIDER=anthropic
|
|
129
129
|
|
|
130
130
|
# Optional: Override model name
|
|
131
|
-
export MODEL_NAME=claude-
|
|
131
|
+
export MODEL_NAME=claude-sonnet-4-6
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
**ProbeAgent Features:**
|
|
@@ -204,12 +204,12 @@ const agent = new ProbeAgent({
|
|
|
204
204
|
region: 'us-west-2',
|
|
205
205
|
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
206
206
|
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
|
|
207
|
-
model: 'anthropic.claude-sonnet-4-
|
|
207
|
+
model: 'anthropic.claude-sonnet-4-6'
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
provider: 'openai',
|
|
211
211
|
apiKey: process.env.OPENAI_API_KEY,
|
|
212
|
-
model: 'gpt-
|
|
212
|
+
model: 'gpt-5.2'
|
|
213
213
|
}
|
|
214
214
|
],
|
|
215
215
|
maxTotalAttempts: 15 // Maximum attempts across all providers
|
|
@@ -919,7 +919,7 @@ const extractTool = tools.createExtractTool();
|
|
|
919
919
|
|
|
920
920
|
// Create a ChatOpenAI instance with tools
|
|
921
921
|
const model = new ChatOpenAI({
|
|
922
|
-
modelName: "gpt-
|
|
922
|
+
modelName: "gpt-5.2",
|
|
923
923
|
temperature: 0.7
|
|
924
924
|
}).withTools([searchTool, queryTool, extractTool]);
|
|
925
925
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -41,10 +41,10 @@ export const FALLBACK_STRATEGIES = {
|
|
|
41
41
|
* Default model mappings for each provider
|
|
42
42
|
*/
|
|
43
43
|
const DEFAULT_MODELS = {
|
|
44
|
-
anthropic: 'claude-sonnet-4-
|
|
45
|
-
openai: 'gpt-
|
|
46
|
-
google: 'gemini-2.
|
|
47
|
-
bedrock: 'anthropic.claude-sonnet-4-
|
|
44
|
+
anthropic: 'claude-sonnet-4-6',
|
|
45
|
+
openai: 'gpt-5.2',
|
|
46
|
+
google: 'gemini-2.5-flash',
|
|
47
|
+
bedrock: 'anthropic.claude-sonnet-4-6'
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -719,7 +719,7 @@ export class ProbeAgent {
|
|
|
719
719
|
// Set provider to claude-code
|
|
720
720
|
this.clientApiProvider = 'claude-code';
|
|
721
721
|
this.provider = null;
|
|
722
|
-
this.model = this.clientApiModel || 'claude-
|
|
722
|
+
this.model = this.clientApiModel || 'claude-sonnet-4-6';
|
|
723
723
|
this.apiType = 'claude-code';
|
|
724
724
|
} else if (codexAvailable) {
|
|
725
725
|
if (this.debug) {
|
|
@@ -729,7 +729,7 @@ export class ProbeAgent {
|
|
|
729
729
|
// Set provider to codex
|
|
730
730
|
this.clientApiProvider = 'codex';
|
|
731
731
|
this.provider = null;
|
|
732
|
-
this.model = this.clientApiModel || 'gpt-
|
|
732
|
+
this.model = this.clientApiModel || 'gpt-5.2';
|
|
733
733
|
this.apiType = 'codex';
|
|
734
734
|
} else {
|
|
735
735
|
// Neither API keys nor CLI commands available
|
|
@@ -1041,7 +1041,7 @@ export class ProbeAgent {
|
|
|
1041
1041
|
// Claude Code engine will be initialized lazily in getEngine()
|
|
1042
1042
|
// Set minimal defaults for compatibility
|
|
1043
1043
|
this.provider = null;
|
|
1044
|
-
this.model = modelName || 'claude-
|
|
1044
|
+
this.model = modelName || 'claude-sonnet-4-6';
|
|
1045
1045
|
this.apiType = 'claude-code';
|
|
1046
1046
|
if (this.debug) {
|
|
1047
1047
|
console.log('[DEBUG] Claude Code engine selected - will use built-in access if available');
|
|
@@ -1499,7 +1499,7 @@ export class ProbeAgent {
|
|
|
1499
1499
|
apiKey: apiKey,
|
|
1500
1500
|
...(apiUrl && { baseURL: apiUrl }),
|
|
1501
1501
|
});
|
|
1502
|
-
this.model = modelName || 'claude-sonnet-4-
|
|
1502
|
+
this.model = modelName || 'claude-sonnet-4-6';
|
|
1503
1503
|
this.apiType = 'anthropic';
|
|
1504
1504
|
|
|
1505
1505
|
if (this.debug) {
|
|
@@ -1516,7 +1516,7 @@ export class ProbeAgent {
|
|
|
1516
1516
|
apiKey: apiKey,
|
|
1517
1517
|
...(apiUrl && { baseURL: apiUrl }),
|
|
1518
1518
|
});
|
|
1519
|
-
this.model = modelName || 'gpt-5
|
|
1519
|
+
this.model = modelName || 'gpt-5.2';
|
|
1520
1520
|
this.apiType = 'openai';
|
|
1521
1521
|
|
|
1522
1522
|
if (this.debug) {
|
|
@@ -1646,7 +1646,7 @@ export class ProbeAgent {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
|
|
1648
1648
|
this.provider = createAmazonBedrock(config);
|
|
1649
|
-
this.model = modelName || 'anthropic.claude-sonnet-4-
|
|
1649
|
+
this.model = modelName || 'anthropic.claude-sonnet-4-6';
|
|
1650
1650
|
this.apiType = 'bedrock';
|
|
1651
1651
|
|
|
1652
1652
|
if (this.debug) {
|
|
@@ -1715,7 +1715,7 @@ export class ProbeAgent {
|
|
|
1715
1715
|
sessionId: this.options?.sessionId,
|
|
1716
1716
|
debug: this.debug,
|
|
1717
1717
|
allowedTools: this.allowedTools, // Pass tool filtering configuration
|
|
1718
|
-
model: this.model // Pass model name (e.g., gpt-
|
|
1718
|
+
model: this.model // Pass model name (e.g., gpt-5.2, o3, etc.)
|
|
1719
1719
|
});
|
|
1720
1720
|
if (this.debug) {
|
|
1721
1721
|
console.log('[DEBUG] Using Codex CLI engine with Probe tools');
|
|
@@ -3249,9 +3249,7 @@ Follow these instructions carefully:
|
|
|
3249
3249
|
if (!maxResponseTokens) {
|
|
3250
3250
|
// Use model-based defaults if not explicitly configured
|
|
3251
3251
|
maxResponseTokens = 4000;
|
|
3252
|
-
if (this.model && this.model.includes('opus') || this.model && this.model.includes('sonnet') || this.model && this.model.startsWith('gpt-4-')) {
|
|
3253
|
-
maxResponseTokens = 8192;
|
|
3254
|
-
} else if (this.model && this.model.startsWith('gpt-4o')) {
|
|
3252
|
+
if (this.model && this.model.includes('opus') || this.model && this.model.includes('sonnet') || this.model && this.model.startsWith('gpt-4') || this.model && this.model.startsWith('gpt-5')) {
|
|
3255
3253
|
maxResponseTokens = 8192;
|
|
3256
3254
|
} else if (this.model && this.model.startsWith('gemini')) {
|
|
3257
3255
|
maxResponseTokens = 32000;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Default allow and deny patterns for bash command execution
|
|
3
3
|
* @module agent/bashDefaults
|
|
4
|
+
*
|
|
5
|
+
* Pattern syntax: colon-separated parts matching command + args.
|
|
6
|
+
* 'git:push' — matches 'git push', 'git push origin main', etc.
|
|
7
|
+
* 'git:push:--force' — matches 'git push --force ...'
|
|
8
|
+
* 'git:branch:*' — wildcard matches any arg (or no arg) at that position
|
|
9
|
+
*
|
|
10
|
+
* NOTE: 'X' and 'X:*' are functionally identical — the shorter form is preferred.
|
|
11
|
+
* A pattern only checks the parts it specifies; extra args are ignored.
|
|
4
12
|
*/
|
|
5
13
|
|
|
6
14
|
/**
|
|
@@ -8,68 +16,68 @@
|
|
|
8
16
|
*/
|
|
9
17
|
export const DEFAULT_ALLOW_PATTERNS = [
|
|
10
18
|
// Basic navigation and listing
|
|
11
|
-
'ls', 'dir', 'pwd', 'cd',
|
|
12
|
-
|
|
19
|
+
'ls', 'dir', 'pwd', 'cd',
|
|
20
|
+
|
|
13
21
|
// File reading commands
|
|
14
|
-
'cat', '
|
|
22
|
+
'cat', 'head', 'tail',
|
|
15
23
|
'less', 'more', 'view',
|
|
16
|
-
|
|
24
|
+
|
|
17
25
|
// File information and metadata
|
|
18
|
-
'file', '
|
|
19
|
-
'du', '
|
|
20
|
-
|
|
21
|
-
// Search and find commands (read-only)
|
|
22
|
-
|
|
23
|
-
'find
|
|
24
|
-
'grep', '
|
|
25
|
-
'rg', '
|
|
26
|
-
'which', '
|
|
27
|
-
'type', '
|
|
28
|
-
|
|
26
|
+
'file', 'stat', 'wc',
|
|
27
|
+
'du', 'df', 'realpath',
|
|
28
|
+
|
|
29
|
+
// Search and find commands (read-only)
|
|
30
|
+
// Note: bare 'find' allows all find variants; dangerous ones (find -exec) are blocked by deny list
|
|
31
|
+
'find',
|
|
32
|
+
'grep', 'egrep', 'fgrep',
|
|
33
|
+
'rg', 'ag', 'ack',
|
|
34
|
+
'which', 'whereis', 'locate',
|
|
35
|
+
'type', 'command',
|
|
36
|
+
|
|
29
37
|
// Tree and structure visualization
|
|
30
|
-
'tree',
|
|
31
|
-
|
|
38
|
+
'tree',
|
|
39
|
+
|
|
32
40
|
// Git read-only operations
|
|
33
|
-
'git:status', 'git:
|
|
34
|
-
'git:show', 'git:
|
|
35
|
-
'git:tag', 'git:
|
|
36
|
-
'git:remote', 'git:
|
|
37
|
-
'git:blame', 'git:
|
|
38
|
-
'git:ls-files', 'git:ls-
|
|
39
|
-
'git:ls-remote',
|
|
40
|
-
'git:rev-parse', 'git:rev-
|
|
41
|
-
'git:cat-file',
|
|
42
|
-
'git:diff-tree', 'git:diff-
|
|
43
|
-
'git:diff-index',
|
|
44
|
-
'git:for-each-ref',
|
|
45
|
-
'git:merge-base',
|
|
46
|
-
'git:name-rev',
|
|
47
|
-
'git:count-objects',
|
|
48
|
-
'git:verify-commit', 'git:verify-
|
|
49
|
-
'git:check-ignore', 'git:check-
|
|
50
|
-
'git:stash:list', 'git:stash:show',
|
|
51
|
-
'git:worktree:list',
|
|
52
|
-
'git:notes:list', 'git:notes:show',
|
|
53
|
-
'git:--version', 'git:help',
|
|
41
|
+
'git:status', 'git:log', 'git:diff',
|
|
42
|
+
'git:show', 'git:branch',
|
|
43
|
+
'git:tag', 'git:describe',
|
|
44
|
+
'git:remote', 'git:config',
|
|
45
|
+
'git:blame', 'git:shortlog', 'git:reflog',
|
|
46
|
+
'git:ls-files', 'git:ls-tree',
|
|
47
|
+
'git:ls-remote',
|
|
48
|
+
'git:rev-parse', 'git:rev-list',
|
|
49
|
+
'git:cat-file',
|
|
50
|
+
'git:diff-tree', 'git:diff-files',
|
|
51
|
+
'git:diff-index',
|
|
52
|
+
'git:for-each-ref',
|
|
53
|
+
'git:merge-base',
|
|
54
|
+
'git:name-rev',
|
|
55
|
+
'git:count-objects',
|
|
56
|
+
'git:verify-commit', 'git:verify-tag',
|
|
57
|
+
'git:check-ignore', 'git:check-attr',
|
|
58
|
+
'git:stash:list', 'git:stash:show',
|
|
59
|
+
'git:worktree:list',
|
|
60
|
+
'git:notes:list', 'git:notes:show',
|
|
61
|
+
'git:--version', 'git:help',
|
|
54
62
|
|
|
55
63
|
// GitHub CLI (gh) read-only operations
|
|
56
|
-
'gh:--version', 'gh:help', 'gh:
|
|
57
|
-
'gh:auth:status',
|
|
58
|
-
'gh:issue:list', 'gh:issue:
|
|
59
|
-
'gh:issue:status',
|
|
60
|
-
'gh:pr:list', 'gh:pr:
|
|
61
|
-
'gh:pr:status', 'gh:pr:
|
|
62
|
-
'gh:pr:checks',
|
|
63
|
-
'gh:repo:list', 'gh:repo:
|
|
64
|
-
'gh:release:list', 'gh:release:
|
|
65
|
-
'gh:run:list', 'gh:run:
|
|
66
|
-
'gh:workflow:list', 'gh:workflow:
|
|
67
|
-
'gh:gist:list', 'gh:gist:
|
|
68
|
-
'gh:search:issues', 'gh:search:
|
|
69
|
-
'gh:search:repos', 'gh:search:
|
|
70
|
-
'gh:search:commits',
|
|
71
|
-
'gh:api',
|
|
72
|
-
|
|
64
|
+
'gh:--version', 'gh:help', 'gh:status',
|
|
65
|
+
'gh:auth:status',
|
|
66
|
+
'gh:issue:list', 'gh:issue:view',
|
|
67
|
+
'gh:issue:status',
|
|
68
|
+
'gh:pr:list', 'gh:pr:view',
|
|
69
|
+
'gh:pr:status', 'gh:pr:diff',
|
|
70
|
+
'gh:pr:checks',
|
|
71
|
+
'gh:repo:list', 'gh:repo:view',
|
|
72
|
+
'gh:release:list', 'gh:release:view',
|
|
73
|
+
'gh:run:list', 'gh:run:view',
|
|
74
|
+
'gh:workflow:list', 'gh:workflow:view',
|
|
75
|
+
'gh:gist:list', 'gh:gist:view',
|
|
76
|
+
'gh:search:issues', 'gh:search:prs',
|
|
77
|
+
'gh:search:repos', 'gh:search:code',
|
|
78
|
+
'gh:search:commits',
|
|
79
|
+
'gh:api',
|
|
80
|
+
|
|
73
81
|
// Package managers (information only)
|
|
74
82
|
'npm:list', 'npm:ls', 'npm:view', 'npm:info', 'npm:show',
|
|
75
83
|
'npm:outdated', 'npm:audit', 'npm:--version',
|
|
@@ -80,7 +88,7 @@ export const DEFAULT_ALLOW_PATTERNS = [
|
|
|
80
88
|
'gem:list', 'gem:--version',
|
|
81
89
|
'bundle:list', 'bundle:show', 'bundle:--version',
|
|
82
90
|
'composer:show', 'composer:--version',
|
|
83
|
-
|
|
91
|
+
|
|
84
92
|
// Language and runtime versions
|
|
85
93
|
'node:--version', 'node:-v',
|
|
86
94
|
'python:--version', 'python:-V', 'python3:--version', 'python3:-V',
|
|
@@ -90,51 +98,51 @@ export const DEFAULT_ALLOW_PATTERNS = [
|
|
|
90
98
|
'java:--version', 'java:-version', 'javac:--version',
|
|
91
99
|
'mvn:--version', 'gradle:--version',
|
|
92
100
|
'php:--version', 'dotnet:--version', 'dotnet:list',
|
|
93
|
-
|
|
101
|
+
|
|
94
102
|
// Database client versions (connection info only)
|
|
95
103
|
'psql:--version', 'mysql:--version', 'redis-cli:--version',
|
|
96
104
|
'mongo:--version', 'sqlite3:--version',
|
|
97
|
-
|
|
105
|
+
|
|
98
106
|
// System information
|
|
99
|
-
'uname', '
|
|
100
|
-
'date', 'cal', 'uptime', 'w', 'users', 'sleep',
|
|
101
|
-
|
|
107
|
+
'uname', 'hostname', 'whoami', 'id', 'groups',
|
|
108
|
+
'date', 'cal', 'uptime', 'w', 'users', 'sleep',
|
|
109
|
+
|
|
102
110
|
// Environment and shell
|
|
103
|
-
'env', 'printenv', 'echo', '
|
|
104
|
-
'export', '
|
|
105
|
-
|
|
111
|
+
'env', 'printenv', 'echo', 'printf',
|
|
112
|
+
'export', 'set', 'unset',
|
|
113
|
+
|
|
106
114
|
// Process information (read-only)
|
|
107
|
-
'ps', '
|
|
108
|
-
|
|
115
|
+
'ps', 'pgrep', 'jobs', 'top:-n:1',
|
|
116
|
+
|
|
109
117
|
// Network information (read-only)
|
|
110
118
|
'ifconfig', 'ip:addr', 'ip:link', 'hostname:-I',
|
|
111
119
|
'ping:-c:*', 'traceroute', 'nslookup', 'dig',
|
|
112
|
-
|
|
120
|
+
|
|
113
121
|
// Text processing and utilities (awk removed - too powerful)
|
|
114
|
-
'sed:-n:*', 'cut', '
|
|
115
|
-
'uniq', '
|
|
116
|
-
'paste', '
|
|
117
|
-
'diff', '
|
|
118
|
-
|
|
122
|
+
'sed:-n:*', 'cut', 'sort',
|
|
123
|
+
'uniq', 'tr', 'column',
|
|
124
|
+
'paste', 'join', 'comm',
|
|
125
|
+
'diff', 'cmp', 'patch:--dry-run:*',
|
|
126
|
+
|
|
119
127
|
// Hashing and encoding (read-only)
|
|
120
|
-
'md5sum', '
|
|
121
|
-
'base64', 'base64:-d', 'od', '
|
|
122
|
-
|
|
128
|
+
'md5sum', 'sha1sum', 'sha256sum',
|
|
129
|
+
'base64', 'base64:-d', 'od', 'hexdump',
|
|
130
|
+
|
|
123
131
|
// Archive and compression (list/view only)
|
|
124
132
|
'tar:-tf:*', 'tar:-tzf:*', 'unzip:-l:*', 'zip:-l:*',
|
|
125
133
|
'gzip:-l:*', 'gunzip:-l:*',
|
|
126
|
-
|
|
134
|
+
|
|
127
135
|
// Help and documentation
|
|
128
|
-
'man', '
|
|
129
|
-
'whatis', '
|
|
130
|
-
|
|
136
|
+
'man', '--help', 'help', 'info',
|
|
137
|
+
'whatis', 'apropos',
|
|
138
|
+
|
|
131
139
|
// Make (dry run and info)
|
|
132
140
|
'make:-n', 'make:--dry-run', 'make:-p', 'make:--print-data-base',
|
|
133
|
-
|
|
141
|
+
|
|
134
142
|
// Docker (read-only operations)
|
|
135
143
|
'docker:ps', 'docker:images', 'docker:version', 'docker:info',
|
|
136
144
|
'docker:logs:*', 'docker:inspect:*',
|
|
137
|
-
|
|
145
|
+
|
|
138
146
|
// Test runners (list/info only)
|
|
139
147
|
'jest:--listTests', 'mocha:--help', 'pytest:--collect-only'
|
|
140
148
|
];
|
|
@@ -144,21 +152,22 @@ export const DEFAULT_ALLOW_PATTERNS = [
|
|
|
144
152
|
*/
|
|
145
153
|
export const DEFAULT_DENY_PATTERNS = [
|
|
146
154
|
// Dangerous file operations
|
|
147
|
-
'rm:-rf', 'rm:-f:/', 'rm:/', '
|
|
155
|
+
'rm:-rf', 'rm:-f:/', 'rm:/', 'rmdir',
|
|
148
156
|
'chmod:777', 'chmod:-R:777', 'chown', 'chgrp',
|
|
149
|
-
'dd', '
|
|
150
|
-
|
|
157
|
+
'dd', 'shred',
|
|
158
|
+
|
|
151
159
|
// Dangerous find operations that can execute arbitrary commands
|
|
152
|
-
'find:-exec
|
|
153
|
-
'find:-ok
|
|
154
|
-
|
|
160
|
+
'find:-exec', 'find:*:-exec', 'find:-execdir', 'find:*:-execdir',
|
|
161
|
+
'find:-ok', 'find:*:-ok', 'find:-okdir', 'find:*:-okdir',
|
|
162
|
+
|
|
155
163
|
// Powerful scripting tools that can execute arbitrary commands
|
|
156
|
-
'awk', '
|
|
157
|
-
|
|
164
|
+
'awk', 'perl', 'python:-c:*', 'node:-e:*',
|
|
165
|
+
|
|
158
166
|
// System administration and modification
|
|
159
|
-
'sudo
|
|
167
|
+
'sudo', 'su',
|
|
168
|
+
'passwd', 'adduser', 'useradd',
|
|
160
169
|
'userdel', 'usermod', 'groupadd', 'groupdel', 'visudo',
|
|
161
|
-
|
|
170
|
+
|
|
162
171
|
// Package installation and removal
|
|
163
172
|
'npm:install', 'npm:i', 'npm:uninstall', 'npm:publish',
|
|
164
173
|
'npm:unpublish', 'npm:link', 'npm:update',
|
|
@@ -169,103 +178,103 @@ export const DEFAULT_DENY_PATTERNS = [
|
|
|
169
178
|
'gem:install', 'gem:uninstall', 'gem:update',
|
|
170
179
|
'bundle:install', 'bundle:update',
|
|
171
180
|
'composer:install', 'composer:update', 'composer:remove',
|
|
172
|
-
'apt
|
|
181
|
+
'apt', 'apt-get', 'yum', 'dnf', 'zypper',
|
|
173
182
|
'brew:install', 'brew:uninstall', 'brew:upgrade',
|
|
174
183
|
'conda:install', 'conda:remove', 'conda:update',
|
|
175
|
-
|
|
184
|
+
|
|
176
185
|
// Service and system control
|
|
177
|
-
'systemctl
|
|
178
|
-
'initctl
|
|
179
|
-
|
|
186
|
+
'systemctl', 'service', 'chkconfig',
|
|
187
|
+
'initctl', 'upstart',
|
|
188
|
+
|
|
180
189
|
// Network operations that could be dangerous
|
|
181
190
|
'curl:-d:*', 'curl:--data:*', 'curl:-X:POST:*', 'curl:-X:PUT:*',
|
|
182
191
|
'wget:-O:/', 'wget:--post-data:*',
|
|
183
|
-
'ssh', '
|
|
184
|
-
'nc', '
|
|
185
|
-
'ftp',
|
|
186
|
-
|
|
192
|
+
'ssh', 'scp', 'sftp', 'rsync',
|
|
193
|
+
'nc', 'netcat', 'telnet',
|
|
194
|
+
'ftp',
|
|
195
|
+
|
|
187
196
|
// Process control and termination
|
|
188
|
-
'kill', '
|
|
189
|
-
'nohup
|
|
190
|
-
|
|
197
|
+
'kill', 'killall', 'pkill',
|
|
198
|
+
'nohup', 'disown',
|
|
199
|
+
|
|
191
200
|
// System control and shutdown
|
|
192
|
-
'shutdown', '
|
|
201
|
+
'shutdown', 'reboot', 'halt', 'poweroff',
|
|
193
202
|
'init', 'telinit',
|
|
194
|
-
|
|
203
|
+
|
|
195
204
|
// Kernel and module operations
|
|
196
|
-
'insmod', '
|
|
205
|
+
'insmod', 'rmmod', 'modprobe',
|
|
197
206
|
'sysctl:-w:*',
|
|
198
|
-
|
|
207
|
+
|
|
199
208
|
// Dangerous git operations
|
|
200
|
-
'git:push', 'git:
|
|
201
|
-
'git:clean', 'git:
|
|
202
|
-
'git:commit', 'git:
|
|
203
|
-
'git:rebase', 'git:
|
|
204
|
-
'git:stash:drop', 'git:stash:
|
|
205
|
-
'git:stash:push', 'git:stash:
|
|
206
|
-
'git:branch:-d', 'git:branch:-
|
|
207
|
-
'git:branch:--delete',
|
|
208
|
-
'git:tag:-d', 'git:tag
|
|
209
|
-
'git:remote:remove', 'git:remote:
|
|
210
|
-
'git:checkout:--force',
|
|
211
|
-
'git:checkout:-f',
|
|
212
|
-
'git:submodule:deinit',
|
|
213
|
-
'git:notes:add', 'git:notes:
|
|
214
|
-
'git:worktree:add',
|
|
215
|
-
'git:worktree:remove',
|
|
209
|
+
'git:push', 'git:force', 'git:reset',
|
|
210
|
+
'git:clean', 'git:rm',
|
|
211
|
+
'git:commit', 'git:merge',
|
|
212
|
+
'git:rebase', 'git:cherry-pick',
|
|
213
|
+
'git:stash:drop', 'git:stash:pop',
|
|
214
|
+
'git:stash:push', 'git:stash:clear',
|
|
215
|
+
'git:branch:-d', 'git:branch:-D',
|
|
216
|
+
'git:branch:--delete',
|
|
217
|
+
'git:tag:-d', 'git:tag:--delete',
|
|
218
|
+
'git:remote:remove', 'git:remote:rm',
|
|
219
|
+
'git:checkout:--force',
|
|
220
|
+
'git:checkout:-f',
|
|
221
|
+
'git:submodule:deinit',
|
|
222
|
+
'git:notes:add', 'git:notes:remove',
|
|
223
|
+
'git:worktree:add',
|
|
224
|
+
'git:worktree:remove',
|
|
216
225
|
|
|
217
226
|
// Dangerous GitHub CLI (gh) write operations
|
|
218
|
-
'gh:issue:create', 'gh:issue:
|
|
219
|
-
'gh:issue:delete', 'gh:issue:
|
|
220
|
-
'gh:issue:reopen',
|
|
221
|
-
'gh:issue:comment',
|
|
222
|
-
'gh:pr:create', 'gh:pr:
|
|
223
|
-
'gh:pr:merge', 'gh:pr:
|
|
224
|
-
'gh:pr:reopen', 'gh:pr:
|
|
225
|
-
'gh:pr:comment',
|
|
226
|
-
'gh:repo:create', 'gh:repo:
|
|
227
|
-
'gh:repo:fork', 'gh:repo:
|
|
228
|
-
'gh:repo:archive', 'gh:repo:
|
|
229
|
-
'gh:release:create', 'gh:release:
|
|
230
|
-
'gh:release:edit',
|
|
231
|
-
'gh:run:cancel', 'gh:run:
|
|
232
|
-
'gh:workflow:run',
|
|
233
|
-
'gh:workflow:enable', 'gh:workflow:
|
|
234
|
-
'gh:gist:create', 'gh:gist:
|
|
235
|
-
'gh:gist:edit',
|
|
236
|
-
'gh:secret:set', 'gh:secret:
|
|
237
|
-
'gh:variable:set', 'gh:variable:
|
|
238
|
-
'gh:label:create', 'gh:label:
|
|
239
|
-
'gh:ssh-key:add', 'gh:ssh-key:
|
|
240
|
-
|
|
227
|
+
'gh:issue:create', 'gh:issue:close',
|
|
228
|
+
'gh:issue:delete', 'gh:issue:edit',
|
|
229
|
+
'gh:issue:reopen',
|
|
230
|
+
'gh:issue:comment',
|
|
231
|
+
'gh:pr:create', 'gh:pr:close',
|
|
232
|
+
'gh:pr:merge', 'gh:pr:edit',
|
|
233
|
+
'gh:pr:reopen', 'gh:pr:review',
|
|
234
|
+
'gh:pr:comment',
|
|
235
|
+
'gh:repo:create', 'gh:repo:delete',
|
|
236
|
+
'gh:repo:fork', 'gh:repo:rename',
|
|
237
|
+
'gh:repo:archive', 'gh:repo:clone',
|
|
238
|
+
'gh:release:create', 'gh:release:delete',
|
|
239
|
+
'gh:release:edit',
|
|
240
|
+
'gh:run:cancel', 'gh:run:rerun',
|
|
241
|
+
'gh:workflow:run',
|
|
242
|
+
'gh:workflow:enable', 'gh:workflow:disable',
|
|
243
|
+
'gh:gist:create', 'gh:gist:delete',
|
|
244
|
+
'gh:gist:edit',
|
|
245
|
+
'gh:secret:set', 'gh:secret:delete',
|
|
246
|
+
'gh:variable:set', 'gh:variable:delete',
|
|
247
|
+
'gh:label:create', 'gh:label:delete',
|
|
248
|
+
'gh:ssh-key:add', 'gh:ssh-key:delete',
|
|
249
|
+
|
|
241
250
|
// File system mounting and partitioning
|
|
242
|
-
'mount', '
|
|
243
|
-
'parted', '
|
|
244
|
-
|
|
251
|
+
'mount', 'umount', 'fdisk',
|
|
252
|
+
'parted', 'mkfs', 'fsck',
|
|
253
|
+
|
|
245
254
|
// Cron and scheduling
|
|
246
|
-
'crontab', '
|
|
247
|
-
|
|
255
|
+
'crontab', 'at', 'batch',
|
|
256
|
+
|
|
248
257
|
// Compression with potential overwrite
|
|
249
|
-
'tar:-xf:*', 'unzip', '
|
|
250
|
-
|
|
258
|
+
'tar:-xf:*', 'unzip', 'gzip', 'gunzip',
|
|
259
|
+
|
|
251
260
|
// Build and compilation that might modify files
|
|
252
261
|
'make', 'make:install', 'make:clean', 'cargo:build', 'cargo:install',
|
|
253
262
|
'npm:run:build', 'yarn:build', 'mvn:install', 'gradle:build',
|
|
254
|
-
|
|
263
|
+
|
|
255
264
|
// Docker operations that could modify state
|
|
256
|
-
'docker:run', 'docker:
|
|
257
|
-
'docker:build', 'docker:
|
|
265
|
+
'docker:run', 'docker:exec',
|
|
266
|
+
'docker:build', 'docker:pull', 'docker:push',
|
|
258
267
|
'docker:rm', 'docker:rmi', 'docker:stop', 'docker:start',
|
|
259
|
-
|
|
268
|
+
|
|
260
269
|
// Database operations
|
|
261
270
|
'mysql:-e:DROP', 'psql:-c:DROP', 'redis-cli:FLUSHALL',
|
|
262
271
|
'mongo:--eval:*',
|
|
263
|
-
|
|
272
|
+
|
|
264
273
|
// Text editors that could modify files
|
|
265
|
-
'vi', '
|
|
274
|
+
'vi', 'vim', 'nano', 'emacs',
|
|
266
275
|
'sed:-i:*', 'perl:-i:*',
|
|
267
|
-
|
|
276
|
+
|
|
268
277
|
// Potentially dangerous utilities
|
|
269
|
-
'eval', '
|
|
278
|
+
'eval', 'exec', 'source',
|
|
270
279
|
'bash:-c:*', 'sh:-c:*', 'zsh:-c:*'
|
|
271
|
-
];
|
|
280
|
+
];
|