agentshield-sdk 7.4.0 → 10.0.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/CHANGELOG.md +48 -0
- package/LICENSE +21 -21
- package/README.md +30 -37
- package/bin/agentshield-audit +51 -0
- package/package.json +7 -9
- package/src/adaptive.js +330 -330
- package/src/agent-intent.js +807 -0
- package/src/alert-tuning.js +480 -480
- package/src/audit-streaming.js +1 -1
- package/src/badges.js +196 -196
- package/src/behavioral-dna.js +12 -0
- package/src/canary.js +2 -3
- package/src/certification.js +563 -563
- package/src/circuit-breaker.js +2 -2
- package/src/confused-deputy.js +4 -0
- package/src/conversation.js +494 -494
- package/src/cross-turn.js +649 -0
- package/src/ctf.js +462 -462
- package/src/detector-core.js +71 -152
- package/src/document-scanner.js +795 -795
- package/src/drift-monitor.js +344 -0
- package/src/encoding.js +429 -429
- package/src/ensemble.js +523 -0
- package/src/enterprise.js +405 -405
- package/src/flight-recorder.js +2 -0
- package/src/i18n-patterns.js +523 -523
- package/src/index.js +19 -0
- package/src/main.js +79 -6
- package/src/mcp-guard.js +974 -0
- package/src/micro-model.js +762 -0
- package/src/ml-detector.js +316 -0
- package/src/model-finetuning.js +884 -884
- package/src/multimodal.js +296 -296
- package/src/nist-mapping.js +2 -2
- package/src/observability.js +330 -330
- package/src/openclaw.js +450 -450
- package/src/otel.js +544 -544
- package/src/owasp-2025.js +1 -1
- package/src/owasp-agentic.js +420 -0
- package/src/persistent-learning.js +677 -0
- package/src/plugin-marketplace.js +628 -628
- package/src/plugin-system.js +349 -349
- package/src/policy-extended.js +635 -635
- package/src/policy.js +443 -443
- package/src/prompt-leakage.js +2 -2
- package/src/real-attack-datasets.js +2 -2
- package/src/redteam-cli.js +439 -0
- package/src/self-training.js +772 -0
- package/src/smart-config.js +812 -0
- package/src/supply-chain-scanner.js +691 -0
- package/src/testing.js +5 -1
- package/src/threat-encyclopedia.js +629 -629
- package/src/threat-intel-network.js +1017 -1017
- package/src/token-analysis.js +467 -467
- package/src/tool-output-validator.js +354 -354
- package/src/watermark.js +1 -2
- package/types/index.d.ts +660 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,54 @@ All notable changes to Agent Shield will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
This project follows [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [9.0.0] - 2026-03-24
|
|
8
|
+
|
|
9
|
+
### Changed — Everything Free
|
|
10
|
+
|
|
11
|
+
- **Removed all paid tier gating** — every feature is now free and open source
|
|
12
|
+
- **ML detection available to all users** — previously required Pro/Enterprise tier
|
|
13
|
+
- **Removed license key system** — no keys, no validation, no restrictions
|
|
14
|
+
- **Merged agentshield-pro features into core SDK** — ensemble, persistent learning, agent intent, cross-turn tracking, self-training, all included
|
|
15
|
+
- All compliance modules (SOC2, OWASP, NIST, EU AI Act) available to everyone
|
|
16
|
+
- All enterprise modules (distributed scanning, SSO, audit streaming) available to everyone
|
|
17
|
+
- CORTEX autonomous defense available to everyone
|
|
18
|
+
- Updated README, ROADMAP, CLAUDE.md for v9.0.0
|
|
19
|
+
|
|
20
|
+
### Metrics
|
|
21
|
+
|
|
22
|
+
- **2,220+ test assertions** across 16 test suites + Python + VSCode
|
|
23
|
+
- **0 regressions** — all existing tests pass
|
|
24
|
+
- **400+ exports** across 94 modules
|
|
25
|
+
|
|
26
|
+
## [8.0.0] - 2026-03-22
|
|
27
|
+
|
|
28
|
+
### Added — Intelligent Detection Engine
|
|
29
|
+
|
|
30
|
+
- **Smart Configuration System** (`src/smart-config.js`) — `createShield('chatbot')` for 3-line setup, `ShieldBuilder` fluent API with 15 chainable methods, `validateConfig()`, `describeConfig()`, 9 presets including `mcp_server`
|
|
31
|
+
- **Ensemble Voting Classifier** (`src/ensemble.js`) — `EnsembleClassifier` combining 4 independent voters (PatternVoter, TFIDFVoter, EntropyVoter, IPIAVoter) via weighted majority voting. Configurable weights, `requireUnanimous` mode, agreement scoring
|
|
32
|
+
- **Agent Intent Declaration** (`src/agent-intent.js`) — `AgentIntent` class for declaring agent purpose and allowed tools. TF-IDF cosine similarity checks if messages are on-topic
|
|
33
|
+
- **Goal Drift Detection** (`src/agent-intent.js`) — `GoalDriftDetector` monitors conversation for drift away from declared purpose. Sliding window, trend detection (stable/drifting/recovering), drift callbacks
|
|
34
|
+
- **Tool Sequence Modeling** (`src/agent-intent.js`) — `ToolSequenceModeler` learns normal tool call patterns via Markov chain bigrams. Flags anomalous tool transitions after learning period
|
|
35
|
+
- **Persistent Learning** (`src/persistent-learning.js`) — `PersistentLearningLoop` with disk persistence via atomic JSON writes. Pattern promotion, decay, false positive revocation, export/import
|
|
36
|
+
- **Feedback API** (`src/persistent-learning.js`) — `FeedbackCollector` for FP/FN reporting. Auto-processes feedback into learning loop. Retrain cooldown, audit trail
|
|
37
|
+
- **Cross-Turn Injection Tracking** (`src/cross-turn.js`) — `CrossTurnTracker` accumulates conversation and detects injections split across multiple messages. Compares individual vs combined scan results
|
|
38
|
+
- **Adaptive Threshold Calibration** (`src/cross-turn.js`) — `AdaptiveThresholdCalibrator` auto-tunes detection thresholds per category using percentile-based calibration on observed scan results
|
|
39
|
+
- **Adversarial Self-Training** (`src/self-training.js`) — `SelfTrainer` with `MutationEngine` (12 strategies: synonym swap, homoglyph, leet speak, zero-width insert, padding, encoding wrap, etc.). Evolves attacks, extracts patterns from evasive variants
|
|
40
|
+
- 25 built-in seed attacks for self-training
|
|
41
|
+
- 161 new test assertions (test/test-v8-features.js)
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- `src/main.js` — 418 total exports (up from 395)
|
|
46
|
+
- 9 configuration presets (up from 8, added `mcp_server`)
|
|
47
|
+
- Updated README, ROADMAP, and CLAUDE.md
|
|
48
|
+
|
|
49
|
+
### Metrics
|
|
50
|
+
|
|
51
|
+
- **2,500+ test assertions** across all test suites
|
|
52
|
+
- **0 regressions** — all existing tests pass
|
|
53
|
+
- **418 exports** from unified entry point
|
|
54
|
+
|
|
7
55
|
## [7.4.0] - 2026-03-21
|
|
8
56
|
|
|
9
57
|
### Added — Detection Hardening
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Agent Shield Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agent Shield Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Agent Shield
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/agentshield-sdk)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](#)
|
|
6
6
|
[](#)
|
|
7
7
|
[](#benchmark-results)
|
|
8
8
|
[](#benchmark-results)
|
|
9
|
-
[](#testing)
|
|
10
|
+
[](#why-free)
|
|
11
11
|
|
|
12
|
-
**The security standard for
|
|
12
|
+
**The complete security standard for AI agents.** 400+ exports. 94 modules. Every feature free. Protect your agents from prompt injection, confused deputy attacks, data exfiltration, privilege escalation, and 30+ other AI-specific threats.
|
|
13
13
|
|
|
14
|
-
Zero dependencies. All detection runs locally. No API keys. No data ever leaves your environment.
|
|
14
|
+
Zero dependencies. All detection runs locally. No API keys. No tiers. No data ever leaves your environment.
|
|
15
15
|
|
|
16
16
|
Available for **Node.js**, **Python**, **Go**, **Rust**, and in-browser via **WASM**.
|
|
17
17
|
|
|
@@ -23,29 +23,11 @@ Available for **Node.js**, **Python**, **Go**, **Rust**, and in-browser via **WA
|
|
|
23
23
|
<b>Try it yourself:</b> <code>npx agent-shield demo</code>
|
|
24
24
|
</p>
|
|
25
25
|
|
|
26
|
-
## v7.4 — Detection Hardening & Normalization
|
|
27
26
|
|
|
28
|
-
**F1 score: 100%.** 21 new detection patterns for prompt extraction, instruction override, and authority spoofing — validated against HackAPrompt, TensorTrust, and security research datasets with zero false positives.
|
|
29
|
-
|
|
30
|
-
New **text normalization pipeline** strips obfuscation before scanning: Unicode canonicalization, homoglyph mapping, encoding decode (Base64/hex/URL/HTML entities), leet speak, invisible character removal, whitespace normalization, repetition collapse, and markdown stripping.
|
|
31
|
-
|
|
32
|
-
**50-cycle bug hunt** fixed 30+ real bugs across all 50 source modules: memory leaks, spin-waits, falsy-zero defaults, self-matching detection, cache collisions, unbounded growth, and hot-path optimizations.
|
|
33
|
-
|
|
34
|
-
```javascript
|
|
35
|
-
const { normalize } = require('agentshield-sdk');
|
|
36
|
-
|
|
37
|
-
// 8-layer normalization pipeline
|
|
38
|
-
const result = normalize('ℹ𝗀𝗇𝗈𝗋𝖾 𝖺𝗅𝗅 ᎥnstructᎥons');
|
|
39
|
-
// { normalized: 'ignore all instructions', layers: ['unicode_canon', 'homoglyph'] }
|
|
40
|
-
|
|
41
|
-
// Normalization is automatic — scanText runs it behind the scenes
|
|
42
|
-
const { scanText } = require('agentshield-sdk');
|
|
43
|
-
scanText('ℹ𝗀𝗇𝗈𝗋𝖾 𝖺𝗅𝗅 ᎥnstructᎥons'); // Detected! (after normalization)
|
|
44
|
-
```
|
|
45
27
|
|
|
46
28
|
---
|
|
47
29
|
|
|
48
|
-
##
|
|
30
|
+
## Indirect Prompt Injection Detection
|
|
49
31
|
|
|
50
32
|
**Stop attacks hidden in RAG chunks, tool outputs, emails, and documents.** The IPIA detector implements the joint-context embedding + classifier pipeline to catch injections that bypass pattern matching.
|
|
51
33
|
|
|
@@ -77,7 +59,7 @@ const result2 = await detector2.scanAsync(chunk, query);
|
|
|
77
59
|
|
|
78
60
|
---
|
|
79
61
|
|
|
80
|
-
##
|
|
62
|
+
## MCP Security Runtime
|
|
81
63
|
|
|
82
64
|
**One line to secure any MCP server.** The unified security layer that connects per-user authorization, threat scanning, behavioral monitoring, and audit logging into a single runtime.
|
|
83
65
|
|
|
@@ -177,8 +159,8 @@ const shield = new AgentShield({ blockOnThreat: true });
|
|
|
177
159
|
const result = shield.scanInput(userMessage); // { blocked: true, threats: [...] }
|
|
178
160
|
```
|
|
179
161
|
|
|
180
|
-
-
|
|
181
|
-
- 2,
|
|
162
|
+
- 400+ exports across 94 modules
|
|
163
|
+
- 2,220 test assertions across 16 test suites + Python + VSCode, 100% pass rate
|
|
182
164
|
- 100% red team detection rate (A+ grade)
|
|
183
165
|
- F1 100% on real-world attack benchmarks (HackAPrompt, TensorTrust, research corpus)
|
|
184
166
|
- Shield Score: 100/100 — fortress-grade protection
|
|
@@ -366,6 +348,10 @@ grpc.NewServer(grpc.UnaryInterceptor(shield.GRPCInterceptor(s)))
|
|
|
366
348
|
| **Indirect Injection** | RAG chunk poisoning, tool output injection, email/document payloads, image alt-text attacks, multi-turn escalation |
|
|
367
349
|
| **AI Phishing** | Fake AI login, voice cloning, deepfake tools, QR phishing, MFA harvesting |
|
|
368
350
|
| **Jailbreaks** | 35+ templates across 6 categories: role play, encoding bypass, context manipulation, authority exploitation |
|
|
351
|
+
| **Ensemble Detection** | 4 independent voting signals, weighted consensus, adaptive threshold calibration |
|
|
352
|
+
| **Intent & Goal Drift** | Agent purpose declaration, goal drift monitoring, tool sequence anomaly detection (Markov chains) |
|
|
353
|
+
| **Cross-Turn Injection** | Split-message attack tracking, multi-turn state correlation |
|
|
354
|
+
| **Adaptive Learning** | Persistent learning with disk storage, feedback API (FP/FN reporting), adversarial self-training (12 mutation strategies) |
|
|
369
355
|
|
|
370
356
|
## Platform SDKs
|
|
371
357
|
|
|
@@ -416,7 +402,7 @@ validator.validate(plugin); // Safety & quality validation
|
|
|
416
402
|
|
|
417
403
|
The `vscode-extension/` directory contains a VS Code extension that provides inline diagnostics and real-time scanning for JS/TS/Python/Markdown files with 141 detection patterns.
|
|
418
404
|
|
|
419
|
-
###
|
|
405
|
+
### Distributed & Multi-Tenant (v2.1)
|
|
420
406
|
|
|
421
407
|
```javascript
|
|
422
408
|
const { DistributedShield, AuditStreamManager, SSOManager, MultiTenantShield } = require('agent-shield');
|
|
@@ -928,12 +914,13 @@ npx agent-shield dashboard # Security dashboard
|
|
|
928
914
|
```bash
|
|
929
915
|
npm test # Core + module tests (248 assertions)
|
|
930
916
|
npm run test:all # Full 40-feature suite (149 assertions)
|
|
917
|
+
npm run test:ml # ML detector tests (37 assertions)
|
|
931
918
|
npm run test:ipia # IPIA detector tests (117 assertions)
|
|
932
|
-
npm run test:
|
|
933
|
-
npm run test:
|
|
934
|
-
npm run test:
|
|
935
|
-
|
|
936
|
-
|
|
919
|
+
npm run test:mcp # MCP security runtime tests (112 assertions)
|
|
920
|
+
npm run test:v6 # v6.0 compliance & standards (122 assertions)
|
|
921
|
+
npm run test:adaptive # Adaptive defense tests (85 assertions)
|
|
922
|
+
npm run test:deputy # Confused deputy prevention (85 assertions)
|
|
923
|
+
npm run test:fp # False positive accuracy (99.2%)
|
|
937
924
|
npm run redteam # Attack simulation (100% detection)
|
|
938
925
|
npm run score # Shield Score (100/100 A+)
|
|
939
926
|
npm run benchmark # Performance benchmarks
|
|
@@ -944,17 +931,17 @@ Sub-project tests:
|
|
|
944
931
|
node dashboard-live/test/test-server.js # Dashboard (14 tests)
|
|
945
932
|
node github-app/test/test-scanner.js # GitHub App (20 tests)
|
|
946
933
|
node benchmark-registry/test/test-registry.js # Benchmarks (22 tests)
|
|
947
|
-
node vscode-extension/test/extension.test.js # VS Code (
|
|
948
|
-
cd python-sdk && python -m unittest tests/test_detector.py # Python (
|
|
934
|
+
node vscode-extension/test/extension.test.js # VS Code (607 tests)
|
|
935
|
+
cd python-sdk && python -m unittest tests/test_detector.py # Python (32 tests)
|
|
949
936
|
```
|
|
950
937
|
|
|
951
|
-
Total: **2,
|
|
938
|
+
Total: **2,220 test assertions** across 16 test suites + Python + VSCode.
|
|
952
939
|
|
|
953
940
|
## Project Structure
|
|
954
941
|
|
|
955
942
|
```
|
|
956
943
|
/
|
|
957
|
-
├── src/ # Node.js SDK (
|
|
944
|
+
├── src/ # Node.js SDK (400+ exports, 94 modules)
|
|
958
945
|
│ ├── index.js # AgentShield class — main entry point
|
|
959
946
|
│ ├── main.js # Unified re-export of all modules
|
|
960
947
|
│ ├── detector-core.js # Core detection engine (patterns, scanning)
|
|
@@ -1062,6 +1049,12 @@ console.log(report.formatReport());
|
|
|
1062
1049
|
|
|
1063
1050
|
A GitHub Actions workflow is included at `.github/workflows/ci.yml`. It runs all tests across Node.js 18, 20, and 22 on every push and PR.
|
|
1064
1051
|
|
|
1052
|
+
## Why Free?
|
|
1053
|
+
|
|
1054
|
+
Agent Shield started as a paid SDK with Pro and Enterprise tiers. We removed all gating in v9.0. Every feature — ML detection, compliance reporting, MCP security, CORTEX autonomous defense — is now free and open source.
|
|
1055
|
+
|
|
1056
|
+
Security shouldn't have a paywall. If your agent is vulnerable, it doesn't matter what tier you're on.
|
|
1057
|
+
|
|
1065
1058
|
## Privacy
|
|
1066
1059
|
|
|
1067
1060
|
All detection runs locally using pattern matching. No data is sent to any external service. No API keys required. No cloud dependencies. See [PRIVACY.md](PRIVACY.md) for details.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Agent Shield — Red Team Audit CLI
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* npx agentshield-audit <endpoint> [--mode quick|standard|full] [--out dir]
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const { RedTeamCLI } = require('../src/redteam-cli');
|
|
12
|
+
|
|
13
|
+
function parseArgs(argv) {
|
|
14
|
+
const args = { endpoint: null, mode: 'standard', out: process.cwd() };
|
|
15
|
+
const values = argv.slice(2);
|
|
16
|
+
args.endpoint = values[0];
|
|
17
|
+
for (let i = 1; i < values.length; i++) {
|
|
18
|
+
if (values[i] === '--mode' && values[i + 1]) {
|
|
19
|
+
args.mode = values[i + 1];
|
|
20
|
+
i++;
|
|
21
|
+
} else if (values[i] === '--out' && values[i + 1]) {
|
|
22
|
+
args.out = values[i + 1];
|
|
23
|
+
i++;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return args;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function main() {
|
|
30
|
+
const args = parseArgs(process.argv);
|
|
31
|
+
if (!args.endpoint) {
|
|
32
|
+
console.error('Usage: npx agentshield-audit <endpoint> [--mode quick|standard|full] [--out dir]');
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const cli = new RedTeamCLI();
|
|
37
|
+
const report = cli.run(args.endpoint, { mode: args.mode });
|
|
38
|
+
const files = cli.writeReports(report, args.out);
|
|
39
|
+
|
|
40
|
+
console.log(`[Agent Shield] Grade ${report.grade} (${report.score}/100) for ${report.endpoint}`);
|
|
41
|
+
console.log(`[Agent Shield] ${report.blocked}/${report.attackCount} attacks blocked`);
|
|
42
|
+
console.log(`[Agent Shield] JSON report: ${files.jsonPath}`);
|
|
43
|
+
console.log(`[Agent Shield] Markdown report: ${files.mdPath}`);
|
|
44
|
+
console.log(`[Agent Shield] HTML report: ${files.htmlPath}`);
|
|
45
|
+
|
|
46
|
+
if (report.grade === 'F' || (report.supplyChain && report.supplyChain.highestSeverity === 'critical')) {
|
|
47
|
+
process.exit(2);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentshield-sdk",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The security standard for MCP and AI agents.
|
|
3
|
+
"version": "10.0.0",
|
|
4
|
+
"description": "The security standard for MCP and AI agents. 141 detection patterns, CORTEX threat intelligence, pre-deployment audit, intent firewall, flight recorder, and 390+ exports. Zero dependencies, runs locally.",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -18,22 +18,21 @@
|
|
|
18
18
|
"./package.json": "./package.json"
|
|
19
19
|
},
|
|
20
20
|
"bin": {
|
|
21
|
-
"agent-shield": "bin/agent-shield.js"
|
|
21
|
+
"agent-shield": "bin/agent-shield.js",
|
|
22
|
+
"agentshield-audit": "bin/agentshield-audit"
|
|
22
23
|
},
|
|
23
24
|
"sideEffects": false,
|
|
24
25
|
"scripts": {
|
|
25
|
-
"test": "node test/test.js && node test/test-modules.js && node test/test-new-features.js",
|
|
26
|
+
"test": "node test/test.js && node test/test-modules.js && node test/test-new-features.js && node test/test-mcp-guard.js && node test/test-supply-chain-scanner.js && node test/test-owasp-agentic.js && node test/test-redteam-cli.js && node test/test-drift-monitor.js && node test/test-micro-model.js",
|
|
27
|
+
"test:new-products": "node test/test-mcp-guard.js && node test/test-supply-chain-scanner.js && node test/test-owasp-agentic.js && node test/test-redteam-cli.js && node test/test-drift-monitor.js && node test/test-micro-model.js",
|
|
26
28
|
"test:all": "node test/test-all-40-features.js",
|
|
27
29
|
"test:mcp": "node test/test-mcp-security.js",
|
|
28
30
|
"test:deputy": "node test/test-confused-deputy.js",
|
|
29
31
|
"test:v6": "node test/test-v6-modules.js",
|
|
30
32
|
"test:adaptive": "node test/test-adaptive-defense.js",
|
|
31
33
|
"test:ipia": "node test/test-ipia-detector.js",
|
|
32
|
-
"test:normalizer": "node test/test-normalizer.js",
|
|
33
|
-
"test:scorecard": "node test/benchmark-scorecard.js",
|
|
34
|
-
"test:edge": "node test/test-edge-cases.js",
|
|
35
34
|
"test:production": "node test/test-production-readiness.js",
|
|
36
|
-
"test:full": "npm test && node test/test-mcp-security.js && node test/test-confused-deputy.js && node test/test-v6-modules.js && node test/test-adaptive-defense.js && node test/test-ipia-detector.js && node test/test-production-readiness.js &&
|
|
35
|
+
"test:full": "npm test && node test/test-mcp-security.js && node test/test-confused-deputy.js && node test/test-v6-modules.js && node test/test-adaptive-defense.js && node test/test-ipia-detector.js && node test/test-production-readiness.js && npm run test:all",
|
|
37
36
|
"test:coverage": "c8 --reporter=text --reporter=lcov --reporter=json-summary npm test",
|
|
38
37
|
"lint": "node test/lint.js",
|
|
39
38
|
"lint:eslint": "eslint src/ test/ bin/",
|
|
@@ -55,7 +54,6 @@
|
|
|
55
54
|
"demo": "node bin/agent-shield.js demo",
|
|
56
55
|
"playground": "echo 'Open playground/index.html in a browser'",
|
|
57
56
|
"certify": "node -e \"const {CertificationRunner}=require('./src/certification');new CertificationRunner().runCertification().then(r=>console.log(r.certificate.toText()))\"",
|
|
58
|
-
"benchmark:scorecard": "node test/benchmark-scorecard.js",
|
|
59
57
|
"benchmark:run": "node scripts/run-benchmark.js",
|
|
60
58
|
"benchmark:generate": "node scripts/generate-dataset.js",
|
|
61
59
|
"benchmark:baseline": "node scripts/run-benchmark.js --save-baseline",
|