Skip to content

Commit b138705

Browse files
Alexandru-Cezar Sardanalsrdn
authored andcommitted
devctr: mark firecracker source dir safe for git
This difference in ownership is validated against by git. https://github.blog/2022-04-12-git-security-vulnerability-announced/ Signed-off-by: Alexandru-Cezar Sardan <[email protected]>
1 parent a33d3c5 commit b138705

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

tools/devctr/Dockerfile.aarch64

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,7 @@ RUN mkdir "$TMP_BUILD_DIR" && cd "$TMP_BUILD_DIR" \
129129
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION_TAG}/tini-static-arm64 /sbin/tini
130130
RUN chmod +x /sbin/tini
131131

132+
ADD tools/devctr/ctr_gitconfig /root/.gitconfig
133+
132134
WORKDIR "$FIRECRACKER_SRC_DIR"
133135
ENTRYPOINT ["/sbin/tini", "--"]

tools/devctr/Dockerfile.x86_64

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,7 @@ RUN mkdir "$TMP_BUILD_DIR" && cd "$TMP_BUILD_DIR" \
142142
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION_TAG}/tini-static-amd64 /sbin/tini
143143
RUN chmod +x /sbin/tini
144144

145+
ADD tools/devctr/ctr_gitconfig /root/.gitconfig
146+
145147
WORKDIR "$FIRECRACKER_SRC_DIR"
146148
ENTRYPOINT ["/sbin/tini", "--"]

tools/devctr/ctr_gitconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Add the root firecracker git folder as a safe directory in .gitconfig.
2+
# Firecracker root git folder in the container is
3+
# bind-mounted to a folder on the host which is mapped to a
4+
# user that is different from the user which runs the integ tests.
5+
# This difference in ownership is validated against by git.
6+
# https://github.blog/2022-04-12-git-security-vulnerability-announced/
7+
8+
[safe]
9+
directory = /firecracker

0 commit comments

Comments
 (0)