n8n-nodes-relayshield 0.1.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 +62 -0
- package/dist/credentials/RelayShieldApi.credentials.d.ts +10 -0
- package/dist/credentials/RelayShieldApi.credentials.d.ts.map +1 -0
- package/dist/credentials/RelayShieldApi.credentials.js +39 -0
- package/dist/credentials/RelayShieldApi.credentials.js.map +1 -0
- package/dist/nodes/RelayShield/RelayShield.node.d.ts +6 -0
- package/dist/nodes/RelayShield/RelayShield.node.d.ts.map +1 -0
- package/dist/nodes/RelayShield/RelayShield.node.js +295 -0
- package/dist/nodes/RelayShield/RelayShield.node.js.map +1 -0
- package/dist/nodes/RelayShield/relayshield.svg +4 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# n8n-nodes-relayshield
|
|
2
|
+
|
|
3
|
+
An [n8n](https://n8n.io) community node for [RelayShield](https://relayshield.net) — security intelligence for automation workflows.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
| Operation | Endpoint | Cost |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **Breach Check** | `POST /v1/metered/breach` | $0.10/call |
|
|
10
|
+
| **SIM Swap Detection** | `POST /v1/metered/sim-swap` | $0.25/call |
|
|
11
|
+
| **Infostealer Check** | `POST /v1/metered/infostealer` | $0.50/call |
|
|
12
|
+
| **Domain Lookalike Scan** | `POST /v1/metered/domain` | $0.30/call |
|
|
13
|
+
| **OAuth Watchlist Check** | `POST /v1/metered/oauth-watchlist` | $0.20/call |
|
|
14
|
+
| **Threat Intelligence — IOC Lookup** | `GET /v1/intel/telegram` | Subscription |
|
|
15
|
+
| **Threat Intelligence — CVE Lookup** | `GET /v1/intel/cve` | Free |
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
In your n8n instance, go to **Settings → Community Nodes → Install** and enter:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
n8n-nodes-relayshield
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Credentials
|
|
26
|
+
|
|
27
|
+
You need a RelayShield API key. Get one at [relayshield.net/developers](https://relayshield.net/developers).
|
|
28
|
+
|
|
29
|
+
Add it in n8n: **Credentials → New → RelayShield API**.
|
|
30
|
+
|
|
31
|
+
## Pricing
|
|
32
|
+
|
|
33
|
+
- **PAYG metered billing** — pay only for calls made, billed monthly via Stripe
|
|
34
|
+
- **Credit packs** — $25 / $50 / $100 one-time, credits never expire
|
|
35
|
+
- **Developer subscription** — $499/mo (10,000 TI calls) · $999/mo (unlimited TI calls)
|
|
36
|
+
|
|
37
|
+
## Example workflows
|
|
38
|
+
|
|
39
|
+
### Employee breach monitoring
|
|
40
|
+
```
|
|
41
|
+
Schedule Trigger → RelayShield (Breach Check) → IF breach_count > 0 → Slack alert
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Infostealer detection in incident response
|
|
45
|
+
```
|
|
46
|
+
Webhook → RelayShield (Infostealer Check) → IF exposed → PagerDuty alert + Jira ticket
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### IOC enrichment in SOAR playbook
|
|
50
|
+
```
|
|
51
|
+
Webhook (alert) → RelayShield (IOC Lookup) → IF matched → escalate + block IP in firewall
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### CVE triage for ransomware-linked vulnerabilities
|
|
55
|
+
```
|
|
56
|
+
Schedule Trigger → RelayShield (CVE Lookup, keyword=your-vendor) → filter ransomware_flagged=true → Jira ticket
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Support
|
|
60
|
+
|
|
61
|
+
- Docs: [relayshield.net/developers](https://relayshield.net/developers)
|
|
62
|
+
- Email: [support@relayshield.net](mailto:support@relayshield.net)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class RelayShieldApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=RelayShieldApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelayShieldApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/RelayShieldApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,cAAe,YAAW,eAAe;IACrD,IAAI,SAAoB;IACxB,WAAW,SAAqB;IAChC,gBAAgB,SAAwC;IACxD,UAAU,EAAE,eAAe,EAAE,CAU3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAO1B;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RelayShieldApi = void 0;
|
|
4
|
+
class RelayShieldApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'relayShieldApi';
|
|
7
|
+
this.displayName = 'RelayShield API';
|
|
8
|
+
this.documentationUrl = 'https://relayshield.net/developers';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API Key',
|
|
12
|
+
name: 'apiKey',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: '',
|
|
16
|
+
placeholder: 'rs_live_...',
|
|
17
|
+
description: 'Your RelayShield API key. Get one at relayshield.net/developers.',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
this.authenticate = {
|
|
21
|
+
type: 'generic',
|
|
22
|
+
properties: {
|
|
23
|
+
headers: {
|
|
24
|
+
'X-RS-API-KEY': '={{$credentials.apiKey}}',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
this.test = {
|
|
29
|
+
request: {
|
|
30
|
+
baseURL: 'https://atq6wtkp6k.execute-api.us-east-1.amazonaws.com/prod',
|
|
31
|
+
url: '/v1/intel/cve',
|
|
32
|
+
method: 'GET',
|
|
33
|
+
qs: { keyword: 'test' },
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.RelayShieldApi = RelayShieldApi;
|
|
39
|
+
//# sourceMappingURL=RelayShieldApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelayShieldApi.credentials.js","sourceRoot":"","sources":["../../credentials/RelayShieldApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,cAAc;IAA3B;QACC,SAAI,GAAG,gBAAgB,CAAC;QACxB,gBAAW,GAAG,iBAAiB,CAAC;QAChC,qBAAgB,GAAG,oCAAoC,CAAC;QACxD,eAAU,GAAsB;YAC/B;gBACC,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,WAAW,EAAE,aAAa;gBAC1B,WAAW,EAAE,kEAAkE;aAC/E;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,cAAc,EAAE,0BAA0B;iBAC1C;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,6DAA6D;gBACtE,GAAG,EAAE,eAAe;gBACpB,MAAM,EAAE,KAAK;gBACb,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;aACvB;SACD,CAAC;IACH,CAAC;CAAA;AAjCD,wCAiCC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class RelayShield implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=RelayShield.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelayShield.node.d.ts","sourceRoot":"","sources":["../../../nodes/RelayShield/RelayShield.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AAItB,qBAAa,WAAY,YAAW,SAAS;IAC5C,WAAW,EAAE,oBAAoB,CAuM/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAwEvE"}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RelayShield = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const API_BASE = 'https://atq6wtkp6k.execute-api.us-east-1.amazonaws.com/prod';
|
|
6
|
+
class RelayShield {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.description = {
|
|
9
|
+
displayName: 'RelayShield',
|
|
10
|
+
name: 'relayShield',
|
|
11
|
+
icon: 'file:relayshield.svg',
|
|
12
|
+
group: ['transform'],
|
|
13
|
+
version: 1,
|
|
14
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
15
|
+
description: 'Breach detection, SIM swap monitoring, infostealer exposure, domain lookalike scanning, and threat intelligence IOC lookup via RelayShield.',
|
|
16
|
+
defaults: {
|
|
17
|
+
name: 'RelayShield',
|
|
18
|
+
},
|
|
19
|
+
inputs: ['main'],
|
|
20
|
+
outputs: ['main'],
|
|
21
|
+
credentials: [
|
|
22
|
+
{
|
|
23
|
+
name: 'relayShieldApi',
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
properties: [
|
|
28
|
+
// ----------------------------------------------------------------
|
|
29
|
+
// Operation selector
|
|
30
|
+
// ----------------------------------------------------------------
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Operation',
|
|
33
|
+
name: 'operation',
|
|
34
|
+
type: 'options',
|
|
35
|
+
noDataExpression: true,
|
|
36
|
+
options: [
|
|
37
|
+
{
|
|
38
|
+
name: 'Breach Check',
|
|
39
|
+
value: 'breach',
|
|
40
|
+
description: 'Check if an email address appears in known data breaches',
|
|
41
|
+
action: 'Check an email address for breach exposure',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'SIM Swap Detection',
|
|
45
|
+
value: 'simSwap',
|
|
46
|
+
description: 'Detect active SIM swap or port-out fraud via carrier-level query',
|
|
47
|
+
action: 'Detect SIM swap or port-out fraud on a phone number',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Infostealer Check',
|
|
51
|
+
value: 'infostealer',
|
|
52
|
+
description: 'Check if credentials appear in criminal infostealer log markets',
|
|
53
|
+
action: 'Check an email for infostealer log exposure',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Domain Lookalike Scan',
|
|
57
|
+
value: 'domain',
|
|
58
|
+
description: 'Scan for typosquat and lookalike domains registered to impersonate a domain',
|
|
59
|
+
action: 'Scan a domain for lookalikes and typosquats',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'OAuth Watchlist Check',
|
|
63
|
+
value: 'oauthWatchlist',
|
|
64
|
+
description: 'Check if a breach exposes credentials used with high-risk OAuth apps',
|
|
65
|
+
action: 'Check an email for OAuth supply chain exposure',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'Threat Intelligence — IOC Lookup',
|
|
69
|
+
value: 'intelTelegram',
|
|
70
|
+
description: 'Query RelayShield\'s live IOC database (criminal Telegram channels, ThreatFox, URLhaus) for a domain, IP, email, phone, or wallet address',
|
|
71
|
+
action: 'Look up an indicator of compromise in the threat intelligence database',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Threat Intelligence — CVE Lookup',
|
|
75
|
+
value: 'intelCve',
|
|
76
|
+
description: 'Query the CISA Known Exploited Vulnerabilities catalog, cross-referenced for ransomware activity',
|
|
77
|
+
action: 'Look up a CVE or keyword in the CISA KEV catalog',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
default: 'breach',
|
|
81
|
+
},
|
|
82
|
+
// ----------------------------------------------------------------
|
|
83
|
+
// Breach Check fields
|
|
84
|
+
// ----------------------------------------------------------------
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Email',
|
|
87
|
+
name: 'email',
|
|
88
|
+
type: 'string',
|
|
89
|
+
placeholder: 'user@example.com',
|
|
90
|
+
default: '',
|
|
91
|
+
required: true,
|
|
92
|
+
displayOptions: {
|
|
93
|
+
show: { operation: ['breach', 'infostealer', 'oauthWatchlist'] },
|
|
94
|
+
},
|
|
95
|
+
description: 'Email address to check',
|
|
96
|
+
},
|
|
97
|
+
// ----------------------------------------------------------------
|
|
98
|
+
// SIM Swap fields
|
|
99
|
+
// ----------------------------------------------------------------
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Phone Number',
|
|
102
|
+
name: 'phone',
|
|
103
|
+
type: 'string',
|
|
104
|
+
placeholder: '+12125551234',
|
|
105
|
+
default: '',
|
|
106
|
+
required: true,
|
|
107
|
+
displayOptions: {
|
|
108
|
+
show: { operation: ['simSwap'] },
|
|
109
|
+
},
|
|
110
|
+
description: 'Phone number in E.164 format (+country code + number)',
|
|
111
|
+
},
|
|
112
|
+
// ----------------------------------------------------------------
|
|
113
|
+
// Domain Lookalike fields
|
|
114
|
+
// ----------------------------------------------------------------
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Domain',
|
|
117
|
+
name: 'domain',
|
|
118
|
+
type: 'string',
|
|
119
|
+
placeholder: 'example.com',
|
|
120
|
+
default: '',
|
|
121
|
+
required: true,
|
|
122
|
+
displayOptions: {
|
|
123
|
+
show: { operation: ['domain'] },
|
|
124
|
+
},
|
|
125
|
+
description: 'Domain to scan for lookalikes (e.g. example.com)',
|
|
126
|
+
},
|
|
127
|
+
// ----------------------------------------------------------------
|
|
128
|
+
// Threat Intelligence — IOC Lookup fields
|
|
129
|
+
// ----------------------------------------------------------------
|
|
130
|
+
{
|
|
131
|
+
displayName: 'Indicator',
|
|
132
|
+
name: 'indicator',
|
|
133
|
+
type: 'string',
|
|
134
|
+
placeholder: 'evil.com or 1.2.3.4 or user@example.com',
|
|
135
|
+
default: '',
|
|
136
|
+
required: true,
|
|
137
|
+
displayOptions: {
|
|
138
|
+
show: { operation: ['intelTelegram'] },
|
|
139
|
+
},
|
|
140
|
+
description: 'The IOC value to look up — domain, IP, email, phone, or wallet address',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
displayName: 'Indicator Type',
|
|
144
|
+
name: 'indicatorType',
|
|
145
|
+
type: 'options',
|
|
146
|
+
options: [
|
|
147
|
+
{ name: 'Domain', value: 'domain' },
|
|
148
|
+
{ name: 'IP Address', value: 'ip' },
|
|
149
|
+
{ name: 'Email', value: 'email' },
|
|
150
|
+
{ name: 'Phone', value: 'phone' },
|
|
151
|
+
{ name: 'Wallet Address', value: 'wallet' },
|
|
152
|
+
],
|
|
153
|
+
default: 'domain',
|
|
154
|
+
required: true,
|
|
155
|
+
displayOptions: {
|
|
156
|
+
show: { operation: ['intelTelegram'] },
|
|
157
|
+
},
|
|
158
|
+
description: 'Type of indicator being queried',
|
|
159
|
+
},
|
|
160
|
+
// ----------------------------------------------------------------
|
|
161
|
+
// Threat Intelligence — CVE Lookup fields
|
|
162
|
+
// ----------------------------------------------------------------
|
|
163
|
+
{
|
|
164
|
+
displayName: 'Lookup By',
|
|
165
|
+
name: 'cveLookupBy',
|
|
166
|
+
type: 'options',
|
|
167
|
+
options: [
|
|
168
|
+
{ name: 'CVE ID', value: 'cve_id' },
|
|
169
|
+
{ name: 'Keyword', value: 'keyword' },
|
|
170
|
+
],
|
|
171
|
+
default: 'cve_id',
|
|
172
|
+
required: true,
|
|
173
|
+
displayOptions: {
|
|
174
|
+
show: { operation: ['intelCve'] },
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
displayName: 'CVE ID',
|
|
179
|
+
name: 'cveId',
|
|
180
|
+
type: 'string',
|
|
181
|
+
placeholder: 'CVE-2024-1234',
|
|
182
|
+
default: '',
|
|
183
|
+
required: true,
|
|
184
|
+
displayOptions: {
|
|
185
|
+
show: { operation: ['intelCve'], cveLookupBy: ['cve_id'] },
|
|
186
|
+
},
|
|
187
|
+
description: 'CVE identifier to look up (e.g. CVE-2024-12345)',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
displayName: 'Keyword',
|
|
191
|
+
name: 'cveKeyword',
|
|
192
|
+
type: 'string',
|
|
193
|
+
placeholder: 'apache, exchange, citrix...',
|
|
194
|
+
default: '',
|
|
195
|
+
required: true,
|
|
196
|
+
displayOptions: {
|
|
197
|
+
show: { operation: ['intelCve'], cveLookupBy: ['keyword'] },
|
|
198
|
+
},
|
|
199
|
+
description: 'Vendor, product, or vulnerability keyword to search in CISA KEV',
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
async execute() {
|
|
205
|
+
const items = this.getInputData();
|
|
206
|
+
const returnData = [];
|
|
207
|
+
const credentials = await this.getCredentials('relayShieldApi');
|
|
208
|
+
const apiKey = credentials.apiKey;
|
|
209
|
+
for (let i = 0; i < items.length; i++) {
|
|
210
|
+
try {
|
|
211
|
+
const operation = this.getNodeParameter('operation', i);
|
|
212
|
+
let responseData;
|
|
213
|
+
if (operation === 'breach') {
|
|
214
|
+
const email = this.getNodeParameter('email', i);
|
|
215
|
+
responseData = await relayShieldPost('/v1/metered/breach', { email }, apiKey);
|
|
216
|
+
}
|
|
217
|
+
else if (operation === 'simSwap') {
|
|
218
|
+
const phone = this.getNodeParameter('phone', i);
|
|
219
|
+
responseData = await relayShieldPost('/v1/metered/sim-swap', { phone }, apiKey);
|
|
220
|
+
}
|
|
221
|
+
else if (operation === 'infostealer') {
|
|
222
|
+
const email = this.getNodeParameter('email', i);
|
|
223
|
+
responseData = await relayShieldPost('/v1/metered/infostealer', { email }, apiKey);
|
|
224
|
+
}
|
|
225
|
+
else if (operation === 'domain') {
|
|
226
|
+
const domain = this.getNodeParameter('domain', i);
|
|
227
|
+
responseData = await relayShieldPost('/v1/metered/domain', { domain }, apiKey);
|
|
228
|
+
}
|
|
229
|
+
else if (operation === 'oauthWatchlist') {
|
|
230
|
+
const email = this.getNodeParameter('email', i);
|
|
231
|
+
responseData = await relayShieldPost('/v1/metered/oauth-watchlist', { email }, apiKey);
|
|
232
|
+
}
|
|
233
|
+
else if (operation === 'intelTelegram') {
|
|
234
|
+
const indicator = this.getNodeParameter('indicator', i);
|
|
235
|
+
const type = this.getNodeParameter('indicatorType', i);
|
|
236
|
+
responseData = await relayShieldGet(`/v1/intel/telegram?indicator=${encodeURIComponent(indicator)}&type=${type}`, apiKey);
|
|
237
|
+
}
|
|
238
|
+
else if (operation === 'intelCve') {
|
|
239
|
+
const lookupBy = this.getNodeParameter('cveLookupBy', i);
|
|
240
|
+
if (lookupBy === 'cve_id') {
|
|
241
|
+
const cveId = this.getNodeParameter('cveId', i);
|
|
242
|
+
responseData = await relayShieldGet(`/v1/intel/cve?cve_id=${encodeURIComponent(cveId)}`, apiKey);
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
const keyword = this.getNodeParameter('cveKeyword', i);
|
|
246
|
+
responseData = await relayShieldGet(`/v1/intel/cve?keyword=${encodeURIComponent(keyword)}`, apiKey);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation: ${operation}`);
|
|
251
|
+
}
|
|
252
|
+
returnData.push({ json: responseData });
|
|
253
|
+
}
|
|
254
|
+
catch (error) {
|
|
255
|
+
if (this.continueOnFail()) {
|
|
256
|
+
returnData.push({ json: { error: error.message }, pairedItem: i });
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
throw error;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return [returnData];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
exports.RelayShield = RelayShield;
|
|
266
|
+
// ---------------------------------------------------------------------------
|
|
267
|
+
// HTTP helpers
|
|
268
|
+
// ---------------------------------------------------------------------------
|
|
269
|
+
async function relayShieldPost(path, body, apiKey) {
|
|
270
|
+
const response = await fetch(`${API_BASE}${path}`, {
|
|
271
|
+
method: 'POST',
|
|
272
|
+
headers: {
|
|
273
|
+
'Content-Type': 'application/json',
|
|
274
|
+
'X-RS-API-KEY': apiKey,
|
|
275
|
+
},
|
|
276
|
+
body: JSON.stringify(body),
|
|
277
|
+
});
|
|
278
|
+
if (!response.ok) {
|
|
279
|
+
const text = await response.text();
|
|
280
|
+
throw new Error(`RelayShield API error ${response.status}: ${text}`);
|
|
281
|
+
}
|
|
282
|
+
return response.json();
|
|
283
|
+
}
|
|
284
|
+
async function relayShieldGet(pathWithQuery, apiKey) {
|
|
285
|
+
const response = await fetch(`${API_BASE}${pathWithQuery}`, {
|
|
286
|
+
method: 'GET',
|
|
287
|
+
headers: { 'X-RS-API-KEY': apiKey },
|
|
288
|
+
});
|
|
289
|
+
if (!response.ok) {
|
|
290
|
+
const text = await response.text();
|
|
291
|
+
throw new Error(`RelayShield API error ${response.status}: ${text}`);
|
|
292
|
+
}
|
|
293
|
+
return response.json();
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=RelayShield.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelayShield.node.js","sourceRoot":"","sources":["../../../nodes/RelayShield/RelayShield.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,MAAM,QAAQ,GAAG,6DAA6D,CAAC;AAE/E,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,6IAA6I;YAC1J,QAAQ,EAAE;gBACT,IAAI,EAAE,aAAa;aACnB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,gBAAgB;oBACtB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX,mEAAmE;gBACnE,qBAAqB;gBACrB,mEAAmE;gBACnE;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,cAAc;4BACpB,KAAK,EAAE,QAAQ;4BACf,WAAW,EAAE,0DAA0D;4BACvE,MAAM,EAAE,4CAA4C;yBACpD;wBACD;4BACC,IAAI,EAAE,oBAAoB;4BAC1B,KAAK,EAAE,SAAS;4BAChB,WAAW,EAAE,kEAAkE;4BAC/E,MAAM,EAAE,qDAAqD;yBAC7D;wBACD;4BACC,IAAI,EAAE,mBAAmB;4BACzB,KAAK,EAAE,aAAa;4BACpB,WAAW,EAAE,iEAAiE;4BAC9E,MAAM,EAAE,6CAA6C;yBACrD;wBACD;4BACC,IAAI,EAAE,uBAAu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QAC3D,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE;KACnC,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QAClB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-relayshield",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "n8n community node for RelayShield — breach detection, SIM swap monitoring, infostealer exposure, domain lookalike scanning, and threat intelligence IOC lookup.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"security",
|
|
8
|
+
"breach",
|
|
9
|
+
"sim-swap",
|
|
10
|
+
"infostealer",
|
|
11
|
+
"threat-intelligence",
|
|
12
|
+
"identity-protection"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://relayshield.net/developers",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "RelayShield LLC",
|
|
18
|
+
"email": "support@relayshield.net"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/nzdsf2-gif/relayshield.git",
|
|
23
|
+
"directory": "n8n-nodes-relayshield"
|
|
24
|
+
},
|
|
25
|
+
"main": "index.js",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc && cp nodes/RelayShield/relayshield.svg dist/nodes/RelayShield/relayshield.svg",
|
|
28
|
+
"dev": "tsc --watch",
|
|
29
|
+
"prepublishOnly": "npm run build"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"n8n": {
|
|
35
|
+
"n8nNodesApiVersion": 1,
|
|
36
|
+
"credentials": [
|
|
37
|
+
"dist/credentials/RelayShieldApi.credentials.js"
|
|
38
|
+
],
|
|
39
|
+
"nodes": [
|
|
40
|
+
"dist/nodes/RelayShield/RelayShield.node.js"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^20.19.43",
|
|
45
|
+
"n8n-core": "*",
|
|
46
|
+
"n8n-workflow": "^2.16.0",
|
|
47
|
+
"typescript": "^5.9.3"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"n8n-workflow": "*"
|
|
51
|
+
}
|
|
52
|
+
}
|