[semgrep] Fix multiline commit message, false positive on ipv6 addresses and the name Mary (#27015)

This commit is contained in:
cd rubin 2025-12-09 15:41:56 +00:00 committed by GitHub
parent 32bac1c906
commit fa92a0d435
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -31,7 +31,7 @@ jobs:
- name: Configure
run: |
git config --global --add safe.directory $PWD
echo "COMMIT_MESSAGE='$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }} | sed "s/\"/'/g")'" | tee /dev/stderr >> "$GITHUB_ENV"
echo "COMMIT_MESSAGE='$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }} | sed "s/\"/'/g" | tr "\n" " ") '" | tee /dev/stderr >> "$GITHUB_ENV"
echo "(if the last commit message contains '[skip style guide checks]' Semgrep style guide rule checks will be skipped)"
# Semgrep CI to run on Schedule (Cron) or Manual Dispatch

View file

@ -37,7 +37,7 @@ rules:
- "/.semgrep/**"
- "/.github/**"
patterns:
- pattern-regex: "Jan|Feb|Mar[^k]|Apr|May[^b]|Jun[^k]|Jul|Aug|Sep|Nov|Dec[^i]"
- pattern-regex: "Jan|Feb|Mar[ c]|Apr|May[ \\.]|Jun[ e]|Jul|Aug|Sep|Nov|Dec[ e]"
- id: style-guide-potential-date-year
languages: [generic]
@ -58,4 +58,5 @@ rules:
- "/.github/**"
patterns:
# ignore 2xxx- with a - at the end (double-escape because in string and not a range operator!)
- pattern-regex: "20[0-9][0-9][^\\-]"
# ignore 200!:: as part of IPv6 address
- pattern-regex: "20[0-9][0-9][^\\-:]"