Skip to content

fix: Pass GPG key ids as separate arguments when exporting. #426

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

Merged
merged 1 commit into from
Jul 18, 2025
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile.buildkit.plus
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN --mount=type=secret,id=nginx-crt,dst=nginx-repo.crt \
done; \
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
done; \
gpg1 --export "$NGINX_GPGKEYS" > "$NGINX_GPGKEY_PATH" ; \
gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

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

The unquoted variable $NGINX_GPGKEYS could cause issues if any key IDs contain spaces or special characters. Consider using an array or ensuring the variable contains only safe characters.

Suggested change
gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \
gpg1 --export "${NGINX_GPGKEYS[@]}" > "$NGINX_GPGKEY_PATH" ; \

Copilot uses AI. Check for mistakes.

rm -rf "$GNUPGHOME"; \
apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
# Install the latest release of NGINX Plus and/or NGINX Plus modules (written and maintained by F5)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.plus
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN set -x \
done; \
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
done; \
gpg1 --export "$NGINX_GPGKEYS" > "$NGINX_GPGKEY_PATH" ; \
gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

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

The unquoted variable $NGINX_GPGKEYS could cause issues if any key IDs contain spaces or special characters. Consider using an array or ensuring the variable contains only safe characters.

Suggested change
gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \
gpg1 --export "$NGINX_GPGKEYS" > "$NGINX_GPGKEY_PATH" ; \

Copilot uses AI. Check for mistakes.

rm -rf "$GNUPGHOME"; \
apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
# Install the latest release of NGINX Plus and/or NGINX Plus modules (written and maintained by F5)
Expand Down