shield-llm 0.4.0 → 0.5.1

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 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-WM5Z3SXV.js";
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
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
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 {