Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: randomize temp output directory #3341

Merged
merged 13 commits into from
Nov 8, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ENV HOME=/home
ENV OS_ARCHITECTURE="linux-x86_64"

# install OS tools
RUN apk update && apk add unzip curl rsync openjdk11 jq bash nodejs npm git
RUN apk update && apk add unzip curl rsync openjdk11 jq bash nodejs npm git uuidgen
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there anyway to generate a random String without a new dependency? Every new dependency is subject to vulnerabilities.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Took sometime but I found $RANDOM should be sufficient.


SHELL [ "/bin/bash", "-c" ]

Expand Down
2 changes: 1 addition & 1 deletion hermetic_build/library_generation/generate_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if [ -z "${os_architecture}" ]; then
os_architecture=$(detect_os_architecture)
fi

temp_destination_path="${output_folder}/temp_preprocessed"
temp_destination_path="${output_folder}/temp_preprocessed/$(uuidgen)"
mkdir -p "${output_folder}/${destination_path}"
if [ -d "${temp_destination_path}" ]; then
# we don't want the preprocessed sources of a previous run
Expand Down
Loading