Skip to content

[autosync]

[autosync] #11

Workflow file for this run

# ❣❣❣ DO NOT EDIT ❣ THIS FILE IS AUTOMATICALLY SYNCED ❣ DO NOT EDIT ❣❣❣
name: Security
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
emails:
name: Check commit emails
runs-on: ubuntu-latest
steps:
- name: 🔐 Checkout repository 🔐
uses: actions/checkout@v6
with:
# fetch all history so the workflow can find previous commits
fetch-depth: 0
- name: 🔐 Check commits 🔐
run: |
blacklisted_domains=(
"@gmail\.com"
"@yahoo\.com"
"@hotmail\.com"
"@outlook\.com"
"@aol\.com"
"@icloud\.com"
"@sasktel\.net"
)
blacklist_pattern=$(IFS="|"; echo "${blacklisted_domains[*]}")
insecure_emails=$(git log --format='%ae%n%ce' | sort -u | grep -E -i "$blacklist_pattern" || true)
if [ -n "$insecure_emails" ]; then
echo "❗ Found insecure email addresses in git history"
exit 1
fi
if [ -f .mailmap ]; then
insecure_emails_mailmap=$(grep -E -i "$blacklist_pattern" .mailmap | sort -u)
if [ -n "$insecure_emails_mailmap" ]; then
echo "❗ Found insecure email addresses in .mailmap"
exit 1
fi
fi