Skip to content

Commit d1604d4

Browse files
authored
Merge pull request #160 from britive/feature/org-scan-only
feature/org-scan-only
2 parents f86141e + 0676f09 commit d1604d4

4 files changed

Lines changed: 29 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Change Log (v2.8.1+)
22

3+
## v4.3.2 [2025-09-04]
4+
5+
__What's New:__
6+
7+
* None
8+
9+
__Enhancements:__
10+
11+
* Added `org_scan_only` parameter to `application_management.[applications|scans].scan` allowing organization only scans of Azure and GCP.
12+
13+
__Bug Fixes:__
14+
15+
* None
16+
17+
__Dependencies:__
18+
19+
* None
20+
21+
__Other:__
22+
23+
* None
24+
325
## v4.3.1 [2025-08-14]
426

527
__What's New:__

src/britive/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.3.1'
1+
__version__ = '4.3.2'

src/britive/application_management/applications.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def update(self, application_id: str, **kwargs) -> dict:
126126
data['propertyTypes'].append({'name': key, 'value': value, 'defaultValue': value})
127127
return self.britive.patch(f'{self.base_url}/{application_id}/properties', json=data)
128128

129-
def scan(self, application_id: str) -> dict:
129+
def scan(self, application_id: str, org_scan_only: bool = False) -> dict:
130130
"""
131131
Initiate a scan of the application.
132132
@@ -143,10 +143,11 @@ def scan(self, application_id: str) -> dict:
143143
where it is initiated.
144144
145145
:param application_id: The ID of the application to scan.
146+
:param org_scan_only: Optionally only scan the organization for Azure and GCP.
146147
:return: Details of the scan that was initiated.
147148
"""
148149

149-
return self.britive.application_management.scans.scan(application_id=application_id)
150+
return self.britive.application_management.scans.scan(application_id=application_id, org_scan_only=org_scan_only)
150151

151152
def delete(self, application_id: str) -> None:
152153
"""

src/britive/application_management/scans.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def __init__(self, britive) -> None:
33
self.britive = britive
44
self.base_url = f'{self.britive.base_url}/apps'
55

6-
def scan(self, application_id: str, environment_id: str = None) -> dict:
6+
def scan(self, application_id: str, environment_id: str = None, org_scan_only: bool = False) -> dict:
77
"""
88
Initiate a scan of the provided application and optionally provided environment.
99
@@ -18,12 +18,13 @@ def scan(self, application_id: str, environment_id: str = None) -> dict:
1818
1919
:param application_id: The ID of the application to scan.
2020
:param environment_id: Optionally the ID of the environment to scan.
21+
:param org_scan_only: Optionally only scan the organization for Azure and GCP.
2122
:return: Details of the scan that was initiated.
2223
"""
2324

2425
if environment_id:
2526
return self.britive.post(f'{self.base_url}/{application_id}/environments/{environment_id}/scans')
26-
return self.britive.post(f'{self.base_url}/{application_id}/scan')
27+
return self.britive.post(f'{self.base_url}/{application_id}/scan', params={'orgScanOnly': org_scan_only})
2728

2829
def status(self, task_id: str) -> dict:
2930
"""

0 commit comments

Comments
 (0)