Skip to content
Draft
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
7 changes: 6 additions & 1 deletion tails/javascript-bun.tail.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ WORKDIR /bot
ARG MAIN_FILE
ENV MAIN_FILE=${MAIN_FILE}

ARG STABLE_CA
ENV STABLE_CA=${STABLE_CA}

RUN echo "${STABLE_CA}" > /home/bun/stable.crt

RUN bun install
CMD bun run ${MAIN_FILE}
CMD NODE_EXTRA_CA_CERTS=/home/bun/stable.crt bun run ${MAIN_FILE}
7 changes: 6 additions & 1 deletion tails/javascript-deno.tail.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ WORKDIR /bot
ARG MAIN_FILE=index.ts
ENV MAIN_FILE=${MAIN_FILE}

ARG STABLE_CA
ENV STABLE_CA=${STABLE_CA}

RUN echo "${STABLE_CA}" > /stable.crt
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The certificate file is being written to the root directory without proper validation. If STABLE_CA is empty or malformed, this could create an invalid certificate file that fails silently. Consider adding validation to check if STABLE_CA is set and contains valid certificate data before writing the file, or make the certificate optional by conditionally writing it only when STABLE_CA is provided.

Copilot uses AI. Check for mistakes.

RUN deno install
CMD deno ${MAIN_FILE}
CMD deno run --cert /stable.crt ${MAIN_FILE}