n8n-nodes-dragosplatform 0.1.9
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 +79 -0
- package/dist/credentials/DragosApi.credentials.d.ts +9 -0
- package/dist/credentials/DragosApi.credentials.js +54 -0
- package/dist/nodes/Dragos/Dragos.node.d.ts +5 -0
- package/dist/nodes/Dragos/Dragos.node.js +1354 -0
- package/dist/nodes/Dragos/dragos.png +0 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# n8n-nodes-dragos
|
|
2
|
+
|
|
3
|
+
This is an n8n community node for the [Dragos](https://www.dragos.com/) OT/ICS cybersecurity platform.
|
|
4
|
+
|
|
5
|
+
Dragos is the industrial cybersecurity leader, protecting critical infrastructure from cyber threats. This node allows you to integrate Dragos with your n8n workflows.
|
|
6
|
+
|
|
7
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
12
|
+
|
|
13
|
+
## Operations
|
|
14
|
+
|
|
15
|
+
### Asset
|
|
16
|
+
- **Get Many**: Retrieve multiple assets
|
|
17
|
+
- **Search**: Search assets with filters
|
|
18
|
+
- **Get Stats**: Get asset statistics grouped by field
|
|
19
|
+
- **Update Attributes**: Update asset attributes
|
|
20
|
+
- **Add Software Package**: Add a software package to an asset
|
|
21
|
+
|
|
22
|
+
### Notification
|
|
23
|
+
- **Get Many**: Retrieve notifications with FIQL filtering
|
|
24
|
+
- **Get**: Get a specific notification by ID
|
|
25
|
+
- **Update**: Update notifications matching a filter
|
|
26
|
+
- **Get Stats**: Get notification statistics
|
|
27
|
+
|
|
28
|
+
### Vulnerability
|
|
29
|
+
- **Get Many**: Retrieve vulnerabilities with pagination
|
|
30
|
+
- **Get Stats**: Get vulnerability statistics
|
|
31
|
+
- **Set State**: Enable/disable vulnerabilities
|
|
32
|
+
|
|
33
|
+
### Vulnerability Detection
|
|
34
|
+
- **Get Many**: Retrieve vulnerability detections
|
|
35
|
+
- **Get Stats**: Get detection statistics
|
|
36
|
+
- **Update**: Update vulnerability detections
|
|
37
|
+
- **Set Disposition**: Set disposition of detections
|
|
38
|
+
- **Export**: Export detections as CSV
|
|
39
|
+
|
|
40
|
+
### Data Import Job
|
|
41
|
+
- **Get Many**: List data import jobs
|
|
42
|
+
- **Get**: Get a specific job
|
|
43
|
+
- **Create**: Create a new import job
|
|
44
|
+
- **Continue**: Continue a paused job
|
|
45
|
+
- **Stop**: Stop a running job
|
|
46
|
+
- **Delete**: Delete a job
|
|
47
|
+
|
|
48
|
+
### Zone
|
|
49
|
+
- **Get Many**: List zones
|
|
50
|
+
- **Get**: Get a specific zone
|
|
51
|
+
- **Create**: Create a new zone
|
|
52
|
+
- **Update**: Update a zone
|
|
53
|
+
- **Delete**: Delete a zone
|
|
54
|
+
|
|
55
|
+
## Credentials
|
|
56
|
+
|
|
57
|
+
To use this node, you need to configure the Dragos API credentials:
|
|
58
|
+
|
|
59
|
+
1. **Base URL**: The URL of your Dragos instance (e.g., `https://portal.dragos.com`)
|
|
60
|
+
2. **API Key ID**: Your Dragos API Key ID
|
|
61
|
+
3. **API Key Secret**: Your Dragos API Key Secret
|
|
62
|
+
|
|
63
|
+
You can generate API keys in the Dragos platform under Settings > API Keys.
|
|
64
|
+
|
|
65
|
+
## Compatibility
|
|
66
|
+
|
|
67
|
+
This node has been tested with:
|
|
68
|
+
- n8n version 1.20+
|
|
69
|
+
- Dragos Platform API v4 (Assets), v2 (Notifications), v1 (Vulnerabilities, Auth, Data Import)
|
|
70
|
+
|
|
71
|
+
## Resources
|
|
72
|
+
|
|
73
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
74
|
+
- [Dragos Platform](https://www.dragos.com/)
|
|
75
|
+
- [Dragos API Documentation](https://portal.dragos.com/api/docs)
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class DragosApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DragosApi = void 0;
|
|
4
|
+
class DragosApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'dragosApi';
|
|
7
|
+
this.displayName = 'Dragos API';
|
|
8
|
+
this.documentationUrl = 'https://portal.dragos.com/api/docs';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Base URL',
|
|
12
|
+
name: 'baseUrl',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: 'https://portal.dragos.com',
|
|
15
|
+
placeholder: 'https://your-dragos-instance.com',
|
|
16
|
+
description: 'The base URL of your Dragos instance',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'API Key ID',
|
|
20
|
+
name: 'apiKeyId',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
description: 'The API Key ID for authentication',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'API Key Secret',
|
|
27
|
+
name: 'apiKeySecret',
|
|
28
|
+
type: 'string',
|
|
29
|
+
typeOptions: {
|
|
30
|
+
password: true,
|
|
31
|
+
},
|
|
32
|
+
default: '',
|
|
33
|
+
description: 'The API Key Secret for authentication',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
this.authenticate = {
|
|
37
|
+
type: 'generic',
|
|
38
|
+
properties: {
|
|
39
|
+
headers: {
|
|
40
|
+
'API-Key': '={{$credentials.apiKeyId}}',
|
|
41
|
+
'API-Secret': '={{$credentials.apiKeySecret}}',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
this.test = {
|
|
46
|
+
request: {
|
|
47
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
48
|
+
url: '/api/v1/authProvider',
|
|
49
|
+
method: 'GET',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.DragosApi = DragosApi;
|