@emilia-protocol/fire-drill 0.3.0 → 0.3.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/index.js +7 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -211,7 +211,13 @@ export function badgeSvg({ eg1, score, label = 'agent action firewall' } = {}) {
|
|
|
211
211
|
const lw = segWidth(label);
|
|
212
212
|
const mw = segWidth(message);
|
|
213
213
|
const w = lw + mw;
|
|
214
|
-
|
|
214
|
+
// Escape ALL XML-significant chars — including quotes — because `label`/`message`
|
|
215
|
+
// are interpolated into a double-quoted SVG attribute (aria-label). Missing the
|
|
216
|
+
// quote escape allowed attribute breakout / event-handler injection when the SVG
|
|
217
|
+
// is served as image/svg+xml from a public route.
|
|
218
|
+
const esc = (s) => String(s)
|
|
219
|
+
.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
|
220
|
+
.replace(/"/g, '"').replace(/'/g, ''');
|
|
215
221
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="20" role="img" aria-label="${esc(label)}: ${esc(message)}">`
|
|
216
222
|
+ `<linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient>`
|
|
217
223
|
+ `<rect rx="3" width="${w}" height="20" fill="#555"/>`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emilia-protocol/fire-drill",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "The Agent Action Firewall Test. Scan any MCP server manifest, OpenAPI spec, or tool list for dangerous actions an AI agent can take without an accountable human receipt — money movement, data destruction, production deploy, permission change, bulk export, regulated override. Reports an Agent Action Firewall score, the failing operations, the fix (EMILIA Gate), and EG-1 pass/fail. Static, zero-dependency, CI-friendly.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|