@vtstech/pi-security 1.0.8 → 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 +2 -2
- package/security.js +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtstech/pi-security",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Security extension for Pi Coding Agent",
|
|
5
5
|
"main": "security.js",
|
|
6
6
|
"keywords": ["pi-extensions"],
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/VTSTech/pi-coding-agent"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@vtstech/pi-shared": "1.0
|
|
17
|
+
"@vtstech/pi-shared": "1.1.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@mariozechner/pi-coding-agent": ">=0.66"
|
package/security.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
BLOCKED_URL_PATTERNS
|
|
11
11
|
} from "@vtstech/pi-shared/security";
|
|
12
12
|
import { section, ok, fail, warn, info } from "@vtstech/pi-shared/format";
|
|
13
|
+
import { EXTENSION_VERSION } from "@vtstech/pi-shared/ollama";
|
|
13
14
|
function security_temp_default(pi) {
|
|
14
15
|
const stats = {
|
|
15
16
|
blocked: 0,
|
|
@@ -18,7 +19,7 @@ function security_temp_default(pi) {
|
|
|
18
19
|
byRule: {}
|
|
19
20
|
};
|
|
20
21
|
const branding = [
|
|
21
|
-
` \u26A1 Pi Security Extension
|
|
22
|
+
` \u26A1 Pi Security Extension v${EXTENSION_VERSION}`,
|
|
22
23
|
` Written by VTSTech`,
|
|
23
24
|
` GitHub: https://github.com/VTSTech`,
|
|
24
25
|
` Website: www.vts-tech.org`
|
|
@@ -87,7 +88,7 @@ function security_temp_default(pi) {
|
|
|
87
88
|
toolCallId,
|
|
88
89
|
action: "allowed",
|
|
89
90
|
rule: result.rule || "none",
|
|
90
|
-
detail: "
|
|
91
|
+
detail: "Bash/tool executed (allowed)",
|
|
91
92
|
input: sanitizeInputForLog(input)
|
|
92
93
|
});
|
|
93
94
|
}
|
|
@@ -189,7 +190,10 @@ function security_temp_default(pi) {
|
|
|
189
190
|
promptGuidelines: [
|
|
190
191
|
"When the user asks about security, blocked operations, or audit log, call security_audit."
|
|
191
192
|
],
|
|
192
|
-
parameters: {
|
|
193
|
+
parameters: {
|
|
194
|
+
type: "object",
|
|
195
|
+
properties: {}
|
|
196
|
+
},
|
|
193
197
|
execute: async (_toolCallId, _params, _signal, _onUpdate, _ctx) => {
|
|
194
198
|
try {
|
|
195
199
|
const report = await generateAuditReport();
|