Skip to content

Commit 0d16ab8

Browse files
authored
fix node install security issue
1 parent daf87d0 commit 0d16ab8

5 files changed

Lines changed: 56 additions & 2 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker
3+
{
4+
"name": "Docker in Docker",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
7+
8+
"features": {
9+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
10+
"version": "latest",
11+
"enableNonRootDocker": "true",
12+
"moby": "true"
13+
}
14+
}
15+
16+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
17+
// "forwardPorts": [],
18+
19+
// Use 'postCreateCommand' to run commands after the container is created.
20+
// "postCreateCommand": "docker --version",
21+
22+
// Configure tool-specific properties.
23+
// "customizations": {},
24+
25+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
26+
// "remoteUser": "root"
27+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Instructions: Add a subsection under `[Unreleased]` for additions, fixes, change
99

1010
## [Unreleased]
1111

12+
## [1.9] - 2026-02-04
13+
14+
### Fixed
15+
16+
- Node install caused the apt-get update to fail due to missing gpg key. Fixed by adding key manually.
17+
1218
## [1.8] - 2026-01-19
1319

1420
### Fixed

base/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ RUN apt-get update \
3939
ghostscript \
4040
gcc \
4141
build-essential \
42-
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
42+
ca-certificates \
43+
gnupg \
44+
&& NODE_MAJOR=22 \
45+
# Create a directory for the new repository's keyring, if it doesn't exist
46+
&& mkdir -p /etc/apt/keyrings \
47+
# Download the new repository's GPG key and save it in the keyring directory
48+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
49+
# Add the new repository's source list with its GPG key for package verification
50+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
51+
&& apt-get update \
4352
&& apt-get install -y --no-install-recommends nodejs \
4453
&& node -v \
4554
&& pip install pip --upgrade --no-cache-dir \

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8
1+
1.9

0 commit comments

Comments
 (0)