@empowered-humanity/agent-security 1.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/LICENSE +21 -0
- package/README.md +295 -0
- package/SECURITY.md +96 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +200 -0
- package/dist/index.js.map +1 -0
- package/dist/patterns/agent-attacks.d.ts +53 -0
- package/dist/patterns/agent-attacks.d.ts.map +1 -0
- package/dist/patterns/agent-attacks.js +304 -0
- package/dist/patterns/agent-attacks.js.map +1 -0
- package/dist/patterns/credentials.d.ts +30 -0
- package/dist/patterns/credentials.d.ts.map +1 -0
- package/dist/patterns/credentials.js +231 -0
- package/dist/patterns/credentials.js.map +1 -0
- package/dist/patterns/defense-evasion.d.ts +39 -0
- package/dist/patterns/defense-evasion.d.ts.map +1 -0
- package/dist/patterns/defense-evasion.js +193 -0
- package/dist/patterns/defense-evasion.js.map +1 -0
- package/dist/patterns/index.d.ts +73 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +114 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/injection.d.ts +68 -0
- package/dist/patterns/injection.d.ts.map +1 -0
- package/dist/patterns/injection.js +398 -0
- package/dist/patterns/injection.js.map +1 -0
- package/dist/patterns/mcp-checklist.d.ts +30 -0
- package/dist/patterns/mcp-checklist.d.ts.map +1 -0
- package/dist/patterns/mcp-checklist.js +559 -0
- package/dist/patterns/mcp-checklist.js.map +1 -0
- package/dist/patterns/owasp-asi.d.ts +79 -0
- package/dist/patterns/owasp-asi.d.ts.map +1 -0
- package/dist/patterns/owasp-asi.js +274 -0
- package/dist/patterns/owasp-asi.js.map +1 -0
- package/dist/patterns/rce.d.ts +44 -0
- package/dist/patterns/rce.d.ts.map +1 -0
- package/dist/patterns/rce.js +276 -0
- package/dist/patterns/rce.js.map +1 -0
- package/dist/patterns/types.d.ts +134 -0
- package/dist/patterns/types.d.ts.map +1 -0
- package/dist/patterns/types.js +8 -0
- package/dist/patterns/types.js.map +1 -0
- package/dist/reporters/console.d.ts +31 -0
- package/dist/reporters/console.d.ts.map +1 -0
- package/dist/reporters/console.js +147 -0
- package/dist/reporters/console.js.map +1 -0
- package/dist/reporters/index.d.ts +6 -0
- package/dist/reporters/index.d.ts.map +1 -0
- package/dist/reporters/index.js +6 -0
- package/dist/reporters/index.js.map +1 -0
- package/dist/reporters/json.d.ts +19 -0
- package/dist/reporters/json.d.ts.map +1 -0
- package/dist/reporters/json.js +74 -0
- package/dist/reporters/json.js.map +1 -0
- package/dist/scanner/content-scanner.d.ts +40 -0
- package/dist/scanner/content-scanner.d.ts.map +1 -0
- package/dist/scanner/content-scanner.js +101 -0
- package/dist/scanner/content-scanner.js.map +1 -0
- package/dist/scanner/engine.d.ts +38 -0
- package/dist/scanner/engine.d.ts.map +1 -0
- package/dist/scanner/engine.js +373 -0
- package/dist/scanner/engine.js.map +1 -0
- package/dist/scanner/index.d.ts +6 -0
- package/dist/scanner/index.d.ts.map +1 -0
- package/dist/scanner/index.js +6 -0
- package/dist/scanner/index.js.map +1 -0
- package/package.json +88 -0
- package/sbom.json +107 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern Matching Engine
|
|
3
|
+
*
|
|
4
|
+
* Core engine for matching security patterns against content.
|
|
5
|
+
* Includes:
|
|
6
|
+
* - Context-aware filtering (file type → pattern context matching)
|
|
7
|
+
* - Test file detection and severity downgrade
|
|
8
|
+
* - Auto-classification of findings (why the finding exists)
|
|
9
|
+
* - Taint proximity analysis (is user input near dangerous sinks?)
|
|
10
|
+
* - Context flow tracing (does serialized context reach external tools?)
|
|
11
|
+
*/
|
|
12
|
+
import type { DetectionPattern, Finding, FindingClassification, MatchContext, RiskScore, ScanResult, TaintProximity } from '../patterns/types.js';
|
|
13
|
+
export declare function inferFileContext(filePath: string): MatchContext;
|
|
14
|
+
export declare function shouldApplyPattern(pattern: DetectionPattern, filePath: string): boolean;
|
|
15
|
+
export declare function isTestFile(filePath: string): boolean;
|
|
16
|
+
export declare function classifyFinding(finding: Finding): FindingClassification;
|
|
17
|
+
export declare function analyzeTaintProximity(lines: string[], sinkLineIndex: number, windowSize?: number): TaintProximity;
|
|
18
|
+
export declare function traceContextFlow(lines: string[], serializeLineIndex: number, windowSize?: number): string[] | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Match a single pattern against content with full intelligence pipeline
|
|
21
|
+
*/
|
|
22
|
+
export declare function matchPattern(pattern: DetectionPattern, content: string, file: string): Finding[];
|
|
23
|
+
/**
|
|
24
|
+
* Match multiple patterns against content
|
|
25
|
+
*/
|
|
26
|
+
export declare function matchPatterns(patterns: DetectionPattern[], content: string, file: string): Finding[];
|
|
27
|
+
export declare function calculateRiskScore(findings: Finding[]): RiskScore;
|
|
28
|
+
export declare function deduplicateFindings(findings: Finding[]): Finding[];
|
|
29
|
+
export declare function sortFindingsBySeverity(findings: Finding[]): Finding[];
|
|
30
|
+
export declare function groupFindingsByFile(findings: Finding[]): Map<string, Finding[]>;
|
|
31
|
+
export declare function groupFindingsByCategory(findings: Finding[]): Map<string, Finding[]>;
|
|
32
|
+
/**
|
|
33
|
+
* Group findings by classification
|
|
34
|
+
*/
|
|
35
|
+
export declare function groupFindingsByClassification(findings: Finding[]): Map<FindingClassification, Finding[]>;
|
|
36
|
+
export declare function filterFindingsBySeverity(findings: Finding[], minSeverity: 'critical' | 'high' | 'medium' | 'low'): Finding[];
|
|
37
|
+
export declare function createScanResult(filesScanned: number, patternsChecked: number, findings: Finding[], startTime: number): ScanResult;
|
|
38
|
+
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/scanner/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,qBAAqB,EACrB,YAAY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uB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CASnF;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,qBAAqB,EAAE,OAAO,EAAE,CAAC,CAQxG;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,OAAO,EAAE,EACnB,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAClD,OAAO,EAAE,CAIX;AAED,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,OAAO,EAAE,EACnB,SAAS,EAAE,MAAM,GAChB,UAAU,CASZ"}
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pattern Matching Engine
|
|
3
|
+
*
|
|
4
|
+
* Core engine for matching security patterns against content.
|
|
5
|
+
* Includes:
|
|
6
|
+
* - Context-aware filtering (file type → pattern context matching)
|
|
7
|
+
* - Test file detection and severity downgrade
|
|
8
|
+
* - Auto-classification of findings (why the finding exists)
|
|
9
|
+
* - Taint proximity analysis (is user input near dangerous sinks?)
|
|
10
|
+
* - Context flow tracing (does serialized context reach external tools?)
|
|
11
|
+
*/
|
|
12
|
+
// ═══════════════════════════════════════════════════════════
|
|
13
|
+
// Context-Aware Filtering
|
|
14
|
+
// ═══════════════════════════════════════════════════════════
|
|
15
|
+
const RUNTIME_ONLY_CONTEXTS = [
|
|
16
|
+
'file_write_operation',
|
|
17
|
+
'file_create',
|
|
18
|
+
'outbound_request',
|
|
19
|
+
'email_operation',
|
|
20
|
+
'url_parameter',
|
|
21
|
+
'user_input',
|
|
22
|
+
];
|
|
23
|
+
const EXT_CONTEXT_MAP = {
|
|
24
|
+
'.json': 'config', '.yaml': 'config', '.yml': 'config', '.toml': 'config',
|
|
25
|
+
'.ini': 'config', '.cfg': 'config', '.conf': 'config', '.xml': 'config',
|
|
26
|
+
'.ts': 'code', '.tsx': 'code', '.js': 'code', '.jsx': 'code',
|
|
27
|
+
'.py': 'code', '.go': 'code', '.rs': 'code', '.java': 'code',
|
|
28
|
+
'.c': 'code', '.cpp': 'code', '.rb': 'code',
|
|
29
|
+
'.sh': 'code', '.bash': 'code', '.zsh': 'code', '.ps1': 'code',
|
|
30
|
+
'.md': 'prompt', '.txt': 'prompt', '.rst': 'prompt',
|
|
31
|
+
};
|
|
32
|
+
const DEPENDENCY_FILE_PATTERNS = [
|
|
33
|
+
/package\.json$/i, /requirements\.txt$/i, /Pipfile$/i,
|
|
34
|
+
/Cargo\.toml$/i, /go\.mod$/i, /go\.sum$/i, /Gemfile$/i,
|
|
35
|
+
/pom\.xml$/i, /build\.gradle$/i, /\.csproj$/i,
|
|
36
|
+
];
|
|
37
|
+
export function inferFileContext(filePath) {
|
|
38
|
+
const lower = filePath.toLowerCase().replace(/\\/g, '/');
|
|
39
|
+
if (/\.env(?:\.\w+)?$/.test(lower))
|
|
40
|
+
return 'config';
|
|
41
|
+
for (const depPattern of DEPENDENCY_FILE_PATTERNS) {
|
|
42
|
+
if (depPattern.test(lower))
|
|
43
|
+
return 'dependency_version';
|
|
44
|
+
}
|
|
45
|
+
const ext = lower.match(/\.[^./\\]+$/)?.[0] || '';
|
|
46
|
+
return EXT_CONTEXT_MAP[ext] || 'any';
|
|
47
|
+
}
|
|
48
|
+
export function shouldApplyPattern(pattern, filePath) {
|
|
49
|
+
const patternContext = pattern.context;
|
|
50
|
+
if (!patternContext || patternContext === 'any')
|
|
51
|
+
return true;
|
|
52
|
+
if (RUNTIME_ONLY_CONTEXTS.includes(patternContext))
|
|
53
|
+
return false;
|
|
54
|
+
const fileContext = inferFileContext(filePath);
|
|
55
|
+
if (fileContext === 'any')
|
|
56
|
+
return true;
|
|
57
|
+
if (patternContext === 'dependency_version')
|
|
58
|
+
return fileContext === 'dependency_version';
|
|
59
|
+
if (patternContext === 'generated_code' || patternContext === 'command_template')
|
|
60
|
+
return fileContext === 'code';
|
|
61
|
+
if (patternContext === 'config')
|
|
62
|
+
return fileContext === 'config' || fileContext === 'dependency_version';
|
|
63
|
+
if (patternContext === 'code')
|
|
64
|
+
return fileContext === 'code';
|
|
65
|
+
if (patternContext === 'prompt')
|
|
66
|
+
return fileContext === 'prompt';
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
// ═══════════════════════════════════════════════════════════
|
|
70
|
+
// Test File Detection
|
|
71
|
+
// ═══════════════════════════════════════════════════════════
|
|
72
|
+
const TEST_PATH_PATTERNS = [
|
|
73
|
+
/[/\\]tests?[/\\]/i,
|
|
74
|
+
/[/\\]__tests__[/\\]/i,
|
|
75
|
+
/[/\\]test_/i,
|
|
76
|
+
/[/\\]spec[/\\]/i,
|
|
77
|
+
/[/\\]fixtures?[/\\]/i,
|
|
78
|
+
/[/\\]mocks?[/\\]/i,
|
|
79
|
+
/[/\\]stubs?[/\\]/i,
|
|
80
|
+
/[/\\]examples?[/\\]/i,
|
|
81
|
+
/[/\\]e2e[/\\]/i,
|
|
82
|
+
/\.test\.\w+$/i,
|
|
83
|
+
/\.spec\.\w+$/i,
|
|
84
|
+
/_test\.\w+$/i,
|
|
85
|
+
/test_\w+\.\w+$/i,
|
|
86
|
+
/\.fixture\.\w+$/i,
|
|
87
|
+
/\.mock\.\w+$/i,
|
|
88
|
+
];
|
|
89
|
+
export function isTestFile(filePath) {
|
|
90
|
+
const normalized = filePath.replace(/\\/g, '/');
|
|
91
|
+
return TEST_PATH_PATTERNS.some(p => p.test(normalized));
|
|
92
|
+
}
|
|
93
|
+
const SEVERITY_DOWNGRADE = {
|
|
94
|
+
critical: 'high',
|
|
95
|
+
high: 'medium',
|
|
96
|
+
medium: 'low',
|
|
97
|
+
low: 'low',
|
|
98
|
+
};
|
|
99
|
+
// ═══════════════════════════════════════════════════════════
|
|
100
|
+
// Auto-Classification
|
|
101
|
+
// ═══════════════════════════════════════════════════════════
|
|
102
|
+
const INJECTION_CATEGORIES = new Set([
|
|
103
|
+
'instruction_override', 'role_manipulation', 'boundary_escape',
|
|
104
|
+
'hierarchy_violation', 'goal_hijacking', 'rag_poisoning',
|
|
105
|
+
'hidden_injection', 'stealth_instruction', 'session_smuggling',
|
|
106
|
+
'behavior_manipulation', 'adversarial_suffix', 'prompt_extraction',
|
|
107
|
+
]);
|
|
108
|
+
const CREDENTIAL_CATEGORIES = new Set([
|
|
109
|
+
'credential_exposure', 'credential_theft',
|
|
110
|
+
]);
|
|
111
|
+
const CONFIG_CATEGORIES = new Set([
|
|
112
|
+
'config_vulnerability', 'permission_escalation',
|
|
113
|
+
]);
|
|
114
|
+
const ARCHITECTURAL_CATEGORIES = new Set([
|
|
115
|
+
'cross_agent_escalation', 'mcp_attack', 'persistence',
|
|
116
|
+
'ASI01_goal_hijack', 'ASI02_tool_misuse', 'ASI03_privilege_abuse',
|
|
117
|
+
'ASI04_supply_chain', 'ASI06_memory_poisoning', 'ASI07_insecure_comms',
|
|
118
|
+
'ASI08_cascading_failures', 'ASI09_trust_exploitation', 'ASI10_rogue_agents',
|
|
119
|
+
]);
|
|
120
|
+
const SUPPLY_CHAIN_PATTERNS = new Set([
|
|
121
|
+
'mcp_version_unpinned', 'mcp_dependency_wildcard', 'mcp_unsigned_plugin',
|
|
122
|
+
'mcp_install_untrusted_registry', 'mcp_no_tool_integrity_check',
|
|
123
|
+
]);
|
|
124
|
+
export function classifyFinding(finding) {
|
|
125
|
+
const { pattern, isTestFile: inTestFile } = finding;
|
|
126
|
+
// Test payloads: injection patterns found in test files of security tools
|
|
127
|
+
if (inTestFile && INJECTION_CATEGORIES.has(pattern.category)) {
|
|
128
|
+
return 'test_payload';
|
|
129
|
+
}
|
|
130
|
+
// Supply chain risks
|
|
131
|
+
if (SUPPLY_CHAIN_PATTERNS.has(pattern.name) || pattern.category === 'ASI04_supply_chain') {
|
|
132
|
+
return 'supply_chain_risk';
|
|
133
|
+
}
|
|
134
|
+
// Credential exposure
|
|
135
|
+
if (CREDENTIAL_CATEGORIES.has(pattern.category)) {
|
|
136
|
+
return inTestFile ? 'credential_exposure' : 'credential_exposure';
|
|
137
|
+
}
|
|
138
|
+
// Configuration risks
|
|
139
|
+
if (CONFIG_CATEGORIES.has(pattern.category)) {
|
|
140
|
+
return 'configuration_risk';
|
|
141
|
+
}
|
|
142
|
+
// Architectural weaknesses
|
|
143
|
+
if (ARCHITECTURAL_CATEGORIES.has(pattern.category)) {
|
|
144
|
+
return 'architectural_weakness';
|
|
145
|
+
}
|
|
146
|
+
// Code execution patterns
|
|
147
|
+
if (pattern.category === 'code_injection' || pattern.category === 'argument_injection' ||
|
|
148
|
+
pattern.category === 'ssrf' || pattern.category === 'ASI05_rce' ||
|
|
149
|
+
pattern.category === 'dangerous_commands') {
|
|
150
|
+
return 'live_vulnerability';
|
|
151
|
+
}
|
|
152
|
+
// Data exfiltration / defense evasion
|
|
153
|
+
if (pattern.category === 'data_exfiltration' || pattern.category === 'defense_evasion' ||
|
|
154
|
+
pattern.category === 'rendering_exfil') {
|
|
155
|
+
return inTestFile ? 'test_payload' : 'live_vulnerability';
|
|
156
|
+
}
|
|
157
|
+
// Injection patterns in non-test files
|
|
158
|
+
if (INJECTION_CATEGORIES.has(pattern.category)) {
|
|
159
|
+
return 'live_vulnerability';
|
|
160
|
+
}
|
|
161
|
+
return 'unclassified';
|
|
162
|
+
}
|
|
163
|
+
// ═══════════════════════════════════════════════════════════
|
|
164
|
+
// Taint Proximity Analysis
|
|
165
|
+
// ═══════════════════════════════════════════════════════════
|
|
166
|
+
const TAINT_SINK_PATTERNS = new Set([
|
|
167
|
+
'eval_exec_usage', 'dangerous_module_import', 'pickle_loads',
|
|
168
|
+
'shell_true', 'langchain_import_bypass', 'langchain_palchain',
|
|
169
|
+
'asi05_code_execution',
|
|
170
|
+
]);
|
|
171
|
+
const TAINT_SOURCE_REGEX = /(?:input\s*\(|request\.|req\.body|req\.query|req\.params|argv|sys\.stdin|process\.stdin|\.invoke\(|\.generate\(|\.complete\(|\.chat\(|user_input|user_message|prompt_text|raw_input|from_user)/i;
|
|
172
|
+
export function analyzeTaintProximity(lines, sinkLineIndex, windowSize = 10) {
|
|
173
|
+
// Check the sink line itself
|
|
174
|
+
if (TAINT_SOURCE_REGEX.test(lines[sinkLineIndex])) {
|
|
175
|
+
return 'direct';
|
|
176
|
+
}
|
|
177
|
+
// Check surrounding lines within window
|
|
178
|
+
const start = Math.max(0, sinkLineIndex - windowSize);
|
|
179
|
+
const end = Math.min(lines.length, sinkLineIndex + windowSize + 1);
|
|
180
|
+
for (let i = start; i < end; i++) {
|
|
181
|
+
if (i === sinkLineIndex)
|
|
182
|
+
continue;
|
|
183
|
+
if (TAINT_SOURCE_REGEX.test(lines[i])) {
|
|
184
|
+
return 'nearby';
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return 'distant';
|
|
188
|
+
}
|
|
189
|
+
// ═══════════════════════════════════════════════════════════
|
|
190
|
+
// Context Flow Tracing
|
|
191
|
+
// ═══════════════════════════════════════════════════════════
|
|
192
|
+
const CONTEXT_SERIALIZE_REGEX = /(?:JSON\.stringify|\.dump|serialize|\.toString)\s*\(.*(?:context|conversation|history|messages|chat_log|memory)/i;
|
|
193
|
+
const EXTERNAL_CALL_REGEX = /(?:fetch|axios|request|http\.|urllib|requests\.|tool_call|function_call|mcp|\.post\(|\.get\(|\.send\()/i;
|
|
194
|
+
export function traceContextFlow(lines, serializeLineIndex, windowSize = 15) {
|
|
195
|
+
const chain = [];
|
|
196
|
+
// Record the serialization point
|
|
197
|
+
chain.push(`serialize@L${serializeLineIndex + 1}: ${lines[serializeLineIndex].trim().substring(0, 80)}`);
|
|
198
|
+
// Look forward for external calls
|
|
199
|
+
const end = Math.min(lines.length, serializeLineIndex + windowSize + 1);
|
|
200
|
+
for (let i = serializeLineIndex + 1; i < end; i++) {
|
|
201
|
+
if (EXTERNAL_CALL_REGEX.test(lines[i])) {
|
|
202
|
+
chain.push(`external_call@L${i + 1}: ${lines[i].trim().substring(0, 80)}`);
|
|
203
|
+
return chain;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// Look backward — maybe the serialized var was passed to a call above
|
|
207
|
+
const start = Math.max(0, serializeLineIndex - windowSize);
|
|
208
|
+
for (let i = serializeLineIndex - 1; i >= start; i--) {
|
|
209
|
+
if (EXTERNAL_CALL_REGEX.test(lines[i])) {
|
|
210
|
+
chain.push(`external_call@L${i + 1}: ${lines[i].trim().substring(0, 80)}`);
|
|
211
|
+
return chain;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return undefined;
|
|
215
|
+
}
|
|
216
|
+
// ═══════════════════════════════════════════════════════════
|
|
217
|
+
// Core Matching Engine
|
|
218
|
+
// ═══════════════════════════════════════════════════════════
|
|
219
|
+
function getContext(lines, lineIndex, contextSize = 2) {
|
|
220
|
+
const start = Math.max(0, lineIndex - contextSize);
|
|
221
|
+
const end = Math.min(lines.length, lineIndex + contextSize + 1);
|
|
222
|
+
return lines.slice(start, end).join('\n');
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Match a single pattern against content with full intelligence pipeline
|
|
226
|
+
*/
|
|
227
|
+
export function matchPattern(pattern, content, file) {
|
|
228
|
+
if (!shouldApplyPattern(pattern, file))
|
|
229
|
+
return [];
|
|
230
|
+
const findings = [];
|
|
231
|
+
const lines = content.split('\n');
|
|
232
|
+
const testFile = isTestFile(file);
|
|
233
|
+
for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {
|
|
234
|
+
const line = lines[lineIndex];
|
|
235
|
+
const matches = line.matchAll(new RegExp(pattern.pattern, 'gi'));
|
|
236
|
+
for (const match of matches) {
|
|
237
|
+
const originalSeverity = pattern.severity;
|
|
238
|
+
const shouldDowngrade = testFile && (CREDENTIAL_CATEGORIES.has(pattern.category) ||
|
|
239
|
+
INJECTION_CATEGORIES.has(pattern.category));
|
|
240
|
+
const finding = {
|
|
241
|
+
pattern: shouldDowngrade
|
|
242
|
+
? { ...pattern, severity: SEVERITY_DOWNGRADE[originalSeverity] }
|
|
243
|
+
: pattern,
|
|
244
|
+
file,
|
|
245
|
+
line: lineIndex + 1,
|
|
246
|
+
column: (match.index || 0) + 1,
|
|
247
|
+
match: match[0],
|
|
248
|
+
context: getContext(lines, lineIndex),
|
|
249
|
+
timestamp: new Date(),
|
|
250
|
+
classification: 'unclassified',
|
|
251
|
+
originalSeverity,
|
|
252
|
+
severityDowngraded: shouldDowngrade,
|
|
253
|
+
isTestFile: testFile,
|
|
254
|
+
};
|
|
255
|
+
// Taint proximity for dangerous sink patterns
|
|
256
|
+
if (TAINT_SINK_PATTERNS.has(pattern.name)) {
|
|
257
|
+
finding.taintProximity = analyzeTaintProximity(lines, lineIndex);
|
|
258
|
+
// Escalate severity if tainted input is nearby
|
|
259
|
+
if (finding.taintProximity === 'direct') {
|
|
260
|
+
finding.pattern = { ...finding.pattern, severity: 'critical' };
|
|
261
|
+
}
|
|
262
|
+
else if (finding.taintProximity === 'nearby') {
|
|
263
|
+
finding.pattern = { ...finding.pattern, severity: 'critical' };
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// Context flow tracing for context serialization patterns
|
|
267
|
+
if (pattern.name === 'mcp_context_dump_to_tool') {
|
|
268
|
+
finding.contextFlowChain = traceContextFlow(lines, lineIndex);
|
|
269
|
+
}
|
|
270
|
+
// Auto-classify
|
|
271
|
+
finding.classification = classifyFinding(finding);
|
|
272
|
+
findings.push(finding);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return findings;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Match multiple patterns against content
|
|
279
|
+
*/
|
|
280
|
+
export function matchPatterns(patterns, content, file) {
|
|
281
|
+
const findings = [];
|
|
282
|
+
for (const pattern of patterns) {
|
|
283
|
+
findings.push(...matchPattern(pattern, content, file));
|
|
284
|
+
}
|
|
285
|
+
return findings;
|
|
286
|
+
}
|
|
287
|
+
// ═══════════════════════════════════════════════════════════
|
|
288
|
+
// Risk Scoring (uses downgraded severity, not original)
|
|
289
|
+
// ═══════════════════════════════════════════════════════════
|
|
290
|
+
export function calculateRiskScore(findings) {
|
|
291
|
+
const weights = { critical: 25, high: 10, medium: 3, low: 1 };
|
|
292
|
+
const counts = { critical: 0, high: 0, medium: 0, low: 0 };
|
|
293
|
+
let deductions = 0;
|
|
294
|
+
for (const finding of findings) {
|
|
295
|
+
const sev = finding.pattern.severity;
|
|
296
|
+
counts[sev]++;
|
|
297
|
+
deductions += weights[sev];
|
|
298
|
+
}
|
|
299
|
+
const total = Math.max(0, 100 - deductions);
|
|
300
|
+
let level;
|
|
301
|
+
if (total >= 80)
|
|
302
|
+
level = 'low';
|
|
303
|
+
else if (total >= 60)
|
|
304
|
+
level = 'moderate';
|
|
305
|
+
else if (total >= 40)
|
|
306
|
+
level = 'high';
|
|
307
|
+
else
|
|
308
|
+
level = 'critical';
|
|
309
|
+
const owaspFindings = findings.filter((f) => f.pattern.owaspAsi);
|
|
310
|
+
const owaspCompliance = owaspFindings.length === 0 ? 100 : Math.max(0, 100 - owaspFindings.length * 10);
|
|
311
|
+
return { total, level, counts, owaspCompliance };
|
|
312
|
+
}
|
|
313
|
+
export function deduplicateFindings(findings) {
|
|
314
|
+
const seen = new Set();
|
|
315
|
+
return findings.filter((f) => {
|
|
316
|
+
const key = `${f.pattern.name}:${f.file}:${f.line}:${f.column}`;
|
|
317
|
+
if (seen.has(key))
|
|
318
|
+
return false;
|
|
319
|
+
seen.add(key);
|
|
320
|
+
return true;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
export function sortFindingsBySeverity(findings) {
|
|
324
|
+
const severityOrder = { critical: 0, high: 1, medium: 2, low: 3 };
|
|
325
|
+
return [...findings].sort((a, b) => severityOrder[a.pattern.severity] - severityOrder[b.pattern.severity]);
|
|
326
|
+
}
|
|
327
|
+
export function groupFindingsByFile(findings) {
|
|
328
|
+
const groups = new Map();
|
|
329
|
+
for (const finding of findings) {
|
|
330
|
+
const existing = groups.get(finding.file) || [];
|
|
331
|
+
existing.push(finding);
|
|
332
|
+
groups.set(finding.file, existing);
|
|
333
|
+
}
|
|
334
|
+
return groups;
|
|
335
|
+
}
|
|
336
|
+
export function groupFindingsByCategory(findings) {
|
|
337
|
+
const groups = new Map();
|
|
338
|
+
for (const finding of findings) {
|
|
339
|
+
const category = finding.pattern.category;
|
|
340
|
+
const existing = groups.get(category) || [];
|
|
341
|
+
existing.push(finding);
|
|
342
|
+
groups.set(category, existing);
|
|
343
|
+
}
|
|
344
|
+
return groups;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Group findings by classification
|
|
348
|
+
*/
|
|
349
|
+
export function groupFindingsByClassification(findings) {
|
|
350
|
+
const groups = new Map();
|
|
351
|
+
for (const finding of findings) {
|
|
352
|
+
const existing = groups.get(finding.classification) || [];
|
|
353
|
+
existing.push(finding);
|
|
354
|
+
groups.set(finding.classification, existing);
|
|
355
|
+
}
|
|
356
|
+
return groups;
|
|
357
|
+
}
|
|
358
|
+
export function filterFindingsBySeverity(findings, minSeverity) {
|
|
359
|
+
const severityOrder = { low: 0, medium: 1, high: 2, critical: 3 };
|
|
360
|
+
const minLevel = severityOrder[minSeverity];
|
|
361
|
+
return findings.filter((f) => severityOrder[f.pattern.severity] >= minLevel);
|
|
362
|
+
}
|
|
363
|
+
export function createScanResult(filesScanned, patternsChecked, findings, startTime) {
|
|
364
|
+
return {
|
|
365
|
+
filesScanned,
|
|
366
|
+
patternsChecked,
|
|
367
|
+
findings: sortFindingsBySeverity(deduplicateFindings(findings)),
|
|
368
|
+
riskScore: calculateRiskScore(findings),
|
|
369
|
+
duration: Date.now() - startTime,
|
|
370
|
+
timestamp: new Date(),
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
//# sourceMappingURL=engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/scanner/engine.ts"],"names":[],"mappings":"AAAA;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AAO;QACL,YAAY;QACZ,eAAe;QACf,QAAQ,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QAC/D,SAAS,EAAE,kBAAkB,CAAC,QAAQ,CAAC;QACvC,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;QAChC,SAAS,EAAE,IAAI,IAAI,EAAE;KACtB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scanner/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scanner/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@empowered-humanity/agent-security",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Security scanner for AI agent architectures - 176 detection patterns for prompt injection, credential exposure, MCP security, and OWASP ASI vulnerabilities",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./patterns": {
|
|
14
|
+
"types": "./dist/patterns/index.d.ts",
|
|
15
|
+
"default": "./dist/patterns/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./scanner": {
|
|
18
|
+
"types": "./dist/scanner/index.d.ts",
|
|
19
|
+
"default": "./dist/scanner/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./reporters": {
|
|
22
|
+
"types": "./dist/reporters/index.d.ts",
|
|
23
|
+
"default": "./dist/reporters/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"te-agent-security": "dist/index.js",
|
|
28
|
+
"te-as": "dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"README.md",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"SECURITY.md",
|
|
35
|
+
"sbom.json"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"dev": "tsc --watch",
|
|
40
|
+
"start": "node dist/index.js",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"test:watch": "vitest",
|
|
43
|
+
"typecheck": "tsc --noEmit",
|
|
44
|
+
"lint": "eslint src/",
|
|
45
|
+
"clean": "rimraf dist",
|
|
46
|
+
"prepublishOnly": "npm run clean && npm run build && npm test"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"security",
|
|
50
|
+
"ai-agent",
|
|
51
|
+
"prompt-injection",
|
|
52
|
+
"scanner",
|
|
53
|
+
"llm",
|
|
54
|
+
"owasp",
|
|
55
|
+
"asi",
|
|
56
|
+
"agent-security",
|
|
57
|
+
"code-injection",
|
|
58
|
+
"credential-detection",
|
|
59
|
+
"sast",
|
|
60
|
+
"vulnerability-scanner"
|
|
61
|
+
],
|
|
62
|
+
"author": "Empowered Humanity <security@empoweredhumanity.ai>",
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "https://github.com/Traviseric/agent-security.git"
|
|
67
|
+
},
|
|
68
|
+
"bugs": {
|
|
69
|
+
"url": "https://github.com/Traviseric/agent-security/issues"
|
|
70
|
+
},
|
|
71
|
+
"homepage": "https://github.com/Traviseric/agent-security#readme",
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"chalk": "^5.3.0",
|
|
74
|
+
"commander": "^12.0.0",
|
|
75
|
+
"glob": "^10.3.0",
|
|
76
|
+
"ora": "^8.0.0",
|
|
77
|
+
"yaml": "^2.3.0"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@types/node": "^20.10.0",
|
|
81
|
+
"rimraf": "^5.0.0",
|
|
82
|
+
"typescript": "^5.3.0",
|
|
83
|
+
"vitest": "^1.0.0"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=18.0.0"
|
|
87
|
+
}
|
|
88
|
+
}
|
package/sbom.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
|
|
3
|
+
"bomFormat": "CycloneDX",
|
|
4
|
+
"specVersion": "1.6",
|
|
5
|
+
"version": 1,
|
|
6
|
+
"serialNumber": "urn:uuid:3acedb58-5bfd-4dd9-8fd8-f8c1e634fc57",
|
|
7
|
+
"metadata": {
|
|
8
|
+
"timestamp": "2026-02-11T22:01:04.519Z",
|
|
9
|
+
"tools": {
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"type": "application",
|
|
13
|
+
"name": "npm",
|
|
14
|
+
"version": "11.6.2"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "application",
|
|
18
|
+
"name": "cyclonedx-npm",
|
|
19
|
+
"group": "@cyclonedx",
|
|
20
|
+
"version": "4.1.2",
|
|
21
|
+
"author": "Jan Kowalleck",
|
|
22
|
+
"description": "Create CycloneDX Software Bill of Materials (SBOM) from NPM projects.",
|
|
23
|
+
"licenses": [
|
|
24
|
+
{
|
|
25
|
+
"license": {
|
|
26
|
+
"id": "Apache-2.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"externalReferences": [
|
|
31
|
+
{
|
|
32
|
+
"url": "git+https://github.com/CycloneDX/cyclonedx-node-npm.git",
|
|
33
|
+
"type": "vcs",
|
|
34
|
+
"comment": "as detected from PackageJson property \"repository.url\""
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"url": "https://github.com/CycloneDX/cyclonedx-node-npm#readme",
|
|
38
|
+
"type": "website",
|
|
39
|
+
"comment": "as detected from PackageJson property \"homepage\""
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"url": "https://github.com/CycloneDX/cyclonedx-node-npm/issues",
|
|
43
|
+
"type": "issue-tracker",
|
|
44
|
+
"comment": "as detected from PackageJson property \"bugs.url\""
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "library",
|
|
50
|
+
"name": "cyclonedx-library",
|
|
51
|
+
"group": "@cyclonedx",
|
|
52
|
+
"version": "9.4.1",
|
|
53
|
+
"author": "Jan Kowalleck",
|
|
54
|
+
"description": "Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).",
|
|
55
|
+
"licenses": [
|
|
56
|
+
{
|
|
57
|
+
"license": {
|
|
58
|
+
"id": "Apache-2.0"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"externalReferences": [
|
|
63
|
+
{
|
|
64
|
+
"url": "git+https://github.com/CycloneDX/cyclonedx-javascript-library.git",
|
|
65
|
+
"type": "vcs",
|
|
66
|
+
"comment": "as detected from PackageJson property \"repository.url\""
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"url": "https://github.com/CycloneDX/cyclonedx-javascript-library#readme",
|
|
70
|
+
"type": "website",
|
|
71
|
+
"comment": "as detected from PackageJson property \"homepage\""
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"url": "https://github.com/CycloneDX/cyclonedx-javascript-library/issues",
|
|
75
|
+
"type": "issue-tracker",
|
|
76
|
+
"comment": "as detected from PackageJson property \"bugs.url\""
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"component": {
|
|
83
|
+
"type": "application",
|
|
84
|
+
"name": "te-security",
|
|
85
|
+
"version": "0.1.0",
|
|
86
|
+
"bom-ref": "te-security@0.1.0",
|
|
87
|
+
"description": "Security tools monorepo for TE Code ecosystem",
|
|
88
|
+
"purl": "pkg:npm/te-security@0.1.0",
|
|
89
|
+
"properties": [
|
|
90
|
+
{
|
|
91
|
+
"name": "cdx:npm:package:private",
|
|
92
|
+
"value": "true"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "cdx:npm:package:path",
|
|
96
|
+
"value": ""
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"components": [],
|
|
102
|
+
"dependencies": [
|
|
103
|
+
{
|
|
104
|
+
"ref": "te-security@0.1.0"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|