From ccfbbaa33657cb7de64b07389d29e08439bb3f81 Mon Sep 17 00:00:00 2001 From: Xuanqi He Date: Wed, 27 Nov 2024 11:16:37 -0500 Subject: [PATCH] Add bad url suffix check --- .github/workflows/unsafe_patterns_checker.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/unsafe_patterns_checker.yml diff --git a/.github/workflows/unsafe_patterns_checker.yml b/.github/workflows/unsafe_patterns_checker.yml new file mode 100644 index 00000000..12d1beba --- /dev/null +++ b/.github/workflows/unsafe_patterns_checker.yml @@ -0,0 +1,15 @@ +name: Unsafe Patterns Checker +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] + +jobs: + # Prevent bad URL suffix + bad-url-suffix-check: + runs-on: ubuntu-latest + steps: + - name: Check PR for Disallowed URL Suffixes + uses: francesco-giordano/gh-pr-content-checker@v1.0.0 + with: + diffDoesNotContainRegex: "amazonaws\\.com|amazonaws\\.com\\.cn|c2s\\.ic\\.gov|sc2s\\.sgov\\.gov" + skipLabels: skip-bad-url-suffix-check