-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e12a687
commit b3427bc
Showing
7 changed files
with
76 additions
and
22 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
File renamed without changes
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 |
---|---|---|
|
@@ -13,7 +13,8 @@ | |
"variable": [ | ||
"^\\$\\w+", | ||
"^\\${\\w+", | ||
"=$" | ||
"=$", | ||
"\\$" | ||
], | ||
"masked": [ | ||
"MASKED" | ||
|
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from scanner import GitlabScanner | ||
import os | ||
|
||
# Common settings | ||
# URL and user token | ||
gitlab_private_token = '' | ||
gitlab_hostname = os.environ.get('gitlab_hostname', '') | ||
|
||
if not gitlab_private_token: | ||
print('You must set gitlab_private_token and gitlab_hostname as environment variables') | ||
exit(1) | ||
|
||
# How many pipelines should be checked per repository | ||
# Set 0 for unlimited count | ||
pipeline_count_to_check = int(os.environ.get('pipeline_count_to_check', 1)) | ||
check_for_false_positives = bool(os.environ.get('check_for_false_positives', True)) | ||
|
||
gitlab_scanner = GitlabScanner( | ||
gitlab_hostname=gitlab_hostname, | ||
gitlab_private_token=gitlab_private_token, | ||
check_for_false_positives=check_for_false_positives | ||
) | ||
|
||
print(f'First request to {gitlab_hostname}') | ||
|
||
trace = gitlab_scanner.get_all_job_traces(111, [1111111]) | ||
result = gitlab_scanner.find_sensitive_data(str(trace[0])) | ||
print(result) |