@solongate/proxy 0.82.55 → 0.82.56
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/hooks/audit.mjs +14 -1
- package/package.json +1 -1
package/hooks/audit.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { homedir } from 'node:os';
|
|
|
11
11
|
// Bump on every audit hook change. The cloud serves the newest version; the guard
|
|
12
12
|
// hook installs it on its next run (no re-login needed). See guard.mjs
|
|
13
13
|
// fetchAndInstallHook / maybeSelfUpdate.
|
|
14
|
-
const HOOK_VERSION =
|
|
14
|
+
const HOOK_VERSION = 17;
|
|
15
15
|
|
|
16
16
|
function loadEnvKey(dir) {
|
|
17
17
|
try {
|
|
@@ -131,6 +131,15 @@ function ghostMatch(targetPath, patterns) {
|
|
|
131
131
|
continue;
|
|
132
132
|
}
|
|
133
133
|
if (re.test(norm)) return true;
|
|
134
|
+
// A path ghost must also hide the file when a tool lists it by BARE name —
|
|
135
|
+
// `ls dir/` prints just "secret-plan.txt" (no slash), which a slash-pattern
|
|
136
|
+
// like `*/secret-plan.txt` would otherwise miss. Match the pattern's last
|
|
137
|
+
// segment against the target's basename.
|
|
138
|
+
const patBase = pat.slice(pat.lastIndexOf('/') + 1);
|
|
139
|
+
if (patBase && patBase !== pat) {
|
|
140
|
+
const reBase = ghostGlobToRegExp(patBase);
|
|
141
|
+
if (reBase && reBase.test(base)) return true;
|
|
142
|
+
}
|
|
134
143
|
}
|
|
135
144
|
return false;
|
|
136
145
|
}
|
|
@@ -151,6 +160,10 @@ function ghostStripLines(text, pats) {
|
|
|
151
160
|
const trimmed = line.trim();
|
|
152
161
|
if (!trimmed) { kept.push(line); continue; }
|
|
153
162
|
if (ghostMatch(trimmed, pats)) continue; // full-path listing line
|
|
163
|
+
// grep -n / ripgrep output is `path:line:content` (or `path:content`) — the
|
|
164
|
+
// path is the first colon field. Drop the whole match line if it's a ghost.
|
|
165
|
+
const firstField = trimmed.split(':')[0];
|
|
166
|
+
if (firstField && firstField !== trimmed && ghostMatch(firstField, pats)) continue;
|
|
154
167
|
const toks = trimmed.split(/\s+/);
|
|
155
168
|
const anyHit = toks.some((t) => ghostMatch(ghostCleanToken(t), pats));
|
|
156
169
|
if (!anyHit) { kept.push(line); continue; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.56",
|
|
4
4
|
"description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|