Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ jobs:
severity: HIGH,CRITICAL
exit-code: "1"
ignore-unfixed: true
# Without this, sarif output makes trivy scan at ALL severities and
# the exit code fires on ANY finding — the third v0.1.0 firing
# failed the lims image on a MEDIUM despite the H/C-only gate.
limit-severities-for-sarif: true

- name: Upload Trivy SARIF
if: always()
Expand Down
9 changes: 9 additions & 0 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ ENV NODE_ENV=production
ENV PORT=3012
ENV HOSTNAME=0.0.0.0

# Release-gate hardening (v0.1.0 Trivy findings):
# - upgrade the alpine base packages (libssl3/libcrypto3 HIGHs);
# - remove npm + corepack from the runtime: the standalone server never
# installs packages, and npm's BUNDLED node_modules (tar, sigstore,
# glob, minimatch, …) carried 16 HIGH/CRITICAL findings of their own.
RUN apk --no-cache upgrade && \
npm uninstall -g corepack || true && \
rm -rf /usr/local/lib/node_modules /usr/local/bin/npm /usr/local/bin/npx /opt/yarn*

# Run as a non-root user.
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
Expand Down
3 changes: 2 additions & 1 deletion apps/web/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading
Loading