-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for #91 - new reporting api scan type
- Loading branch information
1 parent
9b8b988
commit 24b53ba
Showing
7 changed files
with
89 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = 'veracode_api_py' | ||
version = '0.9.55' | ||
version = '0.9.56' | ||
authors = [ {name = "Tim Jarrett", email="[email protected]"} ] | ||
description = 'Python helper library for working with the Veracode APIs. Handles retries, pagination, and other features of the modern Veracode REST APIs.' | ||
readme = 'README.md' | ||
|
@@ -22,4 +22,4 @@ dependencies = {file = ["requirements.txt"]} | |
[project.urls] | ||
"Homepage" = "https://github.com/veracode/veracode-api-py" | ||
"Bug Tracker" = "https://github.com/veracode/veracode-api-py/issues" | ||
"Download" = "https://github.com/veracode/veracode-api-py/archive/v_0955.tar.gz" | ||
"Download" = "https://github.com/veracode/veracode-api-py/archive/v_0956.tar.gz" |
This file contains 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,32 @@ | ||
import time | ||
import sys | ||
import json | ||
import datetime | ||
from veracode_api_py import Analytics | ||
|
||
wait_seconds = 15 | ||
|
||
print('Generating deleted scans report...') | ||
theguid = Analytics().create_report(report_type="deletedscans",deletion_start_date='2024-07-01',deletion_end_date='2024-12-31') | ||
|
||
print('Checking status for report {}...'.format(theguid)) | ||
thestatus,thescans=Analytics().get_deleted_scans(theguid) | ||
|
||
while thestatus != 'COMPLETED': | ||
print('Waiting {} seconds before we try again...'.format(wait_seconds)) | ||
time.sleep(wait_seconds) | ||
print('Checking status for report {}...'.format(theguid)) | ||
thestatus,thescans=Analytics().get_deleted_scans(theguid) | ||
|
||
recordcount = len(thescans) | ||
|
||
print('Retrieved {} scans'.format(recordcount)) | ||
|
||
if recordcount > 0: | ||
now = datetime.datetime.now().astimezone() | ||
filename = 'report-{}'.format(now) | ||
with open('{}.json'.format(filename), 'w') as outfile: | ||
json.dump(thescans,outfile) | ||
outfile.close() | ||
|
||
print('Wrote {} findings to {}.json'.format(recordcount,filename)) |
This file contains 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 |
---|---|---|
|
@@ -7,15 +7,15 @@ | |
setup( | ||
name = 'veracode_api_py', | ||
packages = ['veracode_api_py'], | ||
version = '0.9.54', | ||
version = '0.9.56', | ||
license='MIT', | ||
description = 'Python helper library for working with the Veracode APIs. Handles retries, pagination, and other features of the modern Veracode REST APIs.', | ||
long_description = long_description, | ||
long_description_content_type="text/markdown", | ||
author = 'Tim Jarrett', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/tjarrettveracode', | ||
download_url = 'https://github.com/veracode/veracode-api-py/archive/v_0955.tar.gz', | ||
download_url = 'https://github.com/veracode/veracode-api-py/archive/v_0956.tar.gz', | ||
keywords = ['veracode', 'veracode-api'], | ||
install_requires=[ | ||
'veracode-api-signing' | ||
|
This file contains 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
This file contains 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