mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
chore: add security scanning workflows for PRs (#93)
* chore: add security scanning workflows for PRs - ShellCheck on bash scripts - CodeQL SAST for Python - pip-audit for requirements.txt CVEs - Docker Scout for Dockerfile vulnerabilities - Secret scanning config with path exclusions - SECURITY_SCANS.md documentation * fix: correct ShellCheck and Docker Scout action references in CI - Replace nonexistent ludeeus/shellicopter with direct shellcheck install+run - Update docker/scout-action@v0 to @v0.2.0 - Use select:critical instead of hardcoded alpine:latest image for repo Dockerfiles --------- Co-authored-by: Wicked Yoda <noreply@users.noreply.github.com>
This commit is contained in:
1 parent
39c943f945
commit
8328eb1bae
4 files changed
+156
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# Security Scanning
|
||||
|
||||
This repository runs automated security scans on every pull request to `main`.
|
||||
|
||||
## What's Scanned
|
||||
|
||||
| Scan | Tool | Frequency | What It Checks |
|
||||
|------|------|-----------|----------------|
|
||||
| Secret Scanning | GitHub Secret Scanning | On push/PR + push protection | Detects leaked credentials, API keys, tokens in code, issues, PRs, wikis |
|
||||
| ShellCheck | `ludeeus/shellicopter` (via `actions/checkout`) | On every PR/push | Security + linting issues in `.sh` scripts |
|
||||
| CodeQL | GitHub CodeQL | On every PR/push | SAST for Python — detects injection, hardcoded secrets, insecure code patterns |
|
||||
| Python Dependencies | `pip-audit` | On every PR/push | Known CVEs in `requirements.txt` files |
|
||||
| Docker Images | Docker Scout | On every PR/push | Critical CVEs in Dockerfiles |
|
||||
|
||||
## Workflow Files
|
||||
|
||||
- `.github/workflows/security-scans.yml` — ShellCheck, pip-audit, Docker Scout
|
||||
- `.github/workflows/codeql.yml` — CodeQL SAST analysis
|
||||
- `.github/secret_scanning.yml` — Exclusions for secret scanning
|
||||
|
||||
## Enabling Secret Scanning & Push Protection
|
||||
|
||||
1. Go to **Settings** → **Advanced Security** → **Enable** "Secret Protection"
|
||||
2. Enable **"Push protection"** under Secret Protection
|
||||
3. Optionally enable:
|
||||
- **Non-provider patterns** — detect private keys, connection strings
|
||||
- **Validity checks** — verify if detected secrets are still active
|
||||
|
||||
## Failing Builds
|
||||
|
||||
When a security scan fails on a PR, GitHub will post check results directly on the PR. All contributors must address security findings before the PR can be merged (enforced via branch protection rules on `main`).
|
||||
Reference in new issue
Block a user