Skip to content

Commit 9850f2d

Browse files
committed
updated the dev container setup to store the secrets properly
1 parent 72fe25a commit 9850f2d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-22.04
1616
# [Optional] Uncomment this section to install additional packages.
1717
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1818
&& apt-get -y install --no-install-recommends cmake clang llvm lcov
19-
RUN --mount=type=secret,id=credentials \
20-
export CIFUZZ_CREDENTIALS=$(cat /run/secrets/credentials) &&\
21-
sh -c "$(curl -fsSL http://downloads.code-intelligence.com/assets/install-cifuzz.sh)" $CIFUZZ_CREDENTIALS latest &&\
22-
export CIFUZZ_CREDENTIALS=""
19+
RUN --mount=type=secret,id=CIFUZZ_CREDENTIALS,required sh -c "$(curl -fsSL http://downloads.code-intelligence.com/assets/install-cifuzz.sh)" $(cat /run/secrets/CIFUZZ_CREDENTIALS) latest
2320

24-
25-
# Set random bits to less then 32 to avoid a LLVM bug that will cause segmentation faults during fuzzing execution.
26-
RUN sysctl vm.mmap_rnd_bits=30
21+
# # Set random bits to less then 32 to avoid a LLVM bug that will cause segmentation faults during fuzzing execution.
22+
# RUN sysctl vm.mmap_rnd_bits=30
2723
RUN cifuzz completion bash > /etc/bash_completion.d/cifuzz

.devcontainer/devcontainer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
"build": {
66
"dockerfile": "Dockerfile",
77
"options": [
8-
"--secret=id=credentials,env=CIFUZZ_CREDENTIALS"
8+
"--secret=id=CIFUZZ_CREDENTIALS,env=CIFUZZ_CREDENTIALS"
99
]
1010
},
11+
"remoteEnv": {
12+
"CIFUZZ_LLM_API_TOKEN": "${localEnv:CIFUZZ_LLM_API_TOKEN}"
13+
},
1114
"features": {
1215
"ghcr.io/devcontainers-community/features/llvm:3": {}
1316
},
17+
1418
"customizations": {
1519
"vscode": {
1620
"extensions": [

0 commit comments

Comments
 (0)