@mlabsh/n8n-nodes-mlab 0.1.2 → 1.1.2
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 +57 -66
- package/dist/nodes/{MlabCve/MlabCve.node.d.ts → Mlab/Mlab.node.d.ts} +1 -1
- package/dist/nodes/Mlab/Mlab.node.js +960 -0
- package/dist/nodes/Mlab/Mlab.node.js.map +1 -0
- package/dist/nodes/shared/GenericFunctions.js +9 -2
- package/dist/nodes/shared/GenericFunctions.js.map +1 -1
- package/package.json +2 -4
- package/dist/nodes/MlabCore/MlabCore.node.d.ts +0 -5
- package/dist/nodes/MlabCore/MlabCore.node.js +0 -348
- package/dist/nodes/MlabCore/MlabCore.node.js.map +0 -1
- package/dist/nodes/MlabCve/MlabCve.node.js +0 -161
- package/dist/nodes/MlabCve/MlabCve.node.js.map +0 -1
- package/dist/nodes/MlabCve/mlab.svg +0 -9
- package/dist/nodes/MlabThreatActors/MlabThreatActors.node.d.ts +0 -5
- package/dist/nodes/MlabThreatActors/MlabThreatActors.node.js +0 -167
- package/dist/nodes/MlabThreatActors/MlabThreatActors.node.js.map +0 -1
- package/dist/nodes/MlabThreatActors/mlab.svg +0 -9
- /package/dist/nodes/{MlabCore → Mlab}/mlab.svg +0 -0
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
# @mlabsh/n8n-nodes-mlab
|
|
2
2
|
|
|
3
|
-
n8n community
|
|
3
|
+
n8n community node for [**mlab.sh**](https://mlab.sh) — bring core scanning, CVE
|
|
4
4
|
vulnerability intelligence and threat-actor data into your n8n workflows.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The package ships a single **mlab.sh** node whose surfaces are exposed as resources:
|
|
7
7
|
|
|
8
|
-
|
|
|
9
|
-
|
|
10
|
-
| **
|
|
11
|
-
| **
|
|
12
|
-
| **
|
|
8
|
+
| Resource | Service | Auth |
|
|
9
|
+
|----------|---------|------|
|
|
10
|
+
| **Domain / IP Address / Crypto Address / File / Quota** (Core) | `mlab.sh/api/v1` — domain / IP / crypto / file scans | API key |
|
|
11
|
+
| **CVE** | `vuln.mlab.sh/api/v1` — CVE search & details | none (public) |
|
|
12
|
+
| **Threat Actor** | `actors.mlab.sh/api/v1` — threat-actor intel | none (public) |
|
|
13
13
|
|
|
14
|
-
[Installation](#installation) · [Credentials](#credentials) · [
|
|
14
|
+
[Installation](#installation) · [Credentials](#credentials) · [Resources & operations](#resources--operations) · [Examples](#examples)
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
|
-
### From the n8n UI
|
|
20
|
+
### From the n8n UI
|
|
21
21
|
|
|
22
22
|
1. In n8n, go to **Settings → Community Nodes → Install**.
|
|
23
23
|
2. Enter the npm package name: `@mlabsh/n8n-nodes-mlab`.
|
|
24
24
|
3. Agree to the risk prompt and install.
|
|
25
25
|
|
|
26
|
-
> Community nodes require `N8N_COMMUNITY_PACKAGES_ENABLED=true` (the default on self-hosted instances).
|
|
26
|
+
> Community nodes require `N8N_COMMUNITY_PACKAGES_ENABLED=true` (the default on self-hosted instances).
|
|
27
27
|
|
|
28
28
|
### Manually (self-hosted)
|
|
29
29
|
|
|
@@ -32,97 +32,88 @@ cd ~/.n8n/nodes # or your N8N_CUSTOM_EXTENSIONS path
|
|
|
32
32
|
npm install @mlabsh/n8n-nodes-mlab
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Restart n8n afterwards.
|
|
35
|
+
Restart n8n afterwards. The **mlab.sh** node then appears in the nodes panel.
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
39
|
## Credentials
|
|
40
40
|
|
|
41
|
-
Only the **Core**
|
|
41
|
+
Only the **Core** resources (Domain / IP Address / Crypto Address / File / Quota) need credentials. The credential field is hidden when a public resource (CVE / Threat Actor) is selected.
|
|
42
42
|
|
|
43
43
|
1. Create an API key at **mlab.sh → Account → Settings → API Keys** (it starts with `mlab_`).
|
|
44
44
|
2. In n8n, add a new **mlab.sh API** credential and paste the key.
|
|
45
45
|
3. The node sends it as `Authorization: token mlab_...`. The credential's *Test* button hits `GET /limit/ip` to validate the key.
|
|
46
46
|
|
|
47
|
-
The **CVE** and **Threat
|
|
47
|
+
The **CVE** and **Threat Actor** resources call public, unauthenticated APIs — no credential required.
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Resources & operations
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Pick a **Resource**, then an **Operation**. The node processes every input item and outputs the raw JSON returned by mlab.sh.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
- **Domain → Get Status** / **Get Results** — for managing an async scan yourself.
|
|
57
|
-
- **IP → Lookup** — `GET /scan/ip` (geolocation, ASN, ownership).
|
|
58
|
-
- **Crypto → Lookup** — `GET /scan/crypto` (sanctions, labels, risk score). Chain auto-detected or forced.
|
|
59
|
-
- **File → Upload** — `POST /upload/file` from an input binary field (max 10MB) and returns the `sha256`.
|
|
60
|
-
- **File → Get Results** — `GET /scan/file/results?sha256=…`.
|
|
61
|
-
- **Quota → Get** — remaining daily quota for a scan type (`GET /limit/{type}`).
|
|
55
|
+
### Core — Domain
|
|
62
56
|
|
|
63
|
-
|
|
57
|
+
| Operation | Endpoint | Notes |
|
|
58
|
+
|-----------|----------|-------|
|
|
59
|
+
| **Scan** | `POST /scan/domain` | Launches a scan. With **Wait for Completion** on (default) it polls `/scan/domain/status` and returns the full `/scan/domain/results` payload (subdomains, DNS, SSL, security.txt…). Disable it to return only the job acknowledgement. **Timeout (Seconds)** controls how long polling waits. |
|
|
60
|
+
| **Get Status** | `GET /scan/domain/status` | Check an async scan you launched yourself. |
|
|
61
|
+
| **Get Results** | `GET /scan/domain/results` | Fetch results once a scan has finished. |
|
|
64
62
|
|
|
65
|
-
|
|
66
|
-
- **Get** — `GET /cve/CVE-XXXX-XXXX` (full detail incl. EPSS & KEV).
|
|
67
|
-
- **Get Latest** — `GET /cve/latest` (last 7 days).
|
|
63
|
+
### Core — IP Address
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
| Operation | Endpoint | Notes |
|
|
66
|
+
|-----------|----------|-------|
|
|
67
|
+
| **Lookup** | `GET /scan/ip` | Geolocation, ASN and ownership for an IPv4/IPv6 address. |
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
- **Get** — `GET /actors/:slug` (aliases, tools, CVEs, techniques).
|
|
73
|
-
- **Get by CVE** — `GET /cves/CVE-XXXX-XXXX/actors` (reverse lookup).
|
|
69
|
+
### Core — Crypto Address
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
| Operation | Endpoint | Notes |
|
|
72
|
+
|-----------|----------|-------|
|
|
73
|
+
| **Lookup** | `GET /scan/crypto` | Sanctions, labels and risk score. **Chain** can be auto-detected (leave blank) or forced (BTC, ETH, SOL, TRON, …). |
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
### Core — File
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
# Link into a local n8n for testing:
|
|
85
|
-
npm link
|
|
86
|
-
cd ~/.n8n/nodes && npm link @mlabsh/n8n-nodes-mlab
|
|
87
|
-
n8n start
|
|
88
|
-
```
|
|
77
|
+
| Operation | Endpoint | Notes |
|
|
78
|
+
|-----------|----------|-------|
|
|
79
|
+
| **Upload** | `POST /upload/file` | Uploads the file from the **Input Binary Field** (max 10 MB) and returns its `sha256`. |
|
|
80
|
+
| **Get Results** | `GET /scan/file/results` | Fetch analysis results by **SHA-256** hash. |
|
|
89
81
|
|
|
90
|
-
|
|
82
|
+
### Core — Quota
|
|
91
83
|
|
|
92
|
-
|
|
84
|
+
| Operation | Endpoint | Notes |
|
|
85
|
+
|-----------|----------|-------|
|
|
86
|
+
| **Get** | `GET /limit/{type}` | Remaining daily quota for a **Scan Type** (domain / IP / file / crypto). |
|
|
93
87
|
|
|
94
|
-
|
|
88
|
+
### CVE
|
|
95
89
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
| Operation | Endpoint | Notes |
|
|
91
|
+
|-----------|----------|-------|
|
|
92
|
+
| **Search** | `GET /cve?q=…` | Search by keyword, vendor or product. Optional **Filters**: severity, published-after date, exact match, KEV-only. |
|
|
93
|
+
| **Get** | `GET /cve/{id}` | Full detail for a CVE, including EPSS and KEV data. |
|
|
94
|
+
| **Get Latest** | `GET /cve/latest` | Vulnerabilities from the last 7 days. |
|
|
95
|
+
|
|
96
|
+
### Threat Actor
|
|
101
97
|
|
|
102
|
-
|
|
98
|
+
| Operation | Endpoint | Notes |
|
|
99
|
+
|-----------|----------|-------|
|
|
100
|
+
| **List / Search** | `GET /actors` | Optional **Filters**: origin, motivation, sector. Paginate with **Limit** / **Offset**. |
|
|
101
|
+
| **Get** | `GET /actors/{slug}` | A single actor by slug, including aliases, tools, CVEs and techniques. |
|
|
102
|
+
| **Get by CVE** | `GET /cves/{id}/actors` | Reverse lookup — which actors are known to exploit a given CVE. |
|
|
103
103
|
|
|
104
104
|
---
|
|
105
105
|
|
|
106
|
-
##
|
|
106
|
+
## Examples
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
**Enrich a domain on demand.** Webhook → **mlab.sh** (Resource: *Domain*, Operation: *Scan*, Wait for Completion: on) → use the returned subdomains / SSL / DNS data downstream.
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
**Vulnerability watch.** Schedule Trigger (daily) → **mlab.sh** (Resource: *CVE*, Operation: *Get Latest*) → Filter on `severity = CRITICAL` → notify Slack / email.
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
- Package name matches `n8n-nodes-*` / `@scope/n8n-nodes-*` ✅
|
|
114
|
-
- `package.json` declares `n8n.n8nNodesApiVersion`, `nodes`, `credentials` ✅
|
|
115
|
-
- Passes `eslint-plugin-n8n-nodes-base` with **zero errors** on the `community`, `nodes` and `credentials` rulesets — run `npm run lint` ✅ (a few opinionated rules are relaxed in `.eslintrc.js`; tighten them before submitting)
|
|
116
|
-
- No runtime dependencies beyond `n8n-workflow` (this package has none) ✅
|
|
117
|
-
- Icons, `description`, `documentationUrl`, codex/category metadata present
|
|
118
|
-
- Submit via the form linked from n8n's docs: **Creating nodes → Submit community nodes for verification** (<https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/>). n8n reviews the source and, once approved, the node appears in the in-app nodes panel and is installable on Cloud.
|
|
112
|
+
**Threat-actor context for an alert.** **mlab.sh** (Resource: *Threat Actor*, Operation: *Get by CVE*, CVE ID: `CVE-2021-44228`) → attach the matching actors to your incident record.
|
|
119
113
|
|
|
120
|
-
|
|
121
|
-
- Get adoption + verification first (tier 2).
|
|
122
|
-
- Open a discussion/issue on <https://github.com/n8n-io/n8n> proposing the integration, or contact n8n's partnerships team (integrations are often prioritised via the partner program).
|
|
123
|
-
- If accepted, the node source is contributed into the `n8n-nodes-base` package via PR following n8n's contribution guide. From then on n8n maintains it and the community package can be deprecated.
|
|
114
|
+
**Crypto / IP triage.** Feed a list of addresses or IPs into **mlab.sh** (Resource: *Crypto Address* or *IP Address*, Operation: *Lookup*); the node runs once per input item and returns risk/ownership data per row.
|
|
124
115
|
|
|
125
|
-
|
|
116
|
+
> Each Core operation consumes daily quota. Use the **Quota → Get** operation to check remaining budget before large batch runs.
|
|
126
117
|
|
|
127
118
|
---
|
|
128
119
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class Mlab implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
4
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
5
|
}
|