shield-llm 0.4.0 → 0.5.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/README.md +20 -0
- package/dist/{chunk-UXBLUD2Y.js → chunk-AH5UVQFM.js} +1 -1
- package/dist/{chunk-WM5Z3SXV.js → chunk-I7M3BZK7.js} +5 -1
- package/dist/{chunk-DVOKN4JV.js → chunk-IB7T5OJ2.js} +978 -71
- package/dist/cli.js +1204 -137
- package/dist/index.js +2 -2
- package/dist/{token-BYYUIFPC.js → token-4MGV4LR3.js} +2 -2
- package/dist/{token-util-S2RPFVDM.js → token-util-U5SGZSEU.js} +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,6 +78,26 @@ shield-llm scan --preset owasp
|
|
|
78
78
|
- Auth: `bearer`, `api-key`, or `oauth2` (use `$ENV_VAR` to read secrets from
|
|
79
79
|
the environment instead of hard-coding them).
|
|
80
80
|
- CLI flags override config values.
|
|
81
|
+
- `knownSecrets` (optional canary) — list any secret your chatbot must never
|
|
82
|
+
reveal (a password, an API key, or a unique **canary token** you plant in its
|
|
83
|
+
system prompt). The judge deterministically flags any response that leaks one,
|
|
84
|
+
even base64/rot13/encoded, catching prompt-leak / data-exfil that an LLM judge
|
|
85
|
+
alone can miss:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"endpoint": {
|
|
90
|
+
"url": "https://api.example.com/chat",
|
|
91
|
+
"request": { "method": "POST", "body": { "message": "{{prompt}}" } },
|
|
92
|
+
"response": { "field": "data.reply" },
|
|
93
|
+
"knownSecrets": ["CANARY-7f3a9b2c1d4e"]
|
|
94
|
+
},
|
|
95
|
+
"preset": "standard"
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Use a long, high-entropy value (min 8 chars). It only ever raises a finding to
|
|
100
|
+
vulnerable and is ignored when unset — it never affects other tests.
|
|
81
101
|
|
|
82
102
|
## Commands
|
|
83
103
|
|
|
@@ -2,7 +2,7 @@ import { createRequire as __cjs_createRequire } from "module"; import { fileURLT
|
|
|
2
2
|
import {
|
|
3
3
|
__commonJS,
|
|
4
4
|
__require
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-I7M3BZK7.js";
|
|
6
6
|
|
|
7
7
|
// ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token-error.js
|
|
8
8
|
var require_token_error = __commonJS({
|
|
@@ -7,7 +7,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
8
|
});
|
|
9
9
|
var __commonJS = (cb, mod) => function __require2() {
|
|
10
|
-
|
|
10
|
+
try {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw mod = 0, e;
|
|
14
|
+
}
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
export {
|