-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - bitdefender_gravityzone #16730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
components/bitdefender_gravityzone/actions/get-policy-details/get-policy-details.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import bitdefender from "../../bitdefender_gravityzone.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "bitdefender_gravityzone-get-policy-details", | ||
| name: "Get Policy Details", | ||
| description: "Retrieve details about a specific policy. [See the documentation](https://www.bitdefender.com/business/support/en/77209-135304-getpolicydetails.html)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| bitdefender, | ||
| policyId: { | ||
| propDefinition: [ | ||
| bitdefender, | ||
| "policyId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.bitdefender.getPolicyDetails({ | ||
| $, | ||
| data: { | ||
| params: { | ||
| policyId: this.policyId, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved details for policy ${this.policyId}`); | ||
| return response; | ||
| }, | ||
| }; | ||
31 changes: 31 additions & 0 deletions
31
components/bitdefender_gravityzone/actions/get-scan-task-status/get-scan-task-status.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import bitdefender from "../../bitdefender_gravityzone.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "bitdefender_gravityzone-get-scan-task-status", | ||
| name: "Get Scan Task Status", | ||
| description: "Get the status of a scan task. [See the documentation(https://www.bitdefender.com/business/support/en/77209-440638-gettaskstatus.html)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| bitdefender, | ||
| taskId: { | ||
| propDefinition: [ | ||
| bitdefender, | ||
| "taskId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.bitdefender.getTaskStatus({ | ||
| $, | ||
| data: { | ||
| params: { | ||
| taskId: this.taskId, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved status for task ${this.taskId}`); | ||
| return response; | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
40 changes: 40 additions & 0 deletions
40
components/bitdefender_gravityzone/actions/move-endpoint-to-group/move-endpoint-to-group.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import bitdefender from "../../bitdefender_gravityzone.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "bitdefender_gravityzone-move-endpoint-to-group", | ||
| name: "Move Endpoint to Group", | ||
| description: "Move an endpoint to a different group. [See the documentation](https://www.bitdefender.com/business/support/en/77209-128489-moveendpoints.html)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| bitdefender, | ||
| endpointId: { | ||
| propDefinition: [ | ||
| bitdefender, | ||
| "endpointId", | ||
| ], | ||
| }, | ||
| groupId: { | ||
| propDefinition: [ | ||
| bitdefender, | ||
| "groupId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.bitdefender.moveEndpointToGroup({ | ||
| $, | ||
| data: { | ||
| params: { | ||
| endpointIds: [ | ||
| this.endpointId, | ||
| ], | ||
| groupId: this.groupId, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully moved endpoint ${this.endpointId} to group ${this.groupId}`); | ||
| return response; | ||
| }, | ||
| }; |
112 changes: 112 additions & 0 deletions
112
components/bitdefender_gravityzone/actions/scan-endpoint/scan-endpoint.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| import bitdefender from "../../bitdefender_gravityzone.app.mjs"; | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| key: "bitdefender_gravityzone-scan-endpoint", | ||
| name: "Scan Endpoint", | ||
| description: "Trigger a scan on a specific endpoint. [See the documentation](https://www.bitdefender.com/business/support/en/77209-128495-createscantask.html)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| bitdefender, | ||
| endpointId: { | ||
| propDefinition: [ | ||
| bitdefender, | ||
| "endpointId", | ||
| ], | ||
| }, | ||
| scanType: { | ||
| type: "integer", | ||
| label: "Scan Type", | ||
| description: "Type of scan to perform", | ||
| options: [ | ||
| { | ||
| label: "Quick Scan", | ||
| value: 1, | ||
| }, | ||
| { | ||
| label: "Full Scan", | ||
| value: 2, | ||
| }, | ||
| { | ||
| label: "Memory Scan", | ||
| value: 3, | ||
| }, | ||
| { | ||
| label: "Custom Scan", | ||
| value: 4, | ||
| }, | ||
| ], | ||
| }, | ||
| name: { | ||
| type: "string", | ||
| label: "Name", | ||
| description: "The name of the task. If the parameter is not passed, the name will be automatically generated.", | ||
| optional: true, | ||
| }, | ||
| returnAllTaskIds: { | ||
| type: "boolean", | ||
| label: "Return All Task IDs", | ||
| description: "Indicates if the response will contain the IDs for all the tasks created as a result of the request", | ||
| optional: true, | ||
| }, | ||
| scanDepth: { | ||
| type: "integer", | ||
| label: "Scan Depth", | ||
| description: "The scan profile", | ||
| options: [ | ||
| { | ||
| label: "Aggressive", | ||
| value: 1, | ||
| }, | ||
| { | ||
| label: "Normal", | ||
| value: 2, | ||
| }, | ||
| { | ||
| label: "Permissivearray", | ||
| value: 3, | ||
| }, | ||
| ], | ||
| optional: true, | ||
| }, | ||
| scanPath: { | ||
| type: "string[]", | ||
| label: "Scan Path", | ||
| description: "The list of target paths to be scanned", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| if ((this.scanDepth || this.scanPath) && this.scanType !== 4) { | ||
| throw new ConfigurationError("Scan depth and path can only be used for custom scans"); | ||
| } | ||
|
|
||
| if ((this.scanDepth && !this.scanPath) || (this.scanPath && !this.scanDepth)) { | ||
| throw new ConfigurationError("Scan depth and path must be used together"); | ||
| } | ||
|
|
||
| const response = await this.bitdefender.scanEndpoint({ | ||
| $, | ||
| data: { | ||
| params: { | ||
| targetIds: [ | ||
| this.endpointId, | ||
| ], | ||
| type: this.scanType, | ||
| name: this.name, | ||
| returnAllTaskIds: this.returnAllTaskIds, | ||
| customScanSettings: this.scanDepth | ||
| ? { | ||
| scanDepth: this.scanDepth, | ||
| scanPath: this.scanPath, | ||
| } | ||
| : undefined, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully initiated ${this.scanType} scan on endpoint ${this.endpointId}`); | ||
| return response; | ||
| }, | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.