Skip to content

Commit 82a7870

Browse files
nicktrnTrigger.dev RepoOps
authored andcommitted
fix(supervisor): distrust the compromised emSign CAs
Mono-RevId: ba5ac3f785512fdde799f2cd954c8f15c25ecfd2
1 parent 39483a7 commit 82a7870

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: supervisor
3+
type: fix
4+
---
5+
6+
The supervisor no longer trusts certificates issued under the compromised emSign (eMudhra) certificate authorities.

‎apps/supervisor/Containerfile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ FROM base AS runner
4545
ENV NODE_ENV production
4646

4747
COPY --from=builder /prod/supervisor /app/apps/supervisor
48+
COPY --chown=node:node docker/scripts/distrust-cas.cjs /app/scripts/distrust-cas.cjs
49+
COPY --chown=node:node --chmod=755 apps/supervisor/entrypoint.sh /app/entrypoint.sh
50+
ENV NODE_OPTIONS=--require=/app/scripts/distrust-cas.cjs
4851

4952
EXPOSE 8000
5053
USER node
5154

5255
# ensure pnpm is installed during build and not silently downloaded at runtime
5356
RUN pnpm -v
5457

55-
CMD [ "/usr/bin/dumb-init", "--", "pnpm", "run", "--filter", "supervisor", "start"]
58+
ENTRYPOINT [ "/app/entrypoint.sh" ]
59+
CMD [ "pnpm", "run", "--filter", "supervisor", "start"]

‎apps/supervisor/entrypoint.sh‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
set -e
3+
4+
case " ${NODE_OPTIONS:-} " in
5+
*" --require=/app/scripts/distrust-cas.cjs "*) ;;
6+
*) export NODE_OPTIONS="--require=/app/scripts/distrust-cas.cjs${NODE_OPTIONS:+ $NODE_OPTIONS}" ;;
7+
esac
8+
9+
exec /usr/bin/dumb-init -- "$@"

0 commit comments

Comments
 (0)