Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/security_exclusions_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
with:
fetch-depth: 0
- name: Check for nosec/nosemgrep in added lines
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
if git diff origin/${{ github.event.pull_request.base.ref }}...HEAD | grep "^+" | grep -qP '\bnosec\b|\bnosemgrep\b'; then
if git diff "origin/${BASE_REF}...HEAD" | grep "^+" | grep -qP '\bnosec\b|\bnosemgrep\b'; then
echo "::error::Found nosec or nosemgrep annotations in added lines"
git diff origin/${{ github.event.pull_request.base.ref }}...HEAD | grep "^+" | grep -P '\bnosec\b|\bnosemgrep\b'
git diff "origin/${BASE_REF}...HEAD" | grep "^+" | grep -P '\bnosec\b|\bnosemgrep\b'
exit 1
fi
6 changes: 4 additions & 2 deletions .github/workflows/unsafe_patterns_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
with:
fetch-depth: 0
- name: Check for disallowed URL suffixes in added lines
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
if git diff origin/${{ github.event.pull_request.base.ref }}...HEAD | grep "^+" | grep -qP 'amazonaws\.com|amazonaws\.com\.cn|c2s\.ic\.gov|sc2s\.sgov\.gov'; then
if git diff "origin/${BASE_REF}...HEAD" | grep "^+" | grep -qP 'amazonaws\.com|amazonaws\.com\.cn|c2s\.ic\.gov|sc2s\.sgov\.gov'; then
echo "::error::Found disallowed URL suffixes in added lines"
git diff origin/${{ github.event.pull_request.base.ref }}...HEAD | grep "^+" | grep -P 'amazonaws\.com|amazonaws\.com\.cn|c2s\.ic\.gov|sc2s\.sgov\.gov'
git diff "origin/${BASE_REF}...HEAD" | grep "^+" | grep -P 'amazonaws\.com|amazonaws\.com\.cn|c2s\.ic\.gov|sc2s\.sgov\.gov'
exit 1
fi
Loading