Skip to content

[Test] Test stabilization fixes for 3.16.1: patchibng, build-image no-internet, multi_az_fsx #12752

[Test] Test stabilization fixes for 3.16.1: patchibng, build-image no-internet, multi_az_fsx

[Test] Test stabilization fixes for 3.16.1: patchibng, build-image no-internet, multi_az_fsx #12752

name: Security Exclusions Checker
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
jobs:
security-exclusions-check:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-security-exclusions-check') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
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/${BASE_REF}...HEAD" | grep "^+" | grep -qP '\bnosec\b|\bnosemgrep\b'; then
echo "::error::Found nosec or nosemgrep annotations in added lines"
git diff "origin/${BASE_REF}...HEAD" | grep "^+" | grep -P '\bnosec\b|\bnosemgrep\b'
exit 1
fi