pi-agent-supervisor 1.0.0 → 1.1.0
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/package.json +11 -3
- package/patterns/container.txt +9 -0
- package/patterns/credentials.txt +14 -0
- package/patterns/crypto.txt +10 -0
- package/patterns/destructive.txt +15 -0
- package/patterns/evasion.txt +10 -0
- package/patterns/hardware.txt +8 -0
- package/patterns/injection.txt +7 -0
- package/patterns/network.txt +12 -0
- package/patterns/persistence.txt +14 -0
- package/patterns/supplychain.txt +7 -0
- package/src/__tests__/supervisor.test.ts +882 -0
- package/src/config.ts +69 -0
- package/src/helpers.ts +44 -0
- package/src/index.ts +22 -460
- package/src/intercepts.ts +70 -0
- package/src/state.ts +16 -0
- package/src/tools/supervisor.ts +65 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-supervisor",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Runtime safety net for AI agents
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Runtime safety net for AI agents \u2014 blocks dangerous commands, protects files, enforces rate limits, and records sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
7
7
|
"pi-extension",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"src/",
|
|
31
|
+
"patterns/",
|
|
31
32
|
"README.md",
|
|
32
33
|
"AGENTS.md",
|
|
33
34
|
"LICENSE"
|
|
@@ -40,5 +41,12 @@
|
|
|
40
41
|
"extensions": [
|
|
41
42
|
"./src/index.ts"
|
|
42
43
|
]
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:watch": "vitest"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"vitest": "^2.0.0"
|
|
43
51
|
}
|
|
44
|
-
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Credential & secret access
|
|
2
|
+
cat\s+.*~?/\.ssh/id_
|
|
3
|
+
cat\s+.*~?/\.aws/credentials
|
|
4
|
+
cat\s+.*~?/\.config/gcloud
|
|
5
|
+
env\s*\|\s*grep\s+.*key
|
|
6
|
+
env\s*\|\s*grep\s+.*token
|
|
7
|
+
env\s*\|\s*grep\s+.*secret
|
|
8
|
+
env\s*\|\s*grep\s+.*password
|
|
9
|
+
find\s+.*-name\s+.*\.pem
|
|
10
|
+
find\s+.*-name\s+.*\.key
|
|
11
|
+
cat\s+/proc/\*/environ
|
|
12
|
+
sqlite3\s+.*cookies
|
|
13
|
+
cat\s+.*~?/\.netrc
|
|
14
|
+
security\s+find-generic-password
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Network exfiltration & reverse shells
|
|
2
|
+
curl\s+.*-F\s+'?file=@
|
|
3
|
+
wget\s+.*--post-file=
|
|
4
|
+
nc\s+-e\s+/bin
|
|
5
|
+
ncat\s+.*--sh-exec
|
|
6
|
+
python3?\s+-m\s+http\.server
|
|
7
|
+
ssh\s+-R\s
|
|
8
|
+
autossh\s+-R\s
|
|
9
|
+
scp\s+.*@.*:
|
|
10
|
+
rsync\s+.*@.*:
|
|
11
|
+
dig\s+\+short\s+myip\.opendns\.com
|
|
12
|
+
curl\s+ifconfig\.me
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Persistence & backdoors
|
|
2
|
+
crontab\s+-e
|
|
3
|
+
crontab\s+-l\s*\|
|
|
4
|
+
\*\s+\*\s+\*\s+\*\s+\*
|
|
5
|
+
systemctl\s+enable\s+--now
|
|
6
|
+
>.*~?/\.bashrc
|
|
7
|
+
>.*~?/\.bash_profile
|
|
8
|
+
>.*~?/\.zshrc
|
|
9
|
+
>.*~?/\.ssh/authorized_keys
|
|
10
|
+
ssh-keygen
|
|
11
|
+
chattr\s+\+i
|
|
12
|
+
setfacl
|
|
13
|
+
at\s+now
|
|
14
|
+
batch\s
|