Repository navigation
fix(security): add image healthcheck and seccomp profile - #15
Merged
Merged
Conversation
- Dockerfile: HEALTHCHECK using the built-in --healthcheck probe (DS-0026) - Helm: RuntimeDefault seccomp profile on the pod (KSV-0030, KSV-0104) - Security workflow: run on push to main instead of weekly schedule
A request for //evil.com where a /evil.com directory exists was redirected to the protocol-relative //evil.com/, sending browsers off-site. Redirect to a relative, escaped target instead so http.Redirect resolves and cleans it against the request path. Flagged by gosec G710 in golangci-lint v2.14.
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.
Addresses open Trivy code scanning alerts and the gosec G710 lint failure.
HEALTHCHECKthat runs the existing/webdav-server --healthcheckprobe (scratch image has no shell/curl). Closes DS-0026. Verified locally: container reportshealthy.seccompProfile.type: RuntimeDefaulton the pod security context. Closes KSV-0030 and KSV-0104.maininstead of the weekly cron;workflow_dispatchand the existing concurrency group are kept.GET //evil.com(with an/evil.comdirectory present) redirected to the protocol-relative//evil.com/. The trailing-slash redirect now uses a relative, escaped target thathttp.Redirectresolves and cleans. Fixes the gosec G710 failure that golangci-lint v2.14 reports on every PR. Covered by a newdirlist_test.go.Remaining alerts were dismissed on GitHub (false positives, or won't-fix for the UID/GID > 10000 rules).