-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (30 loc) · 1.02 KB
/
security.yml
File metadata and controls
36 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Security
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * 0" # Weekly on Sunday
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for secrets in documentation
run: |
# Check for common secret patterns in docs
if grep -r -E '(api_key|secret|password|token).*=.*["\047][A-Za-z0-9+/]{20,}' docs/ README.md || true; then
echo "Warning: Potential secrets found in documentation"
fi
- name: Check for hardcoded URLs with credentials
run: |
if grep -r -E 'https?://[^:]+:[^@]+@' docs/ README.md || true; then
echo "Warning: URLs with credentials found in documentation"
fi
- name: Verify no .env files committed
run: |
if find . -name ".env*" -not -path "./.git/*" -not -name ".env.example" | grep -q .; then
echo "Error: .env files should not be committed"
exit 1
fi