Skip to content

Commit 34db73f

Browse files
authored
Merge branch 'CrowdStrike:dev' into dev
2 parents 753b952 + 258bcc0 commit 34db73f

112 files changed

Lines changed: 7428 additions & 2164 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/wordlist.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,3 +1836,11 @@ pipenv
18361836
STIX
18371837
jayy
18381838
Prajapati
1839+
TestParserFromTemplate
1840+
CloneParser
1841+
Configs
1842+
configs
1843+
combinedqueryinstalledpatches
1844+
combinedQueryInstalledPatches
1845+
vratiskol
1846+
JSONDecodeError

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.pyc
33
*.swp
44
*.egg
5+
.idea/*
56
env/
67
.venv/
78
.eggs/

CHANGELOG.md

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,188 @@
1+
# Version 1.6.2
2+
## Added features and functionality
3+
+ Added: New __Network Scan Global Configs__ service collection with two operations.
4+
- _get_global_configs_
5+
- _update_global_configs_
6+
- `_endpoint/__init__.py`
7+
- `_endpoint/_network_scan_global_configs.py`
8+
- `_payload/__init__.py`
9+
- `_payload/_network_scan_global_configs.py`
10+
- `__init__.py`
11+
- `network_scan_global_configs.py`
12+
> Unit testing expanded to complete code coverage.
13+
- `tests/test_network_scan_global_configs.py`
14+
15+
+ Added: New __Network Scan Scan Run Reports__ service collection with one operation.
16+
- _get_scan_run_reports_
17+
- `_endpoint/__init__.py`
18+
- `_endpoint/_network_scan_scan_run_reports.py`
19+
- `__init__.py`
20+
- `network_scan_scan_run_reports.py`
21+
> Unit testing expanded to complete code coverage.
22+
- `tests/test_network_scan_scan_run_reports.py`
23+
24+
+ Added: New __Network Scan Scan Runs__ service collection with five operations.
25+
- _aggregate_scan_runs_
26+
- _get_scan_runs_
27+
- _create_scan_runs_
28+
- _update_scan_runs_
29+
- _query_scan_runs_
30+
- `_endpoint/__init__.py`
31+
- `_endpoint/_network_scan_scan_runs.py`
32+
- `_payload/__init__.py`
33+
- `_payload/_network_scan_scan_runs.py`
34+
- `__init__.py`
35+
- `network_scan_scan_runs.py`
36+
> Unit testing expanded to complete code coverage.
37+
- `tests/test_network_scan_scan_runs.py`
38+
39+
+ Added: New __Network Scan Scanners__ service collection with four operations.
40+
- _aggregate_scanners_
41+
- _get_scanners_
42+
- _update_scanners_
43+
- _query_scanners_
44+
- `_endpoint/__init__.py`
45+
- `_endpoint/_network_scan_scanners.py`
46+
- `_payload/__init__.py`
47+
- `_payload/_network_scan_scanners.py`
48+
- `__init__.py`
49+
- `network_scan_scanners.py`
50+
> Unit testing expanded to complete code coverage.
51+
- `tests/test_network_scan_scanners.py`
52+
53+
+ Added: New __Network Scan Templates__ service collection with six operations.
54+
- _get_template_configs_
55+
- _get_templates_
56+
- _create_templates_
57+
- _update_templates_
58+
- _delete_templates_
59+
- _query_templates_
60+
- `_endpoint/__init__.py`
61+
- `_endpoint/_network_scan_templates.py`
62+
- `_payload/__init__.py`
63+
- `_payload/_network_scan_templates.py`
64+
- `__init__.py`
65+
- `network_scan_templates.py`
66+
> Unit testing expanded to complete code coverage.
67+
- `tests/test_network_scan_templates.py`
68+
69+
+ Added: New __Network Scan Networks__ service collection with six operations.
70+
- _aggregate_networks_
71+
- _get_networks_
72+
- _create_networks_
73+
- _update_networks_
74+
- _delete_networks_
75+
- _query_networks_
76+
- `_endpoint/__init__.py`
77+
- `_endpoint/_network_scan_networks.py`
78+
- `_payload/__init__.py`
79+
- `_payload/_network_scan_networks.py`
80+
- `__init__.py`
81+
- `network_scan_networks.py`
82+
> Unit testing expanded to complete code coverage.
83+
- `tests/test_network_scan_networks.py`
84+
85+
+ Added: New __Network Scan Scans__ service collection with six operations.
86+
- _aggregate_scans_
87+
- _get_scans_
88+
- _create_scans_
89+
- _update_scans_
90+
- _delete_scans_
91+
- _query_scans_
92+
- `_endpoint/__init__.py`
93+
- `_endpoint/_network_scan_scans.py`
94+
- `_payload/__init__.py`
95+
- `_payload/_network_scan_scans.py`
96+
- `__init__.py`
97+
- `network_scan_scans.py`
98+
> Unit testing expanded to complete code coverage.
99+
- `tests/test_network_scan_scans.py`
100+
101+
+ Added: New __Network Scan Zones__ service collection with seven operations.
102+
- _aggregate_zones_
103+
- _combined_zones_
104+
- _get_zones_
105+
- _create_zones_
106+
- _update_zones_
107+
- _delete_zones_
108+
- _query_zones_
109+
- `_endpoint/__init__.py`
110+
- `_endpoint/_network_scan_zones.py`
111+
- `_payload/__init__.py`
112+
- `_payload/_network_scan_zones.py`
113+
- `__init__.py`
114+
- `network_scan_zones.py`
115+
> Unit testing expanded to complete code coverage.
116+
- `tests/test_network_scan_zones.py`
117+
118+
+ Added: New __Network Scan__ parent service collection aggregating all eight Network Scan sub-services via multiple inheritance.
119+
- `__init__.py`
120+
- `network_scan.py`
121+
122+
+ Added: Added one new operation to the __Spotlight Vulnerabilities__ service collection.
123+
- _combinedQueryInstalledPatches_
124+
- `_endpoint/_spotlight_vulnerabilties.py`
125+
- `spotlight_vulnerabilities.py`
126+
> Unit testing expanded to complete code coverage.
127+
- `tests/test_spotlight_vulnerabilities.py`
128+
- Thanks to @vratiskol for their contribution!
129+
130+
+ Added: Added two new operations to the __NGSIEM__ service collection.
131+
- _CloneParser_
132+
- _TestParserFromTemplate_
133+
- `_endpoint/_ngsiem.py`
134+
- `_endpoint/deprecated/_ngsiem.py`
135+
- `_payload/__init__.py`
136+
- `_payload/_ngsiem.py`
137+
- `ngsiem.py`
138+
> Unit testing expanded to complete code coverage.
139+
- `tests/test_ngsiem.py`
140+
141+
+ Added: Added `device_policies.data-protection.applied`, `device_policies.data-protection.policy_id`, `device_policies.data-protection.policy_type`, `device_policies.data-protection-cloud.applied`, `device_policies.data-protection-cloud.policy_id`, `device_policies.data-protection-cloud.policy_type`, `device_policies.network-scan-content.applied`, `device_policies.network-scan-content.policy_id`, and `device_policies.network-scan-content.policy_type` as allowed filter and sort fields in the _CombinedHiddenDevicesByFilter_, _QueryDevicesByFilter_, and _QueryDevicesByFilterScroll_ operations within the __Hosts__ service collection.
142+
- `_endpoint/_hosts.py`
143+
- `_endpoint/deprecated/_hosts.py`
144+
- `hosts.py`
145+
146+
+ Added: Added `multi_arch` as an allowed filter keyword in the _AggregateImageCountByBaseOS_, _AggregateImageCountByState_, _AggregateImageCount_, _GetCombinedImages_, _CombinedImageByVulnerabilityCount_, _CombinedImageDetail_, and _ReadCombinedImagesExport_ operations within the __Container Images__ service collection.
147+
- `_endpoint/_container_images.py`
148+
- `container_images.py`
149+
150+
+ Updated: Updated available FQL filter fields documentation in the _combinedQueryVulnerabilities_ operation within the __Spotlight Vulnerabilities__ service collection.
151+
- `_endpoint/_spotlight_vulnerabilities.py`
152+
- `_endpoint/deprecated/_spotlight_vulnerabilities.py`
153+
- `spotlight_vulnerabilities.py`
154+
155+
+ Updated: Updated available sort fields documentation in the _query_scheduled_scans_ operation within the __ODS__ service collection.
156+
- `_endpoint/_ods.py`
157+
- `_endpoint/deprecated/_ods.py`
158+
- `ods.py`
159+
160+
## Issues resolved
161+
+ Fixed: JSONDecodeError import bug.
162+
- `util/_functions.py`
163+
- `util/_auth.py`
164+
165+
+ Fixed: Added missing parameters `is_enabled` and `host_groups` to the _entities_policy_patch_v2_ operation from the __Data Protection Configuration__ service collection.
166+
- `_payload/_data_protection_configuration.py`
167+
- `data_protection_configuration.py`
168+
169+
+ Fixed: Added backward compatibility for `file` and `lookup_file` parameters. Closes #1372.
170+
- `ngsiem.py`
171+
> Unit testing updated to reflect modified operations.
172+
- `tests/test_ngsiem.py`
173+
174+
+ Fixed: Fixed `case_id` and `description` not being sent as form data in the _upload_file_ operation within the __Case Management__ service collection. Closes #1445.
175+
- `case_management.py`
176+
177+
+ Fixed: Added missing `anomaly`, `guardrail_notifications`, `mitre_attack`, and `template_id` parameters to the correlation rules payload builder. List parameters now accept comma-delimited strings or lists. Closes #1450.
178+
- `_payload/_correlation_rules.py`
179+
180+
+ Fixed: Added missing `facet` keyword argument documentation to the _query_combined_hosts_ operation within the __Discover__ service collection. Closes #1382.
181+
- `discover.py`
182+
183+
+ Fixed: Fixed _upload_file_ operation in the __NGSIEM__ service collection not returning the file ID on successful upload.
184+
- `ngsiem.py`
185+
1186
# Version 1.6.1
2187
## Added features and functionality
3188
+ Added: New __Admission Control Policies__ service collection with 15 operations.
@@ -170,6 +355,12 @@
170355
> Unit testing expanded to complete code coverage.
171356
- `tests/test_cloud_policies.py`
172357

358+
+ Removed: Removed `GetCSPMGCPUserScriptsAttachment` operation from the __D4CRegistration__ service collection.
359+
360+
+ Removed: Removed `GetCombinedImages` operation from the __FalconContainer__ service collection.
361+
362+
+ Removed: Removed `getCombinedAssessmentsQuery` operation from the __ZeroTrustAssessment__ service collection.
363+
173364
+ Added: Added `rule_category`, `rule_cloneable`, `rule_compliance_benchmark_uuid`, `rule_resource_type_name`, and `rule_risk_factor` as allowed filter and sort fields in the _QueryRules_ operation within the __Cloud Policies__ service collection.
174365
- `_endpoint/_cloud_policies.py`
175366
- `cloud_policies.py`

samples/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The following samples are categorized by CrowdStrike product, and further catego
9494
| Topic | Samples |
9595
| :-- | :-- |
9696
| [Asset Management (Discover)](#asset-management-samples) | List discovered hosts<BR/>Spyglass |
97-
| [Vulnerability Management (Spotlight)](#vulnerability-management-samples) | Find vulnerable hosts by CVE ID<BR/>CISA DHS Known Exploited Vulnerabilities<BR/>Spotlight Quick Report |
97+
| [Vulnerability Management (Spotlight)](#vulnerability-management-samples) | Find vulnerable hosts by CVE ID<BR/>CISA DHS Known Exploited Vulnerabilities<BR/>Query installed patches<BR/>Spotlight Quick Report |
9898

9999
<a id="fusion-and-foundry-toc"></a>
100100

@@ -1750,6 +1750,7 @@ These samples discuss leveraging the CrowdStrike Spotlight Evaluation Logic and
17501750

17511751
- [Find vulnerable hosts by CVE ID](#find-vulnerable-hosts-by-cve-id)
17521752
- [CISA DHS Known Exploited Vulnerabilities](#cisa-dhs-known-exploited-vulnerabilities)
1753+
- [Query installed patches](#query-installed-patches)
17531754
- [Spotlight Quick Report](#spotlight-quick-report)
17541755

17551756
#### Find vulnerable hosts by CVE ID
@@ -1782,6 +1783,20 @@ This sample demonstrates the following CrowdStrike Spotlight Vulnerability API o
17821783

17831784
---
17841785

1786+
#### Query installed patches
1787+
In this [example](spotlight#query-installed-patches) we demonstrate retrieving installed patch data from Spotlight and printing the JSON response.
1788+
1789+
[![Spotlight Vulnerabilities](https://img.shields.io/badge/Service%20Class-Spotlight_Installed_Patches-silver?style=for-the-badge&labelColor=C30A16&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAOCAYAAAAi2ky3AAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw1AUhU9TpaIVBzuIOGSoDmJBVEQ3rUIRKoRaoVUHk5f+CE0akhQXR8G14ODPYtXBxVlXB1dBEPwBcXNzUnSREu9LCi1ifPB4H+e9c7jvXkColZhmtY0Cmm6bqURczGRXxNAruhAEMI1hmVnGrCQl4bu+7hHg512MZ/m/+3N1qzmLAQGReIYZpk28Tjy5aRuc94kjrCirxOfEIyYVSPzIdcXjN84FlwWeGTHTqTniCLFYaGGlhVnR1IgniKOqplO+kPFY5bzFWStVWKNO/sNwTl9e4jrtASSwgEVIEKGggg2UYCNGp06KhRTdx338/a5fIpdCrg0wcsyjDA2y6wefwe/eWvnxMS8pHAfaXxznYxAI7QL1quN8HztO/QQIPgNXetNfrgFTn6RXm1r0COjZBi6um5qyB1zuAH1PhmzKrsTnL+TzwPsZjSkL9N4Cnate3xr3OH0A0tSr5A1wcAgMFSh7zeffHa19+/dNo38/hq9yr+iELI0AAAAGYktHRAAAAAAAAPlDu38AAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQflDAsTByz7Va2cAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAAYBJREFUKM+lkjFIlVEYht/zn3sFkYYUyUnIRcemhCtCU6JQOLiIU+QeJEQg6BBIm0s4RBCBLjq5OEvgJC1uOniJhivesLx17/97/vO9b4NK4g25157hfHCGB773/cA0HZIEAKiMj+LWiOxljG/i96pnCFP58XHnrWX2+9cj0dYl9Yu2FE9/9rXrcAAgs2eSyiBfOe/XRD503h/CuffOubQVUXL+Jh9BllzBbyJJBgDclVkO4Kukd8zzkXJbeUljIldFTstsmSHM6S81ma2KfPKlFdkGAMY4wzx/bbXapMy21My+YizdKNq5mDzLkrxafSxySFKjSWX2oTmjKzz4vN0r2lOFcL/Q3V0/mX95ILMXTTGYVfaut/aP2+oCMAvnZgCcsF5fcR0dg65YHAdwB+QApADvu0AuOe/ftlJAD7Nsgmm6yBjDtfWORJZlNtFyo/lR5Z7MyheKA5ktSur7sTAHazSG27pehjAiaVfkN8b4XFIJ/wOzbOx07VNRUuHy7w98CzCcGPyWywAAAABJRU5ErkJggg==)](spotlight#query-installed-patches)
1790+
1791+
##### Spotlight Vulnerabilities API operations discussed
1792+
This sample demonstrates the following CrowdStrike Spotlight Vulnerability API operations:
1793+
1794+
| Operation | Description |
1795+
| :--- | :--- |
1796+
| [combinedQueryInstalledPatches](https://www.falconpy.io/Service-Collections/Spotlight-Vulnerabilities.html#combinedqueryinstalledpatches) | Get installed patch records for hosts by providing a FQL filter and paging details. |
1797+
1798+
---
1799+
17851800
#### Spotlight Quick Report
17861801
In this [example](spotlight#spotlight-quick-report) we demonstrate generating a report of CVE matches within a Falcon tenant using the Spotlight and Hosts service collections.
17871802

samples/spotlight/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The examples within this folder focus on leveraging CrowdStrike's Falcon Spotlig
88

99
- [Identify hosts with vulnerabilities by CVE](#identify-hosts-with-vulnerabilities-by-cve)
1010
- [CISA Known exploited vulnerabilities](CISA_known_exploited_vulns)
11+
- [Query installed patches](#query-installed-patches)
1112
- [Spotlight Quick Report](#spotlight-quick-report)
1213

1314
## Identify hosts with vulnerabilities by CVE
@@ -183,6 +184,49 @@ optional arguments:
183184
### Example source code
184185
The source code for this example can be found [here](find_hosts_by_cve.py).
185186
187+
## Query installed patches
188+
Retrieve Falcon Spotlight installed patch records and output the JSON response structure.
189+
190+
### Running the program
191+
In order to run this demonstration, you will need access to CrowdStrike API keys with the following scopes:
192+
193+
| Service Collection | Scope |
194+
| :---- | :---- |
195+
| Spotlight Vulnerabilities | __READ__ |
196+
197+
### Execution syntax
198+
The following command will query installed patch data with the specified FQL filter.
199+
200+
#### Basic usage
201+
```shell
202+
python3 spotlight_installed_patches.py -k $FALCON_CLIENT_ID -s $FALCON_CLIENT_SECRET -f "hostname:'my-hostname'"
203+
```
204+
205+
#### Saving output to file
206+
```shell
207+
python3 spotlight_installed_patches.py -k $FALCON_CLIENT_ID -s $FALCON_CLIENT_SECRET -f "hostname:'my-hostname'" -o installed_patches.json
208+
```
209+
210+
#### Retrieving all pages
211+
```shell
212+
python3 spotlight_installed_patches.py -k $FALCON_CLIENT_ID -s $FALCON_CLIENT_SECRET -f "hostname:'my-hostname'" -a
213+
```
214+
215+
#### Sorting and limiting
216+
```shell
217+
python3 spotlight_installed_patches.py -k $FALCON_CLIENT_ID -s $FALCON_CLIENT_SECRET -f "hostname:'my-hostname'" --sort "hostname|asc" -l 200
218+
```
219+
220+
#### Command-line help
221+
Command-line help is available via the `-h` argument.
222+
223+
```shell
224+
python3 spotlight_installed_patches.py -h
225+
```
226+
227+
### Example source code
228+
The source code for this example can be found [here](spotlight_installed_patches.py).
229+
186230
## Spotlight Quick Report
187231
Produce a quick report of CVE vulnerabilities discovered within your Falcon tenant.
188232

0 commit comments

Comments
 (0)