n8n-nodes-trusera 0.2.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 +76 -0
- package/dist/credentials/TruseraApi.credentials.d.ts +9 -0
- package/dist/credentials/TruseraApi.credentials.d.ts.map +1 -0
- package/dist/credentials/TruseraApi.credentials.js +39 -0
- package/dist/credentials/TruseraApi.credentials.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config.d.ts +30 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +254 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/dashboardHtml.d.ts +13 -0
- package/dist/lib/dashboardHtml.d.ts.map +1 -0
- package/dist/lib/dashboardHtml.js +605 -0
- package/dist/lib/dashboardHtml.js.map +1 -0
- package/dist/lib/models.d.ts +93 -0
- package/dist/lib/models.d.ts.map +1 -0
- package/dist/lib/models.js +101 -0
- package/dist/lib/models.js.map +1 -0
- package/dist/lib/policyEngine.d.ts +22 -0
- package/dist/lib/policyEngine.d.ts.map +1 -0
- package/dist/lib/policyEngine.js +52 -0
- package/dist/lib/policyEngine.js.map +1 -0
- package/dist/lib/riskScorer.d.ts +13 -0
- package/dist/lib/riskScorer.d.ts.map +1 -0
- package/dist/lib/riskScorer.js +72 -0
- package/dist/lib/riskScorer.js.map +1 -0
- package/dist/lib/scanner.d.ts +33 -0
- package/dist/lib/scanner.d.ts.map +1 -0
- package/dist/lib/scanner.js +590 -0
- package/dist/lib/scanner.js.map +1 -0
- package/dist/nodes/TruseraDashboard/TruseraDashboard.node.d.ts +6 -0
- package/dist/nodes/TruseraDashboard/TruseraDashboard.node.d.ts.map +1 -0
- package/dist/nodes/TruseraDashboard/TruseraDashboard.node.js +66 -0
- package/dist/nodes/TruseraDashboard/TruseraDashboard.node.js.map +1 -0
- package/dist/nodes/TruseraDashboard/trusera.png +0 -0
- package/dist/nodes/TruseraDashboard/trusera.svg +4 -0
- package/dist/nodes/TruseraPolicy/TruseraPolicy.node.d.ts +6 -0
- package/dist/nodes/TruseraPolicy/TruseraPolicy.node.d.ts.map +1 -0
- package/dist/nodes/TruseraPolicy/TruseraPolicy.node.js +114 -0
- package/dist/nodes/TruseraPolicy/TruseraPolicy.node.js.map +1 -0
- package/dist/nodes/TruseraPolicy/trusera.svg +4 -0
- package/dist/nodes/TruseraReport/TruseraReport.node.d.ts +6 -0
- package/dist/nodes/TruseraReport/TruseraReport.node.d.ts.map +1 -0
- package/dist/nodes/TruseraReport/TruseraReport.node.js +201 -0
- package/dist/nodes/TruseraReport/TruseraReport.node.js.map +1 -0
- package/dist/nodes/TruseraReport/trusera.svg +4 -0
- package/dist/nodes/TruseraScan/TruseraScan.node.d.ts +6 -0
- package/dist/nodes/TruseraScan/TruseraScan.node.d.ts.map +1 -0
- package/dist/nodes/TruseraScan/TruseraScan.node.js +140 -0
- package/dist/nodes/TruseraScan/TruseraScan.node.js.map +1 -0
- package/dist/nodes/TruseraScan/trusera.svg +4 -0
- package/package.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# n8n-nodes-trusera
|
|
2
|
+
|
|
3
|
+
n8n community node to scan workflows for AI security risks using Trusera AI-BOM.
|
|
4
|
+
|
|
5
|
+
[n8n](https://n8n.io/) is a fair-code licensed workflow automation platform.
|
|
6
|
+
|
|
7
|
+
[Trusera](https://trusera.dev) provides AI Bill of Materials (AI-BOM) scanning for detecting security risks in AI-powered workflows.
|
|
8
|
+
|
|
9
|
+
## Nodes
|
|
10
|
+
|
|
11
|
+
### Trusera Scan
|
|
12
|
+
|
|
13
|
+
Scans n8n workflow JSON for AI components and security risks. Detects:
|
|
14
|
+
|
|
15
|
+
- LLM providers (OpenAI, Anthropic, Google, Ollama, etc.)
|
|
16
|
+
- Agent frameworks and multi-agent chains
|
|
17
|
+
- MCP client/server connections
|
|
18
|
+
- Tool usage (code execution, HTTP requests)
|
|
19
|
+
- Embedding and vector store configurations
|
|
20
|
+
- Hardcoded API keys and credentials
|
|
21
|
+
- Dangerous code patterns
|
|
22
|
+
|
|
23
|
+
### Trusera Policy
|
|
24
|
+
|
|
25
|
+
Evaluates scan results against configurable security policies:
|
|
26
|
+
|
|
27
|
+
- Maximum critical/high severity component limits
|
|
28
|
+
- Maximum risk score thresholds
|
|
29
|
+
- Provider blocklists
|
|
30
|
+
- Flag blocklists
|
|
31
|
+
|
|
32
|
+
### Trusera Report
|
|
33
|
+
|
|
34
|
+
Generates human-readable security reports from scan results:
|
|
35
|
+
|
|
36
|
+
- Markdown format with severity breakdown
|
|
37
|
+
- JSON summary format
|
|
38
|
+
- Configurable severity threshold
|
|
39
|
+
|
|
40
|
+
## Credentials
|
|
41
|
+
|
|
42
|
+
### Trusera API
|
|
43
|
+
|
|
44
|
+
Configure with your Trusera API key (`tsk_` prefix) and base URL for self-hosted instances.
|
|
45
|
+
|
|
46
|
+
## Risk Flags
|
|
47
|
+
|
|
48
|
+
| Flag | Weight | Description |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| hardcoded_api_key | 30 | Hardcoded API key detected |
|
|
51
|
+
| hardcoded_credentials | 30 | Hardcoded credentials in workflow |
|
|
52
|
+
| code_http_tools | 30 | Agent with code execution and HTTP tools |
|
|
53
|
+
| shadow_ai | 25 | AI dependency not declared in project files |
|
|
54
|
+
| webhook_no_auth | 25 | n8n webhook without authentication |
|
|
55
|
+
| internet_facing | 20 | AI endpoint exposed to internet |
|
|
56
|
+
| multi_agent_no_trust | 20 | Multi-agent system without trust boundaries |
|
|
57
|
+
| agent_chain_no_validation | 20 | Agent-to-agent chain without validation |
|
|
58
|
+
| mcp_unknown_server | 20 | MCP client connected to unknown server |
|
|
59
|
+
| no_auth | 15 | AI endpoint without authentication |
|
|
60
|
+
| no_rate_limit | 10 | No rate limiting on AI endpoint |
|
|
61
|
+
| deprecated_model | 10 | Using deprecated AI model |
|
|
62
|
+
| no_error_handling | 10 | No error handling for AI calls |
|
|
63
|
+
| unpinned_model | 5 | Model version not pinned |
|
|
64
|
+
|
|
65
|
+
## Severity Thresholds
|
|
66
|
+
|
|
67
|
+
| Severity | Score Range |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| Critical | 76 - 100 |
|
|
70
|
+
| High | 51 - 75 |
|
|
71
|
+
| Medium | 26 - 50 |
|
|
72
|
+
| Low | 0 - 25 |
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
Apache-2.0
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class TruseraApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=TruseraApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TruseraApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/TruseraApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,UAAW,YAAW,eAAe;IAChD,IAAI,SAAgB;IACpB,WAAW,SAAa;IACxB,gBAAgB,SAA8B;IAE9C,UAAU,EAAE,eAAe,EAAE,CAkB3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;CACH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TruseraApi = void 0;
|
|
4
|
+
class TruseraApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'truseraApi';
|
|
7
|
+
this.displayName = 'n8n API';
|
|
8
|
+
this.documentationUrl = 'https://docs.n8n.io/api/';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API Key',
|
|
12
|
+
name: 'apiKey',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'n8n API key from Settings > n8n API',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'n8n Base URL',
|
|
21
|
+
name: 'baseUrl',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: 'http://localhost:5678',
|
|
24
|
+
required: false,
|
|
25
|
+
description: 'URL of your n8n instance',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
this.authenticate = {
|
|
29
|
+
type: 'generic',
|
|
30
|
+
properties: {
|
|
31
|
+
headers: {
|
|
32
|
+
'X-N8N-API-KEY': '={{$credentials.apiKey}}',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.TruseraApi = TruseraApi;
|
|
39
|
+
//# sourceMappingURL=TruseraApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TruseraApi.credentials.js","sourceRoot":"","sources":["../../credentials/TruseraApi.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,UAAU;IAAvB;QACE,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,SAAS,CAAC;QACxB,qBAAgB,GAAG,0BAA0B,CAAC;QAE9C,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,qCAAqC;aACnD;YACD;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAuB;gBAChC,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,0BAA0B;aACxC;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,eAAe,EAAE,0BAA0B;iBAC5C;aACF;SACF,CAAC;IACJ,CAAC;CAAA;AAjCD,gCAiCC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lib/config"), exports);
|
|
18
|
+
__exportStar(require("./lib/models"), exports);
|
|
19
|
+
__exportStar(require("./lib/riskScorer"), exports);
|
|
20
|
+
__exportStar(require("./lib/policyEngine"), exports);
|
|
21
|
+
__exportStar(require("./lib/scanner"), exports);
|
|
22
|
+
__exportStar(require("./lib/dashboardHtml"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,qDAAmC;AACnC,gDAA8B;AAC9B,sDAAoC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration constants for the Trusera AI-BOM n8n scanner.
|
|
3
|
+
* Ported from the Python config.py.
|
|
4
|
+
*/
|
|
5
|
+
/** Set of n8n node types that involve AI capabilities. */
|
|
6
|
+
export declare const N8N_AI_NODE_TYPES: ReadonlySet<string>;
|
|
7
|
+
export interface ApiKeyPattern {
|
|
8
|
+
pattern: RegExp;
|
|
9
|
+
provider: string;
|
|
10
|
+
}
|
|
11
|
+
/** Patterns for detecting hardcoded API keys by provider. */
|
|
12
|
+
export declare const API_KEY_PATTERNS: readonly ApiKeyPattern[];
|
|
13
|
+
/** Risk weight assigned to each flag type. */
|
|
14
|
+
export declare const RISK_WEIGHTS: Readonly<Record<string, number>>;
|
|
15
|
+
/** Set of deprecated AI model identifiers. */
|
|
16
|
+
export declare const DEPRECATED_MODELS: ReadonlySet<string>;
|
|
17
|
+
/** Remediation entry for a risk flag. */
|
|
18
|
+
export interface RemediationEntry {
|
|
19
|
+
description: string;
|
|
20
|
+
remediation: string;
|
|
21
|
+
guardrail: string;
|
|
22
|
+
owaspCategory: string;
|
|
23
|
+
owaspCategoryName: string;
|
|
24
|
+
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
25
|
+
}
|
|
26
|
+
/** Remediation guidance mapped to each risk flag. */
|
|
27
|
+
export declare const REMEDIATION_MAP: Readonly<Record<string, RemediationEntry>>;
|
|
28
|
+
/** Regex patterns for detecting dangerous code in n8n Code nodes. */
|
|
29
|
+
export declare const DANGEROUS_CODE_PATTERNS: readonly string[];
|
|
30
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CA6ChD,CAAC;AAEH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,EAAE,SAAS,aAAa,EAoBpD,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAezD,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAoBhD,CAAC;AAEH,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CAClD;AAED,qDAAqD;AACrD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAiHtE,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAqBpD,CAAC"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration constants for the Trusera AI-BOM n8n scanner.
|
|
4
|
+
* Ported from the Python config.py.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DANGEROUS_CODE_PATTERNS = exports.REMEDIATION_MAP = exports.DEPRECATED_MODELS = exports.RISK_WEIGHTS = exports.API_KEY_PATTERNS = exports.N8N_AI_NODE_TYPES = void 0;
|
|
8
|
+
/** Set of n8n node types that involve AI capabilities. */
|
|
9
|
+
exports.N8N_AI_NODE_TYPES = new Set([
|
|
10
|
+
'@n8n/n8n-nodes-langchain.agent',
|
|
11
|
+
'@n8n/n8n-nodes-langchain.lmChatOpenAi',
|
|
12
|
+
'@n8n/n8n-nodes-langchain.lmChatAnthropic',
|
|
13
|
+
'@n8n/n8n-nodes-langchain.lmChatGoogleGemini',
|
|
14
|
+
'@n8n/n8n-nodes-langchain.lmChatOllama',
|
|
15
|
+
'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',
|
|
16
|
+
'@n8n/n8n-nodes-langchain.lmChatMistralCloud',
|
|
17
|
+
'@n8n/n8n-nodes-langchain.lmChatGroq',
|
|
18
|
+
'@n8n/n8n-nodes-langchain.lmChatCohere',
|
|
19
|
+
'@n8n/n8n-nodes-langchain.lmChatHuggingFace',
|
|
20
|
+
'@n8n/n8n-nodes-langchain.mcpClientTool',
|
|
21
|
+
'@n8n/n8n-nodes-langchain.toolHttpRequest',
|
|
22
|
+
'@n8n/n8n-nodes-langchain.toolCode',
|
|
23
|
+
'@n8n/n8n-nodes-langchain.toolWorkflow',
|
|
24
|
+
'@n8n/n8n-nodes-langchain.toolCalculator',
|
|
25
|
+
'@n8n/n8n-nodes-langchain.toolWikipedia',
|
|
26
|
+
'@n8n/n8n-nodes-langchain.embeddingsOpenAi',
|
|
27
|
+
'@n8n/n8n-nodes-langchain.embeddingsAzureOpenAi',
|
|
28
|
+
'@n8n/n8n-nodes-langchain.embeddingsCohere',
|
|
29
|
+
'@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference',
|
|
30
|
+
'@n8n/n8n-nodes-langchain.embeddingsGoogleGemini',
|
|
31
|
+
'@n8n/n8n-nodes-langchain.embeddingsOllama',
|
|
32
|
+
'@n8n/n8n-nodes-langchain.vectorStoreChroma',
|
|
33
|
+
'@n8n/n8n-nodes-langchain.vectorStorePinecone',
|
|
34
|
+
'@n8n/n8n-nodes-langchain.vectorStoreQdrant',
|
|
35
|
+
'@n8n/n8n-nodes-langchain.vectorStoreSupabase',
|
|
36
|
+
'@n8n/n8n-nodes-langchain.vectorStoreInMemory',
|
|
37
|
+
'@n8n/n8n-nodes-langchain.vectorStoreWeaviate',
|
|
38
|
+
'@n8n/n8n-nodes-langchain.memoryBufferWindow',
|
|
39
|
+
'@n8n/n8n-nodes-langchain.memoryPostgresChat',
|
|
40
|
+
'@n8n/n8n-nodes-langchain.memoryChatHistory',
|
|
41
|
+
'@n8n/n8n-nodes-langchain.memoryRedisChat',
|
|
42
|
+
'@n8n/n8n-nodes-langchain.outputParserStructured',
|
|
43
|
+
'@n8n/n8n-nodes-langchain.outputParserAutofixing',
|
|
44
|
+
'@n8n/n8n-nodes-langchain.outputParserJson',
|
|
45
|
+
'@n8n/n8n-nodes-langchain.chainLlm',
|
|
46
|
+
'@n8n/n8n-nodes-langchain.chainSummarization',
|
|
47
|
+
'@n8n/n8n-nodes-langchain.chainRetrievalQa',
|
|
48
|
+
'@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter',
|
|
49
|
+
'@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter',
|
|
50
|
+
'@n8n/n8n-nodes-langchain.textSplitterMarkdownTextSplitter',
|
|
51
|
+
'@n8n/n8n-nodes-langchain.documentLoaderFile',
|
|
52
|
+
'@n8n/n8n-nodes-langchain.documentLoaderJson',
|
|
53
|
+
'@n8n/n8n-nodes-langchain.documentLoaderCsv',
|
|
54
|
+
]);
|
|
55
|
+
/** Patterns for detecting hardcoded API keys by provider. */
|
|
56
|
+
exports.API_KEY_PATTERNS = [
|
|
57
|
+
{ pattern: /sk-proj-[a-zA-Z0-9_-]{20,}/, provider: 'OpenAI' },
|
|
58
|
+
{ pattern: /sk-[a-zA-Z0-9]{20,}/, provider: 'OpenAI/DeepSeek' },
|
|
59
|
+
{ pattern: /sk-ant-[a-zA-Z0-9-]{20,}/, provider: 'Anthropic' },
|
|
60
|
+
{ pattern: /hf_[a-zA-Z0-9]{20,}/, provider: 'HuggingFace' },
|
|
61
|
+
{ pattern: /key-[a-zA-Z0-9]{20,}/, provider: 'Cohere' },
|
|
62
|
+
{ pattern: /gsk_[a-zA-Z0-9]{20,}/, provider: 'Groq' },
|
|
63
|
+
{ pattern: /r8_[a-zA-Z0-9]{20,}/, provider: 'Replicate' },
|
|
64
|
+
{ pattern: /xai-[a-zA-Z0-9]{20,}/, provider: 'xAI' },
|
|
65
|
+
{ pattern: /AIza[a-zA-Z0-9_-]{20,}/, provider: 'Google' },
|
|
66
|
+
{ pattern: /fw_[a-zA-Z0-9]{20,}/, provider: 'Fireworks' },
|
|
67
|
+
{ pattern: /pplx-[a-zA-Z0-9]{20,}/, provider: 'Perplexity' },
|
|
68
|
+
{
|
|
69
|
+
pattern: /(?:api[_-]?key|token|secret|together[_-]?(?:api|key))[\s'":=]+([a-f0-9]{64})\b/i,
|
|
70
|
+
provider: 'Together',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
pattern: /(?:api[_-]?key|token|secret|mistral[_-]?(?:api|key))[\s'":=]+([a-zA-Z0-9]{32})\b/i,
|
|
74
|
+
provider: 'Mistral',
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
/** Risk weight assigned to each flag type. */
|
|
78
|
+
exports.RISK_WEIGHTS = {
|
|
79
|
+
hardcoded_api_key: 30,
|
|
80
|
+
hardcoded_credentials: 30,
|
|
81
|
+
code_http_tools: 30,
|
|
82
|
+
shadow_ai: 25,
|
|
83
|
+
webhook_no_auth: 25,
|
|
84
|
+
internet_facing: 20,
|
|
85
|
+
multi_agent_no_trust: 20,
|
|
86
|
+
agent_chain_no_validation: 20,
|
|
87
|
+
mcp_unknown_server: 20,
|
|
88
|
+
no_auth: 15,
|
|
89
|
+
no_rate_limit: 10,
|
|
90
|
+
deprecated_model: 10,
|
|
91
|
+
no_error_handling: 10,
|
|
92
|
+
unpinned_model: 5,
|
|
93
|
+
};
|
|
94
|
+
/** Set of deprecated AI model identifiers. */
|
|
95
|
+
exports.DEPRECATED_MODELS = new Set([
|
|
96
|
+
'gpt-3.5-turbo',
|
|
97
|
+
'gpt-3.5-turbo-0301',
|
|
98
|
+
'gpt-3.5-turbo-0613',
|
|
99
|
+
'text-davinci-003',
|
|
100
|
+
'text-davinci-002',
|
|
101
|
+
'code-davinci-002',
|
|
102
|
+
'text-ada-001',
|
|
103
|
+
'text-babbage-001',
|
|
104
|
+
'text-curie-001',
|
|
105
|
+
'text-embedding-ada-002',
|
|
106
|
+
'gpt-4-0314',
|
|
107
|
+
'gpt-4-0613',
|
|
108
|
+
'gpt-4-32k-0314',
|
|
109
|
+
'gpt-4-32k-0613',
|
|
110
|
+
'claude-instant-1',
|
|
111
|
+
'claude-instant-1.2',
|
|
112
|
+
'claude-2.0',
|
|
113
|
+
'claude-2.1',
|
|
114
|
+
'claude-3-haiku-20240307',
|
|
115
|
+
]);
|
|
116
|
+
/** Remediation guidance mapped to each risk flag. */
|
|
117
|
+
exports.REMEDIATION_MAP = {
|
|
118
|
+
hardcoded_api_key: {
|
|
119
|
+
description: 'An AI provider API key is hardcoded in the workflow JSON instead of using n8n credentials.',
|
|
120
|
+
remediation: 'Move the API key to n8n Credentials (Settings → Credentials) and reference it via the credential selector. Rotate the exposed key immediately.',
|
|
121
|
+
guardrail: 'Enable a pre-commit hook or CI check that scans for API key patterns (sk-*, sk-ant-*, hf_*) in committed workflow exports.',
|
|
122
|
+
owaspCategory: 'LLM06',
|
|
123
|
+
owaspCategoryName: 'Excessive Agency',
|
|
124
|
+
severity: 'critical',
|
|
125
|
+
},
|
|
126
|
+
hardcoded_credentials: {
|
|
127
|
+
description: 'Sensitive credentials (passwords, tokens, secrets) are embedded directly in workflow node parameters.',
|
|
128
|
+
remediation: 'Replace inline credentials with n8n Credential objects. Audit the workflow export for any remaining secrets and rotate them.',
|
|
129
|
+
guardrail: 'Enforce a policy that workflow exports are scrubbed of secrets before sharing. Use n8n environment variables for sensitive values.',
|
|
130
|
+
owaspCategory: 'LLM06',
|
|
131
|
+
owaspCategoryName: 'Excessive Agency',
|
|
132
|
+
severity: 'critical',
|
|
133
|
+
},
|
|
134
|
+
code_http_tools: {
|
|
135
|
+
description: 'An AI agent has access to both code execution and HTTP request tools, allowing it to run arbitrary code and exfiltrate data.',
|
|
136
|
+
remediation: 'Separate code execution and HTTP tools into different workflows or agents. If both are needed, add an approval step between them.',
|
|
137
|
+
guardrail: 'Implement an output filter that blocks the agent from sending code execution results to external URLs. Use an allowlist for permitted HTTP destinations.',
|
|
138
|
+
owaspCategory: 'LLM04',
|
|
139
|
+
owaspCategoryName: 'Output Handling',
|
|
140
|
+
severity: 'critical',
|
|
141
|
+
},
|
|
142
|
+
shadow_ai: {
|
|
143
|
+
description: 'An AI dependency or integration is used in the workflow but not declared in project documentation or dependency files.',
|
|
144
|
+
remediation: 'Document all AI integrations in your project README or architecture decision records. Register the AI component in your internal AI inventory.',
|
|
145
|
+
guardrail: 'Run AI-BOM in CI to automatically detect and flag undocumented AI usage. Require AI component registration before deployment.',
|
|
146
|
+
owaspCategory: 'LLM05',
|
|
147
|
+
owaspCategoryName: 'Supply Chain',
|
|
148
|
+
severity: 'high',
|
|
149
|
+
},
|
|
150
|
+
webhook_no_auth: {
|
|
151
|
+
description: 'An n8n webhook trigger is configured without authentication, allowing anyone with the URL to invoke the workflow.',
|
|
152
|
+
remediation: 'Enable webhook authentication: use Header Auth, Basic Auth, or JWT validation. At minimum, set the webhook to use a unique, unguessable path.',
|
|
153
|
+
guardrail: 'Add a reverse proxy (nginx/Caddy) with authentication in front of n8n. Monitor webhook access logs for unauthorized calls.',
|
|
154
|
+
owaspCategory: 'LLM02',
|
|
155
|
+
owaspCategoryName: 'Sensitive Info Disclosure',
|
|
156
|
+
severity: 'high',
|
|
157
|
+
},
|
|
158
|
+
internet_facing: {
|
|
159
|
+
description: 'An AI endpoint or webhook is directly accessible from the internet without an authentication layer.',
|
|
160
|
+
remediation: 'Place the endpoint behind a VPN, API gateway, or reverse proxy with authentication. Restrict access to known IP ranges if possible.',
|
|
161
|
+
guardrail: 'Use network segmentation to ensure AI endpoints are only reachable from trusted networks. Implement rate limiting at the network edge.',
|
|
162
|
+
owaspCategory: 'LLM02',
|
|
163
|
+
owaspCategoryName: 'Sensitive Info Disclosure',
|
|
164
|
+
severity: 'medium',
|
|
165
|
+
},
|
|
166
|
+
multi_agent_no_trust: {
|
|
167
|
+
description: 'Multiple AI agents interact without defined trust boundaries, allowing one compromised agent to influence others.',
|
|
168
|
+
remediation: 'Define explicit trust boundaries between agents. Validate and sanitize all inter-agent messages. Use separate credentials per agent.',
|
|
169
|
+
guardrail: 'Implement a message broker between agents that enforces schema validation and content filtering. Log all inter-agent communication.',
|
|
170
|
+
owaspCategory: 'LLM01',
|
|
171
|
+
owaspCategoryName: 'Prompt Injection',
|
|
172
|
+
severity: 'medium',
|
|
173
|
+
},
|
|
174
|
+
agent_chain_no_validation: {
|
|
175
|
+
description: 'Agents are chained together (output of one feeds input of another) without intermediate validation or sanitization.',
|
|
176
|
+
remediation: 'Add a validation node between chained agents to check output format, content safety, and data boundaries before passing to the next agent.',
|
|
177
|
+
guardrail: 'Implement structured output parsers between agents. Use JSON schema validation for inter-agent data. Add content safety filters.',
|
|
178
|
+
owaspCategory: 'LLM01',
|
|
179
|
+
owaspCategoryName: 'Prompt Injection',
|
|
180
|
+
severity: 'medium',
|
|
181
|
+
},
|
|
182
|
+
mcp_unknown_server: {
|
|
183
|
+
description: 'An MCP (Model Context Protocol) client is connected to an unrecognized or unvetted server endpoint.',
|
|
184
|
+
remediation: 'Verify the MCP server identity and ownership. Use only trusted, audited MCP servers. Pin the server URL to a known endpoint.',
|
|
185
|
+
guardrail: 'Maintain an allowlist of approved MCP server endpoints. Block connections to unknown servers at the network level.',
|
|
186
|
+
owaspCategory: 'LLM05',
|
|
187
|
+
owaspCategoryName: 'Supply Chain',
|
|
188
|
+
severity: 'medium',
|
|
189
|
+
},
|
|
190
|
+
no_auth: {
|
|
191
|
+
description: 'An AI-related endpoint or service is configured without any authentication mechanism.',
|
|
192
|
+
remediation: 'Add authentication to the endpoint: API key, OAuth2, or mTLS depending on the use case. Never expose AI services without identity verification.',
|
|
193
|
+
guardrail: 'Enforce authentication policies at the API gateway level. Use automated scanning to detect unauthenticated endpoints.',
|
|
194
|
+
owaspCategory: 'LLM02',
|
|
195
|
+
owaspCategoryName: 'Sensitive Info Disclosure',
|
|
196
|
+
severity: 'medium',
|
|
197
|
+
},
|
|
198
|
+
no_rate_limit: {
|
|
199
|
+
description: 'No rate limiting is configured on an AI endpoint, making it vulnerable to abuse and cost overruns.',
|
|
200
|
+
remediation: 'Add rate limiting at the application or API gateway level. Set per-user and per-IP limits appropriate for your use case.',
|
|
201
|
+
guardrail: 'Configure budget alerts on AI provider accounts. Implement token-based rate limiting that accounts for LLM token consumption.',
|
|
202
|
+
owaspCategory: 'LLM10',
|
|
203
|
+
owaspCategoryName: 'Unbounded Consumption',
|
|
204
|
+
severity: 'low',
|
|
205
|
+
},
|
|
206
|
+
deprecated_model: {
|
|
207
|
+
description: 'The workflow uses an AI model version that has been deprecated by the provider and may be removed or lack security patches.',
|
|
208
|
+
remediation: 'Upgrade to the latest stable model version recommended by the provider. Test the new model version in a staging environment first.',
|
|
209
|
+
guardrail: 'Maintain a list of approved model versions. Run AI-BOM in CI to flag deprecated models before deployment.',
|
|
210
|
+
owaspCategory: 'LLM05',
|
|
211
|
+
owaspCategoryName: 'Supply Chain',
|
|
212
|
+
severity: 'low',
|
|
213
|
+
},
|
|
214
|
+
no_error_handling: {
|
|
215
|
+
description: 'AI API calls in the workflow have no error handling, which can lead to silent failures or data loss.',
|
|
216
|
+
remediation: 'Add error handling nodes after AI operations. Configure retry logic with exponential backoff. Log failures for monitoring.',
|
|
217
|
+
guardrail: 'Use n8n error workflows to catch and alert on AI operation failures. Implement circuit breakers for AI provider outages.',
|
|
218
|
+
owaspCategory: 'LLM10',
|
|
219
|
+
owaspCategoryName: 'Unbounded Consumption',
|
|
220
|
+
severity: 'low',
|
|
221
|
+
},
|
|
222
|
+
unpinned_model: {
|
|
223
|
+
description: 'The AI model version is not pinned, meaning provider-side updates could change behavior without notice.',
|
|
224
|
+
remediation: 'Pin the model to a specific version (e.g., gpt-4-0125-preview instead of gpt-4). Document the pinned version in your runbook.',
|
|
225
|
+
guardrail: 'Use a model registry or configuration file to track pinned versions. Alert when a pinned version approaches its deprecation date.',
|
|
226
|
+
owaspCategory: 'LLM05',
|
|
227
|
+
owaspCategoryName: 'Supply Chain',
|
|
228
|
+
severity: 'low',
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
/** Regex patterns for detecting dangerous code in n8n Code nodes. */
|
|
232
|
+
exports.DANGEROUS_CODE_PATTERNS = [
|
|
233
|
+
'child_process',
|
|
234
|
+
'execSync\\(',
|
|
235
|
+
'exec\\(',
|
|
236
|
+
'spawn\\(',
|
|
237
|
+
'process\\.exit\\(',
|
|
238
|
+
'eval\\(',
|
|
239
|
+
'Function\\(',
|
|
240
|
+
'new\\s+Function\\(',
|
|
241
|
+
"require\\(['\"]fs['\"]\\)",
|
|
242
|
+
'fs\\.writeFile',
|
|
243
|
+
'fs\\.unlink',
|
|
244
|
+
'__dirname',
|
|
245
|
+
'require\\(\\s*[a-zA-Z_$]',
|
|
246
|
+
'http\\.request',
|
|
247
|
+
'https\\.request',
|
|
248
|
+
'Buffer\\.from',
|
|
249
|
+
"setTimeout\\s*\\(\\s*['\"]",
|
|
250
|
+
"setInterval\\s*\\(\\s*['\"]",
|
|
251
|
+
'document\\.cookie',
|
|
252
|
+
'window\\.location',
|
|
253
|
+
];
|
|
254
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,0DAA0D;AAC7C,QAAA,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IAC5D,gCAAgC;IAChC,uCAAuC;IACvC,0CAA0C;IAC1C,6CAA6C;IAC7C,uCAAuC;IACvC,4CAA4C;IAC5C,6CAA6C;IAC7C,qCAAqC;IACrC,uCAAuC;IACvC,4CAA4C;IAC5C,wCAAwC;IACxC,0CAA0C;IAC1C,mCAAmC;IACnC,uCAAuC;IACvC,yCAAyC;IACzC,wCAAwC;IACxC,2CAA2C;IAC3C,gDAAgD;IAChD,2CAA2C;IAC3C,yDAAyD;IACzD,iDAAiD;IACjD,2CAA2C;IAC3C,4CAA4C;IAC5C,8CAA8C;IAC9C,4CAA4C;IAC5C,8CAA8C;IAC9C,8CAA8C;IAC9C,8CAA8C;IAC9C,6CAA6C;IAC7C,6CAA6C;IAC7C,4CAA4C;IAC5C,0CAA0C;IAC1C,iDAAiD;IACjD,iDAAiD;IACjD,2CAA2C;IAC3C,mCAAmC;IACnC,6CAA6C;IAC7C,2CAA2C;IAC3C,qEAAqE;IACrE,4DAA4D;IAC5D,2DAA2D;IAC3D,6CAA6C;IAC7C,6CAA6C;IAC7C,4CAA4C;CAC7C,CAAC,CAAC;AAOH,6DAA6D;AAChD,QAAA,gBAAgB,GAA6B;IACxD,EAAE,OAAO,EAAE,4BAA4B,EAAE,QAAQ,EAAE,QAAQ,EAAE;IAC7D,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,iBAAiB,EAAE;IAC/D,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE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AsG;QACnH,WAAW,EAAE,4HAA4H;QACzI,SAAS,EAAE,0HAA0H;QACrI,aAAa,EAAE,OAAO;QACtB,iBAAiB,EAAE,uBAAuB;QAC1C,QAAQ,EAAE,KAAK;KAChB;IACD,cAAc,EAAE;QACd,WAAW,EAAE,yGAAyG;QACtH,WAAW,EAAE,+HAA+H;QAC5I,SAAS,EAAE,mIAAmI;QAC9I,aAAa,EAAE,OAAO;QACtB,iBAAiB,EAAE,cAAc;QACjC,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC;AAEF,qEAAqE;AACxD,QAAA,uBAAuB,GAAsB;IACxD,eAAe;IACf,aAAa;IACb,SAAS;IACT,UAAU;IACV,mBAAmB;IACnB,SAAS;IACT,aAAa;IACb,oBAAoB;IACpB,2BAA2B;IAC3B,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,0BAA0B;IAC1B,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,4BAA4B;IAC5B,6BAA6B;IAC7B,mBAAmB;IACnB,mBAAmB;CACpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-contained HTML dashboard generator for Trusera AI-BOM scan results.
|
|
3
|
+
* Ported from Python src/ai_bom/dashboard/frontend.py, adapted for
|
|
4
|
+
* static embedded data (no API calls) with optional AES-256-GCM encryption.
|
|
5
|
+
*/
|
|
6
|
+
import type { ScanResult } from './models';
|
|
7
|
+
/**
|
|
8
|
+
* Generate a self-contained HTML dashboard for the given scan results.
|
|
9
|
+
* If `password` is provided, the scan data is AES-256-GCM encrypted and
|
|
10
|
+
* the page shows a password prompt that decrypts client-side.
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateDashboardHtml(scanResult: ScanResult, password?: string): string;
|
|
13
|
+
//# sourceMappingURL=dashboardHtml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboardHtml.d.ts","sourceRoot":"","sources":["../../lib/dashboardHtml.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,UAAU,EACtB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAmlBR"}
|