Skip to content

Commit 0017e8b

Browse files
docs(security): mark path/ssrf guards as standalone, not wired to enforcement
path-guard.js and ssrf-guard.js (CORE-SU.A3) are exported from permissions/index.js but are not called by OperationGuard.guard() and are not registered as a PreToolUse hook. No write path or outbound request is validated by these guards automatically today. Add the same standalone-library notice prompt-guard.js already carries so callers don't assume runtime enforcement is active. No logic changed. Epic: docs/framework/epics/core-super-update/EPIC-CORE-SUPER-UPDATE.md
1 parent 468e12e commit 0017e8b

3 files changed

Lines changed: 96 additions & 56 deletions

File tree

.aiox-core/core/permissions/path-guard.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@
77
* @module permissions/path-guard
88
* @version 1.0.0
99
* @story CORE-SU.A3
10+
*
11+
* ─── STANDALONE LIBRARY — NOT WIRED TO RUNTIME ENFORCEMENT ───────────────
12+
*
13+
* This module is exported from `permissions/index.js` but is NOT called by
14+
* `operation-guard.js`'s `guard()` path, and is NOT registered as a
15+
* PreToolUse hook. No write operation is validated against this guard
16+
* automatically today. Callers must invoke `validateWrite()` /
17+
* `isTraversalAttempt()` explicitly wherever path-write safety is required
18+
* (e.g. app code writing to disk on behalf of untrusted input).
19+
*
20+
* If/when this is wired into `OperationGuard.guard()` or a hook, remove
21+
* this notice and document the integration point here.
22+
*
23+
* ─── USAGE ────────────────────────────────────────────────────────────────
24+
*
25+
* const pathGuard = require('.aiox-core/core/permissions/path-guard');
26+
* const result = pathGuard.validateWrite(targetPath);
27+
* if (!result.allowed) {
28+
* // Block: result.reason available
29+
* }
1030
*/
1131

1232
'use strict';

.aiox-core/core/permissions/ssrf-guard.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,26 @@
1616
* @module permissions/ssrf-guard
1717
* @version 1.0.0
1818
* @story CORE-SU.A3
19+
*
20+
* ─── STANDALONE LIBRARY — NOT WIRED TO RUNTIME ENFORCEMENT ───────────────
21+
*
22+
* This module is exported from `permissions/index.js` but is NOT called by
23+
* `operation-guard.js`'s `guard()` path, and is NOT registered as a
24+
* PreToolUse hook. No outbound request (WebFetch, MCP call, HTTP client) is
25+
* validated against this guard automatically today. Callers must invoke
26+
* `validateUrl()` / `isUrlAllowed()` explicitly wherever SSRF protection is
27+
* required (e.g. app code fetching a user- or agent-supplied URL).
28+
*
29+
* If/when this is wired into `OperationGuard.guard()` or a hook, remove
30+
* this notice and document the integration point here.
31+
*
32+
* ─── USAGE ────────────────────────────────────────────────────────────────
33+
*
34+
* const ssrfGuard = require('.aiox-core/core/permissions/ssrf-guard');
35+
* const result = ssrfGuard.validateUrl(untrustedUrl);
36+
* if (!result.allowed) {
37+
* // Block: result.reason available
38+
* }
1939
*/
2040

2141
'use strict';

0 commit comments

Comments
 (0)