Skip to content

Commit

Permalink
chore: Implemented review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
EnturWilhelm committed Oct 16, 2024
1 parent 1a96d1f commit 57dd869
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/code-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ jobs:
except IOError:
pass
if allowlist == False:
print(f'::notice ::Local allowlist file not found, skipping remaining steps')
print(f'::notice ::Allowlist file not found in current repository, skipping remaining steps')
if external_repository != '':
headers = {
Expand Down Expand Up @@ -421,11 +421,11 @@ jobs:
pass
if data == '':
print('::error ::Local allowlist file not found')
print('::error ::Allowlist file not found')
sys.exit(1)
if not v.validate(data):
print(f'::error ::Local allowlist file is invalid. Here are the errors: {v.errors}')
print(f'::error ::Allowlist file is invalid. Here are the errors: {v.errors}')
sys.exit(1)
if os.getenv('GHA_SECURITY_CODE_SCAN_EXTERNAL_ALLOWLIST') == 'True':
Expand All @@ -434,7 +434,7 @@ jobs:
with open(os.path.join(_file_location, 'external_codescan.yml'), 'r') as f:
data = yaml.safe_load(f)
except IOError:
print('::error ::External allowlist file not found, this should not ever happen')
print('::error ::Cached copy of external allowlist file not found')
sys.exit(1)
if not v.validate(data):
print(f'::error ::External allowlist file is invalid. Here are the errors: {v.errors}')
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
pass
if allowlist == False:
print(f'::notice ::Local allowlist file not found, skipping remaining steps')
print(f'::notice ::Allowlist file not found in current repository, skipping remaining steps')
if external_repository != '':
headers = {
Expand Down Expand Up @@ -159,11 +159,11 @@ jobs:
except IOError:
pass
if data == '':
print('::error ::Local allowlist file not found')
print('::error ::Allowlist file not found')
sys.exit(1)
if not v.validate(data):
print(f'::error ::Local allowlist file is invalid. Here are the errors: {v.errors}')
print(f'::error ::Allowlist file is invalid. Here are the errors: {v.errors}')
sys.exit(1)

if os.getenv('GHA_SECURITY_DOCKER_SCAN_EXTERNAL_ALLOWLIST') == 'True':
Expand All @@ -172,7 +172,7 @@ jobs:
with open(os.path.join(_file_location, 'external_dockerscan.yml'), 'r') as f:
data = yaml.safe_load(f)
except IOError:
print('::error ::External allowlist file not found, this should not ever happen')
print('::error ::Cached copy of external allowlist file not found')
sys.exit(1)
if not v.validate(data):
print(f'::error ::External allowlist file is invalid. Here are the errors: {v.errors}')
Expand Down

0 comments on commit 57dd869

Please sign in to comment.