Skip to content
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

Tenable Export Scan #28146

Merged
merged 108 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
2ef163f
init
jlevypaloalto Jul 13, 2023
0c2cc8f
list-scan-filters init
jlevypaloalto Jul 13, 2023
deb6b26
list-scan-history init
jlevypaloalto Jul 13, 2023
1646ac5
export-scan init
jlevypaloalto Jul 13, 2023
2a6caa3
added yml for list-filters
jlevypaloalto Jul 15, 2023
cb7e4ae
refactoring
jlevypaloalto Jul 16, 2023
8087864
yml version 1.0
jlevypaloalto Jul 16, 2023
94ab4b3
fixed sortField bug
jlevypaloalto Jul 17, 2023
3bb8e9c
added defaultValue for filterSearchType
jlevypaloalto Jul 17, 2023
afe9960
update output for export file
jlevypaloalto Jul 17, 2023
a276ec4
remove gitlab
jlevypaloalto Jul 17, 2023
8f0829b
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 17, 2023
9534f3a
improved yml
jlevypaloalto Jul 17, 2023
f54ec3c
added test playbook
jlevypaloalto Jul 17, 2023
d3ab9e7
safe_get_json to get_json
jlevypaloalto Jul 17, 2023
3d7c6e3
added descriptions to yml
jlevypaloalto Jul 17, 2023
67e8db4
added user-agent to older commands
jlevypaloalto Jul 18, 2023
a5caefa
unit-tests init
jlevypaloalto Jul 18, 2023
8c55b68
RN + docs
jlevypaloalto Jul 18, 2023
172a550
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 18, 2023
9399b7d
unit-tests complete
jlevypaloalto Jul 20, 2023
ba4bc26
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 20, 2023
6f785f0
fixed tests
jlevypaloalto Jul 22, 2023
3fe5b46
updated docker
jlevypaloalto Jul 22, 2023
32da1b9
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 22, 2023
f007567
CR changes part 1
jlevypaloalto Jul 23, 2023
186401b
CR changes part 2
jlevypaloalto Jul 23, 2023
db0002e
temp
jlevypaloalto Jul 23, 2023
cbdf11f
temp
jlevypaloalto Jul 23, 2023
2f36933
client: first test
jlevypaloalto Jul 24, 2023
4db4220
client: working
jlevypaloalto Jul 24, 2023
34a3261
paginate version 1
jlevypaloalto Jul 25, 2023
5b383b6
update readme,yml,tests
jlevypaloalto Jul 25, 2023
9210671
update readme,yml
jlevypaloalto Jul 25, 2023
52dab4b
tests almost complete
jlevypaloalto Jul 25, 2023
2fd8749
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 25, 2023
a0cbf96
tests complete
jlevypaloalto Jul 25, 2023
781ae14
added tests
jlevypaloalto Jul 26, 2023
af41e37
added tests
jlevypaloalto Jul 26, 2023
670f544
added tec-docs to paginate
jlevypaloalto Jul 26, 2023
56ee142
CR changes part 3
jlevypaloalto Jul 26, 2023
790234d
fixed tests
jlevypaloalto Jul 26, 2023
60cb26b
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 26, 2023
dc1df37
CR changes part 4
jlevypaloalto Jul 26, 2023
5d70138
updated docker
jlevypaloalto Jul 26, 2023
d74d71a
Merged master into current branch.
Jul 27, 2023
63440ee
Bump pack from version Tenable_io to 2.1.11.
Jul 27, 2023
37a5c49
reformatted paginate
jlevypaloalto Jul 30, 2023
117aad5
Demo changes
jlevypaloalto Jul 30, 2023
ed8f5ce
merged test playbooks
jlevypaloalto Jul 30, 2023
57e1827
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 30, 2023
88ba072
Demo changes part 2
jlevypaloalto Jul 31, 2023
8bc8726
Demo changes part 3; added args to list-filters
jlevypaloalto Jul 31, 2023
a5fdbd7
remove args from list-filters
jlevypaloalto Jul 31, 2023
5735f9e
remove args from list-filters 2
jlevypaloalto Jul 31, 2023
679d03c
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Jul 31, 2023
fe79d98
added descriptions
jlevypaloalto Aug 1, 2023
3bd0482
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 1, 2023
9733970
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 1, 2023
8ecb666
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 1, 2023
aaca6bd
fixed unit-tests KeyError
jlevypaloalto Aug 1, 2023
c08bf60
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 2, 2023
424845c
Merged master into current branch.
Aug 6, 2023
f781b16
Bump pack from version Tenable_io to 2.1.12.
Aug 6, 2023
3ca1e55
Demo changes part 4; added descrptions
jlevypaloalto Aug 6, 2023
055f5c1
Demo changes part 4; added filter arg
jlevypaloalto Aug 6, 2023
539eb92
Demo changes part 5; added filter arg
jlevypaloalto Aug 6, 2023
1221392
Demo changes part 6; added filter arg in TPB
jlevypaloalto Aug 6, 2023
f381f7e
Demo changes part 7; added link for filter arg
jlevypaloalto Aug 6, 2023
f76d724
updated docker
jlevypaloalto Aug 6, 2023
4fb421e
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 7, 2023
c3396cd
fixed build_filter's comment
jlevypaloalto Aug 7, 2023
62ef4fd
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 8, 2023
5f10d94
improved filter parsing
jlevypaloalto Aug 9, 2023
3734b23
add filter limitation to description
jlevypaloalto Aug 9, 2023
59bceab
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 9, 2023
7ae8149
updated docker
jlevypaloalto Aug 9, 2023
4d78c0d
fixed scan TPB
jlevypaloalto Aug 10, 2023
0b74143
fixed tpb
jlevypaloalto Aug 10, 2023
e607c4a
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 10, 2023
81b59d1
removed flaky checks from TPB
jlevypaloalto Aug 13, 2023
7e95157
updated docker
jlevypaloalto Aug 13, 2023
88a30b6
test: unmock TPBs
jlevypaloalto Aug 13, 2023
514ec70
removed new TPB
jlevypaloalto Aug 13, 2023
35f39c9
revert: 'test: unmock TPBs'
jlevypaloalto Aug 13, 2023
4f13fcf
fixed docs
jlevypaloalto Aug 14, 2023
e6b5f83
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 14, 2023
603c1b0
test; remove demisto.results
jlevypaloalto Aug 14, 2023
8104f92
Revert 'test; remove demisto.results'
jlevypaloalto Aug 15, 2023
0c2d4a5
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 15, 2023
9ccfaff
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 16, 2023
7ccf6e2
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 17, 2023
e61bec9
fixed TPB
jlevypaloalto Aug 17, 2023
fd7ed35
test; table in error response
jlevypaloalto Aug 18, 2023
043b079
revert: 'test; table in error response'
jlevypaloalto Aug 18, 2023
1c3ca92
cosmetic changes
jlevypaloalto Aug 18, 2023
4eb2f83
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 20, 2023
28aa1ca
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 20, 2023
c8d38bc
TPB on quick scan
jlevypaloalto Aug 21, 2023
2eba53b
TPB timeout fix
jlevypaloalto Aug 21, 2023
4543d97
TPB launch in unallowed status fix
jlevypaloalto Aug 21, 2023
5e47cf7
TPB launch in unallowed status fix
jlevypaloalto Aug 21, 2023
8d66dc6
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 21, 2023
423da16
TPB
jlevypaloalto Aug 22, 2023
1af70f9
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 22, 2023
7dfd867
TPB
jlevypaloalto Aug 22, 2023
0956848
extended timeout
jlevypaloalto Aug 22, 2023
58c7e74
Merge branch 'master' into jl-tenable-export-scan
jlevypaloalto Aug 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 240 additions & 0 deletions Packs/Tenable_io/Integrations/Tenable_io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ This integration was integrated and tested with January 2023 release of Tenable.
| tenable-io-get-asset-details | BASIC [16] user permissions. |
| tenable-io-export-assets | ADMINISTRATOR [64] user permissions. |
| tenable-io-export-vulnerabilities | ADMINISTRATOR [64] user permissions. |
| tenable-io-list-scan-filters | BASIC [16] user permissions |
| tenable-io-get-scan-history | SCAN OPERATOR [24] user permissions and CAN VIEW [16] scan permissions |
| tenable-io-export-scan | SCAN OPERATOR [24] user permissions and CAN VIEW [16] scan permissions |




## Concurrency Limits
Expand Down Expand Up @@ -1355,3 +1360,238 @@ When inserting invalid arguments, an error message could be returned.
>|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
>| fake_uuid | 1.1.1.1 | 1.1.1.1 | Linux Kernel 3.13 on Ubuntu 14.04 (trusty) | general-purpose | fqdn | info | 00000 | Name | | | TCP | 22 | 2024-11-07T11:11:05.906Z | 2024-11-07T11:11:05.906Z | Description | N/A |
>| fake_uuid | 1.3.2.1 | 1.3.2.1 | Nutanix | general-purpose | fqdn | info | 00000 | Name | | | TCP | 0 | 2024-11-07T11:11:05.906Z | 2024-11-07T11:11:05.906Z | Description | N/A |
### tenable-io-list-scan-filters

***
Lists the filtering, sorting, and pagination capabilities available for scan records on endpoints/commands that support them.

#### Base Command

`tenable-io-list-scan-filters`

#### Input

---
There are no inputs for this command.

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| TenableIO.ScanFilter.name | String | The name of the scan filter. |
| TenableIO.ScanFilter.readable_name | String | The readable name of the scan filter. |
| TenableIO.ScanFilter.control.type | String | The type of control associated with the scan filter. |
| TenableIO.ScanFilter.control.regex | String | The regular expression used by the scan filter. |
| TenableIO.ScanFilter.control.readable_regex | String | An example expression that the filter's regular expression would match. |
| TenableIO.ScanFilter.operators | String | The operators available for the scan filter. |
| TenableIO.ScanFilter.group_name | String | The group name associated with the scan filter. |

#### Command example
```!tenable-io-list-scan-filters```
#### Context Example
```json
{
"TenableIO": {
"ScanFilter": [
{
"control": {
"readable_regex": "01234567-abcd-ef01-2345-6789abcdef01",
"regex": "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}(,[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})*",
"type": "entry"
},
"group_name": null,
"name": "host.id",
"operators": [
"eq",
"neq",
"match",
"nmatch"
],
"readable_name": "Asset ID"
},
{
"control": {
"maxlength": 18,
"readable_regex": "NUMBER",
"regex": "^[0-9]+(,[0-9]+)*",
"type": "entry"
},
"group_name": null,
"name": "plugin.attributes.bid",
"operators": [
"eq",
"neq",
"match",
"nmatch"
],
"readable_name": "Bugtraq ID"
}
]
}
}
```

#### Human Readable Output

>### Tenable IO Scan Filters
>|Filter name|Filter Readable name|Filter Control type|Filter regex|Readable regex|Filter operators|
>|---|---|---|---|---|---|
>| host.id | Asset ID | entry | [0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}(,[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})* | 01234567-abcd-ef01-2345-6789abcdef01 | eq,<br/>neq,<br/>match,<br/>nmatch |
>| plugin.attributes.bid | Bugtraq ID | entry | ^[0-9]+(,[0-9]+)* | NUMBER | eq,<br/>neq,<br/>match,<br/>nmatch |

### tenable-io-get-scan-history

***
Lists the individual runs of the specified scan.

#### Base Command

`tenable-io-get-scan-history`

#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| scanId | The ID of the scan of which to get the runs. | Required |
| sortFields | A comma-separated list of fields by which to sort, in the order defined by "sortOrder". Possible values are: start_date, end_date, status. | Optional |
| sortOrder | A comma-separated list of direction(s) in which to sort the fields defined by "sortFields".<br/>If multiple directions are chosen, they will be sequentially matched with "sortFields".<br/>If only one direction is chosen it will be used to sort all values in "sortFields".<br/>For example:<br/> If sortFields is "start_date,status" and sortOrder is "asc,desc",<br/> then start_date is sorted in ascending order and status in descending order.<br/> If sortFields is "start_date,status" and sortOrder is simply "asc",<br/> then both start_date and status are sorted in ascending order.<br/>. Possible values are: asc, desc. Default is asc. | Optional |
| excludeRollover | Whether to exclude rollover scans from the scan history. Possible values are: true, false. Default is false. | Optional |
| page | The page number of scan records to retrieve (used for pagination) starting from 1. The page size is defined by the "pageSize" argument. | Optional |
| pageSize | The number of scan records per page to retrieve (used for pagination). The page number is defined by the "page" argument. | Optional |
| limit | The maximum number of records to retrieve. If "pageSize" is defined, this argument is ignored. Default is 50. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| TenableIO.ScanHistory.time_end | Number | The end time of the scan. |
| TenableIO.ScanHistory.scan_uuid | String | The UUID (Universally Unique Identifier) of the scan. |
| TenableIO.ScanHistory.id | Number | The ID of the scan history. |
| TenableIO.ScanHistory.is_archived | Boolean | Indicates whether the scan is archived or not. |
| TenableIO.ScanHistory.time_start | Number | The start time of the scan. |
| TenableIO.ScanHistory.visibility | String | The visibility of the scan. |
| TenableIO.ScanHistory.targets.custom | Boolean | Indicates whether custom targets were used in the scan. |
| TenableIO.ScanHistory.targets.default | Boolean | Indicates whether the default targets were used in the scan. |
| TenableIO.ScanHistory.status | String | The status of the scan. |

#### Command example
```!tenable-io-get-scan-history scanId=16 excludeRollover=true sortFields=end_date,status sortOrder=desc page=2 pageSize=4```
#### Context Example
```json
{
"TenableIO": {
"ScanHistory": [
{
"id": 17235445,
"is_archived": true,
"reindexing": null,
"scan_uuid": "69a55b8e-0d52-427a-81e0-7dfe4dc6eda6",
"status": "completed",
"targets": {
"custom": null,
"default": false
},
"time_end": 1677425182,
"time_start": 1677424566,
"visibility": "public"
},
{
"id": 17235342,
"is_archived": true,
"reindexing": null,
"scan_uuid": "2c592d52-df56-42e0-9f18-d892bdeb1e18",
"status": "completed",
"targets": {
"custom": null,
"default": false
},
"time_end": 1677424556,
"time_start": 1677423906,
"visibility": "public"
},
{
"id": 17235033,
"is_archived": true,
"reindexing": null,
"scan_uuid": "44586b4f-1051-415c-b375-db86f6bd8c13",
"status": "completed",
"targets": {
"custom": null,
"default": false
},
"time_end": 1677423865,
"time_start": 1677423247,
"visibility": "public"
},
{
"id": 17234969,
"is_archived": true,
"reindexing": null,
"scan_uuid": "06c12bf7-436f-489d-bb04-aae511ea9f5c",
"status": "completed",
"targets": {
"custom": null,
"default": false
},
"time_end": 1677423205,
"time_start": 1677422585,
"visibility": "public"
}
]
}
}
```

#### Human Readable Output

>### Tenable IO Scan History
>|History id|History uuid|Status|Is archived|Targets default|Visibility|Time start|Time end|
>|---|---|---|---|---|---|---|---|
>| 17235445 | 69a55b8e-0d52-427a-81e0-7dfe4dc6eda6 | completed | true | false | public | 1677424566 | 1677425182 |
>| 17235342 | 2c592d52-df56-42e0-9f18-d892bdeb1e18 | completed | true | false | public | 1677423906 | 1677424556 |
>| 17235033 | 44586b4f-1051-415c-b375-db86f6bd8c13 | completed | true | false | public | 1677423247 | 1677423865 |
>| 17234969 | 06c12bf7-436f-489d-bb04-aae511ea9f5c | completed | true | false | public | 1677422585 | 1677423205 |

### tenable-io-export-scan

***
Export and download a scan report.
Scan results older than 35 days are supported in Nessus and CSV formats only.
Scans that are actively running cannot be exported (run "tenable-io-list-scans" to view scan statuses)


#### Base Command

`tenable-io-export-scan`

#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| scanId | The identifier for the scan to export. Run the "tenable-io-list-scans" command to get all available scans. | Required |
| historyId | The unique identifier of the historical data to export. Run the "tenable-io-get-scan-history" command to get history IDs. | Optional |
| historyUuid | The UUID of the historical data to export. Run the "tenable-io-get-scan-history" command to get history UUIDs. | Optional |
| format | The file format to export the scan in. Scans can be export in the HTML and PDF formats for up to 35 days.<br/> For scans that are older than 35 days, only the Nessus and CSV formats are supported.<br/> The "chapters" argument must be defined if the chosen format is HTML or PDF.<br/> Possible values are: Nessus, HTML, PDF, CSV. Default is CSV. | Optional |
| chapters | A comma-separated list of chapters to include in the export. This argument is required if the file format is PDF or HTML. Possible values are: vuln_hosts_summary, vuln_by_host, compliance_exec, remediations, vuln_by_plugin, compliance. | Optional |
| filter | A comma-separated list of filters, in the format of "name quality value" to apply to the exported scan report.<br/>Example: "port.protocol eq tcp, plugin_id eq 1234567"<br/>Note: when used literally, commas and spaces should be escaped. (i.e. "\\\\," for comma and "\\\\s" for space)<br/>Run "tenable-io-list-scan-filters" to get all available filters, ("Filter name" (name), "Filter operators" (quality) and "Readable regex" (value) in response).<br/>For more information: https://developer.tenable.com/docs/scan-export-filters-tio | Optional |
| filterSearchType | For multiple filters, specifies whether to use the AND or the OR logical operator. Possible values are: AND, OR. Default is AND. | Optional |
| assetId | The ID of the asset scanned. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| InfoFile.Size | number | The size of the file in bytes. |
| InfoFile.Name | string | The name of the file. |
| InfoFile.EntryID | string | The War Room entry ID of the file. |
| InfoFile.Info | string | The format and encoding of the file. |
| InfoFile.Type | string | The type of the file. |
| InfoFile.Extension | unknown | The file extension of the file. |

#### Command example
```!tenable-io-export-scan scanId=16 format=HTML chapters="compliance_exec,remediations,vuln_by_plugin" historyId=19540157 historyUuid=f7eaad37-23bd-4aac-a979-baab0e9a465b filterSearchType=OR filter="port.protocol eq tcp, plugin_id eq 1234567" assetId=10```
#### Human Readable Output

>Preparing scan report:

>Returned file: scan_16_SSE-144f3dc6-cb2d-42fc-b6cc-dd20b807735f-html.html [Download](https://www.paloaltonetworks.com/cortex)
Loading