@diegopetrucci/pi-permission-gate 0.1.0 → 0.1.2
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/.pi-fleet-tested-version +1 -0
- package/README.md +1 -1
- package/index.ts +1 -1
- package/package.json +10 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.76.0
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A small pi extension that prompts for confirmation before running potentially dangerous bash commands.
|
|
4
4
|
|
|
5
|
-
This is adapted from the original `permission-gate.ts` example in [`
|
|
5
|
+
This is adapted from the original `permission-gate.ts` example in [`earendil-works/pi-mono`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/examples/extensions/permission-gate.ts) and kept basically the same.
|
|
6
6
|
|
|
7
7
|
## What it checks
|
|
8
8
|
|
package/index.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Patterns checked: rm -rf, sudo, chmod/chown 777
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
9
9
|
|
|
10
10
|
export default function (pi: ExtensionAPI) {
|
|
11
11
|
const dangerousPatterns = [/\brm\s+(-rf?|--recursive)/i, /\bsudo\b/i, /\b(chmod|chown)\b.*777/i];
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-permission-gate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A pi extension that prompts before dangerous bash commands.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package",
|
|
7
|
+
"pi",
|
|
8
|
+
"security",
|
|
9
|
+
"bash"
|
|
10
|
+
],
|
|
6
11
|
"license": "MIT",
|
|
7
12
|
"repository": {
|
|
8
13
|
"type": "git",
|
|
@@ -11,7 +16,8 @@
|
|
|
11
16
|
},
|
|
12
17
|
"files": [
|
|
13
18
|
"index.ts",
|
|
14
|
-
"README.md"
|
|
19
|
+
"README.md",
|
|
20
|
+
".pi-fleet-tested-version"
|
|
15
21
|
],
|
|
16
22
|
"publishConfig": {
|
|
17
23
|
"access": "public"
|
|
@@ -22,6 +28,6 @@
|
|
|
22
28
|
]
|
|
23
29
|
},
|
|
24
30
|
"peerDependencies": {
|
|
25
|
-
"@
|
|
31
|
+
"@earendil-works/pi-coding-agent": "*"
|
|
26
32
|
}
|
|
27
33
|
}
|