Repository navigation
Fix CodeQL easy wins: missing-await + Dockerfile HEALTHCHECK - #173
Merged
Merged
Conversation
1. site-settings.controller.ts: getFooterLinks() returned the unresolved Promise (Promise || [] is always truthy → '|| []' fallback was dead code). Now properly awaited so [] fallback works when there are no footer links. 2. Dockerfile: add HEALTHCHECK pointing at the backend Terminus /health endpoint (port 4000). 30s interval, 5s timeout, 30s start period, 3 retries. Satisfies Trivy DS-0026 and gives Docker/K8s/Compose a proper liveness signal.
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
Part of the pre-launch CodeQL cleanup. Two small fixes that close two real alerts.
1. `packages/backend/src/settings/site-settings.controller.ts`
`getFooterLinks()` returned the unresolved Promise — `Promise || []` is always truthy so the `|| []` fallback was dead code. Now properly awaited so the empty-array fallback works.
Closes CodeQL alert #72 (`js/missing-await`).
2. `Dockerfile`
Added `HEALTHCHECK` pointing at the backend Terminus `/health` endpoint (port 4000). 30s interval, 5s timeout, 30s start period, 3 retries.
Closes CodeQL alert #3 (`DS-0026`) and gives Docker/K8s/Compose a proper liveness signal.
Test plan
Companion work (separate, not in this PR)