Implement Security changes#2
Merged
Merged
Conversation
…x compose env - add package-lock.json, stop ignoring it, switch Dockerfile to npm ci for reproducible builds - SHA-pin all GitHub Actions (checkout, login, build-push, trivy, delete-package-versions) - docker-compose: drop unused WEB_USERNAME/WEB_PASSWORD, add required SECRET_KEY
- .gitleaks.toml: extend defaults + rules for media API keys, SECRET_KEY, OIDC client_secret
- allowlist placeholders, lockfile hashes, compose ${VAR}; stopword for frontend JS FP
- .github/workflows/gitleaks.yml: SHA-pinned scan on push + PR, full history
- README: document local + CI secret scanning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Security hardening from a review of the build and supply chain. No app logic
changes. Reproducible builds, pinned CI, and secret scanning, plus a fix to the
stale compose file.
What changed
Reproducible dependency builds
package-lock.json(was gitignored) and remove it from.gitignore.npm ciinstead ofnpm install, so builds install theexact pinned tree and fail if the lockfile and
package.jsondrift.Pin GitHub Actions to commit SHAs
actions/checkout,docker/login-action,docker/build-push-action,aquasecurity/trivy-action, andactions/delete-package-versionsare pinnedto full commit SHAs with the version kept as a trailing comment.
would run attacker code in a job that holds
packages: writeand theGITHUB_TOKEN. Pinning removes that path.Secret scanning (gitleaks)
.gitleaks.toml: extends the default ruleset and adds rules for mediaAPI keys (Tautulli, Sonarr, Jellyfin),
SECRET_KEY, and OIDC client secrets.The allowlist covers
.env.example,package-lock.jsonintegrity hashes,documented placeholders, and
${VAR}compose interpolation..github/workflows/gitleaks.yml: scans on push and pull request with fullhistory, and fails the build on a leak. Pinned to a commit SHA.
docker-compose cleanup
WEB_USERNAMEandWEB_PASSWORD, which the app no longer reads.SECRET_KEY. Without it the container exits on startup, sothe committed compose file would not have run as written.
Testing
npm ci --omit=devresolves cleanly against the new lockfile (0 advisories).expected
git ls-remote.Not included
The webhook endpoint is still open by default (no secret required when
webhook_secretis blank). That is a deliberate design choice for the LANdeployment and is left for a separate discussion.