GitHub Security Audit — smartmur (2026-03-02)¶
Status: ALL 4 agents completed. Full audit across 10 repos.
CRITICAL FINDINGS (fix immediately)¶
Across ALL repos¶
- No branch protection on ANY repo — all 10 repos have unprotected default branches
k3s-cluster (3 critical)¶
pull_request_target+ write permissions independabot-automerge.yml— privilege escalation vectorcurl -sfL https://get.k3s.io | shinansible/playbook-k3s.yml— remote code execution riskStrictHostKeyChecking=noinscripts/00-create-proxmox-template.sh— MITM attack vector
homelab (13 critical)¶
- Branch protection DISABLED on
main+ auto-merge Dependabot = zero human review path pull_request_target+ write permissions independabot-automerge.yml- Hardcoded credentials in 6 docker-compose files: Keycloak (
SUPERsecret), Guacamole (root_pass), Code-Server (password), Gitea (gitea), Frigate (password), CrowdSec (placeholder API key) chmod 666 /var/run/docker.sockin Docker Swarm scripts — full host compromiseiptables -F+INPUT ACCEPTin swarm scripts — firewall completely disabledStrictHostKeyChecking noin swarm scriptscurl | shpattern in K3S deploy script
Forked repos (5 critical)¶
- Script injection in
smart-sync.yml(claude-code-tresor + skill-factory) —github.eventdata interpolated into bash with write permissions - Script injection in
pr-into-dev.yml(skill-factory) —github.head_refdirectly in bash = shell injection via branch name - Script injection in
claude-code-review.yml(skill-factory) — PR titles/labels in shell commands pull_request_target+ write inpr-decline.yml(design-os + agent-os)- Combined
contents: write+id-token: write+ unpinned actions in tresor/skill-factory
WARNING FINDINGS (fix soon)¶
Systematic across all repos¶
- Zero SHA-pinned GitHub Actions anywhere (all use mutable tags like @v4, @v6)
|| truesuppresses security scan failures in homelab CI- Missing
SECURITY.mdin homelab - Missing explicit
permissionsblocks in CI workflows - No concurrency control in most CI workflows
id-token: writeover-granted in tresor/skill-factory (6+ workflows)CLAUDE_CODE_OAUTH_TOKENpassed to unpinned third-party actions
homelab-specific warnings¶
- Grafana running as root (
user: "0") - Docker socket mounted in Authentik, Komodo, Telegraf
- Chrome remote debugging bound to
0.0.0.0:9222(Hoarder) - Monitoring ports (Prometheus 9090, InfluxDB 8086, Loki 3100) exposed without auth
- No
set -euo pipefailin shell scripts - Unquoted variables throughout shell scripts
- Hardcoded IPs everywhere
k3s-cluster warnings¶
- Hardcoded dev path
/Users/dre/Desktop/LABing/Projects/Notify - Kubeconfig written with mode 644 (should be 600)
- Hardcoded IPs in scripts/ansible
POSITIVE FINDINGS¶
k3s-cluster (above average security)¶
- Comprehensive
.gitignore(one of the best seen) - Custom
security_scrub.pypre-commit hook detect-private-keypre-commit hook- Dependabot for github-actions + terraform
- Branch protection enabled with required status checks
- No secrets exposed in repo
- All shell scripts use
set -euo pipefail
homelab (mixed)¶
- Strong
.gitignore, gitleaks config, pre-commit hooks .env.exampletemplates for some services- Some services use proper env var substitution with
${VAR:?required} no-new-privileges:truein several containers
Forked repos¶
- No committed secrets in any fork
.env.examplefiles all contain placeholders only
PRIORITY FIX ORDER¶
P0 — Today¶
- Enable branch protection on ALL 10 repos (most impactful single fix)
- Fix script injection in smart-sync.yml, pr-into-dev.yml, claude-code-review.yml
- Remove
chmod 666 /var/run/docker.sockfrom homelab swarm scripts - Remove
iptables -F+INPUT ACCEPTfrom swarm scripts
P1 — This week¶
- Pin all GitHub Actions to SHA hashes across all repos
- Replace
pull_request_targetwithpull_requestor add proper guards - Externalize hardcoded credentials in homelab docker-compose files to .env
- Fix
StrictHostKeyChecking=no→accept-neweverywhere - Remove
|| truefrom security scan steps - Add
permissions: contents: readto all CI workflows
P2 — Next week¶
- Add SECURITY.md to homelab
- Expand Dependabot to cover Docker images
- Add shellcheck to CI for shell-based repos
- Restrict exposed monitoring ports to localhost
- Quote all shell variables, add
set -euo pipefail
dotfiles (Grade: B+)¶
- CRITICAL:
pull_request_target+ write independabot-automerge.yml - WARNING: Actions pinned by tag not SHA, no permissions block in ci.yml, curl|sh for Homebrew
- GOOD: Excellent .gitignore, security_scrub.py, SECURITY.md, detect-private-key hook, clean shell configs
home_media (Grade: D+)¶
- CRITICAL: No .gitignore file at all — nothing prevents .env commits
- CRITICAL: No CI/CD workflows — zero automated testing/scanning
- CRITICAL: Docker socket mounted in tsdproxy + dockhand (host root equiv)
- CRITICAL: Termix (web terminal) + Dockhand (Docker UI) have zero authentication
- WARNING: All images use
:latesttags, no health checks, no resource limits, ports bound to 0.0.0.0 - GOOD: Tailscale-only architecture, secrets externalized to .env, read-only media mounts
FIX STATUS (all pushed)¶
| Repo | Commit | Branch | Fixes Applied |
|---|---|---|---|
| home_media | db1d631 |
master | .gitignore, CI workflows, dependabot |
| homelab | 490eddc |
main | docker.sock chmod removed, iptables -F removed, SSH StrictHostKeyChecking→accept-new, CI hardened, SECURITY.md added |
| k3s-cluster | cb402f4 |
main | Actions SHA-pinned, StrictHostKeyChecking→accept-new, CI permissions+concurrency |
| dotfiles | c942ebd |
main | Automerge fetch-metadata guard, Actions SHA-pinned, CI permissions |
| design-os | 6fbfdf1 |
main | pull_request_target→pull_request, input validation, Actions SHA-pinned |
| agent-os | ab75fa0 |
main | pull_request_target→pull_request, input validation, Actions SHA-pinned |
| claude-code-tresor | ee6032e |
main | Script injection fixed (5 workflows: smart-sync, claude-code-review, main-branch-guard, release-orchestrator, ci-quality-gate), Actions SHA-pinned (9 workflows) |
| claude-code-skill-factory | d5440d9 |
dev | Script injection fixed (7 workflows: smart-sync, pr-into-dev, claude-code-review, dev-to-main, release-orchestrator, ci-quality-gate, ci-commit-branch-guard), Actions SHA-pinned (17 workflows) |
Additional fixes (wave 2)¶
| Repo | Commit | Fixes |
|---|---|---|
| homelab | 688198d |
Externalized creds in 6 compose files (Keycloak, Guacamole, Code-Server, Gitea, Frigate, CrowdSec) + .env.example files |
| homelab | d19e600 |
Restricted Prometheus/InfluxDB/Loki/Headscale metrics to 127.0.0.1 |
| homelab | 7dbfa8b |
Added Docker image Dependabot |
| home_media | fd7bf00 |
Expanded Docker Dependabot to cover all compose dirs |
| k3s-cluster | 8e5fa71 |
Added Docker image Dependabot |
Branch protection (wave 3)¶
- [x] 10 repos protected: homelab, k3s-cluster, home_media, claude-code-skill-factory, claude-code-tresor, agent-os, design-os, dotfiles, Lighthouse-AI, Smoke
- [ ] 6 private repos blocked: claude-superpowers, hommie, zabbix_enchancement, vmware-audit, TrainingWheels, MurzDev_env — GitHub Free doesn't support branch protection on private repos (requires Pro)
Audit performed by Claude Code with 4 parallel research agents Fixes applied by 6 parallel fix agents across 2 sessions Completed: 2026-03-02