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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-agent-supervisor",
3
- "version": "1.0.0",
4
- "description": "Runtime safety net for AI agents blocks dangerous commands, protects files, enforces rate limits, and records sessions.",
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,9 @@
1
+ # Container & runtime escape
2
+ docker\s+run\s+.*--privileged
3
+ docker\s+run\s+.*--pid=host
4
+ docker\s+run\s+.*--network=host
5
+ docker\s+run\s+.*-v\s+/:/host
6
+ nsenter\s
7
+ mount\s+/dev/sd
8
+ capsh\s+--print
9
+ systemd-nspawn
@@ -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,10 @@
1
+ # Cryptomining & resource abuse
2
+ xmrig
3
+ minerd
4
+ cpuminer
5
+ stratum
6
+ nice\s+-n\s+-20
7
+ chrt\s+-f\s+99
8
+ stress-ng
9
+ yes\s+>\s+/dev/null
10
+ systemd-run\s+--scope\s+--property=CPUQuota
@@ -0,0 +1,15 @@
1
+ # Destructive commands
2
+ rm\s+-rf\s+/\s
3
+ rm\s+-rf\s+/$
4
+ rm\s+-rf\s+~
5
+ rm\s+-rf\s+\*
6
+ git\s+push\s+.*--force
7
+ git\s+push\s+.*-f\b
8
+ sudo\s+
9
+ chmod\s+777
10
+ >\s*/dev/sd[a-z]
11
+ dd\s+if=
12
+ mkfs\.
13
+ :(){ :|:& };:
14
+ >\s*\.env
15
+ >\s*\.git
@@ -0,0 +1,10 @@
1
+ # Evidence tampering & log wiping
2
+ history\s+-c
3
+ history\s+-d
4
+ rm\s+-f\s+/var/log/
5
+ >\s*/var/log/syslog
6
+ shred\s+-u
7
+ journalctl\s+.*--vacuum-time=1s
8
+ auditctl\s+-e\s+0
9
+ auditctl\s+-D
10
+ logrotate\s+-f
@@ -0,0 +1,8 @@
1
+ # Firmware & hardware destruction
2
+ flashrom
3
+ nvme\s+format
4
+ hdparm\s+.*--security-erase
5
+ hdparm\s+.*--security-set-pass
6
+ sg_format
7
+ ipmitool
8
+ efibootmgr
@@ -0,0 +1,7 @@
1
+ # Process injection & manipulation
2
+ LD_PRELOAD=
3
+ gdb\s+-p
4
+ strace\s+-p
5
+ kill\s+-9\s+1\b
6
+ kill\s+-SIGKILL\s+1\b
7
+ echo\s+.*>\s+/proc/sys/kernel/core_pattern
@@ -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
@@ -0,0 +1,7 @@
1
+ # Supply chain — pipe-to-shell & untrusted installs
2
+ curl\s+.*\|\s*bash
3
+ curl\s+.*\|\s*sh
4
+ wget\s+.*-qO-.*\|\s*bash
5
+ wget\s+.*-qO-.*\|\s*sh
6
+ pip\s+install\s+.*--index-url
7
+ npm\s+install\s+.*--registry\s+http