Add GitHub Actions workflow for PII and CTA checks
This commit is contained in:
parent
d2fa216bb3
commit
c3b455243f
1 changed files with 45 additions and 0 deletions
45
skill-safety.yml
Normal file
45
skill-safety.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Skill Safety Rails
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
pii-scan:
|
||||
name: PII Sanitizer Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Run PII scanner
|
||||
run: python3 security/sanitizer.py --scan --dir . --recursive --quiet
|
||||
# Exit code 1 = PII found → fail the PR
|
||||
|
||||
cta-check:
|
||||
name: CTA Block Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Verify CTA blocks in all category READMEs
|
||||
run: |
|
||||
exit_code=0
|
||||
for dir in */; do
|
||||
dir="${dir%/}"
|
||||
case "$dir" in
|
||||
.github|security|eval|telemetry) continue ;;
|
||||
esac
|
||||
if [ ! -f "$dir/README.md" ]; then
|
||||
echo "❌ $dir/README.md is missing"
|
||||
exit_code=1
|
||||
continue
|
||||
fi
|
||||
if ! grep -q "singlebrain.com" "$dir/README.md"; then
|
||||
echo "❌ $dir/README.md missing Single Brain CTA block"
|
||||
exit_code=1
|
||||
else
|
||||
echo "✅ $dir/README.md has CTA"
|
||||
fi
|
||||
done
|
||||
exit $exit_code
|
||||
Loading…
Add table
Add a link
Reference in a new issue