-
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.
Merge pull request #96 from veracode/main
merge main into CMK branch
- Loading branch information
Showing
10 changed files
with
98 additions
and
23 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
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,5 @@ | ||
requests>=2.32.0 | ||
veracode-api-signing>=22.3.0 | ||
urllib3>= 2.2.2 | ||
veracode-api-signing>=24.11.0 | ||
Pygments>= 2.9.0 | ||
idna>=3.7 | ||
certifi>=2024.7.4 |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
long_description_content_type="text/markdown", | ||
author = 'Tim Jarrett', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/tjarrettveracode', | ||
url = 'https://github.com/tjarrettveracode', | ||
download_url = 'https://github.com/veracode/veracode-api-py/archive/v_0957.tar.gz', | ||
keywords = ['veracode', 'veracode-api'], | ||
install_requires=[ | ||
|
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
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