Conversation
Fixes findings identified by zizmor (https://github.com/zizmorcore/zizmor) Signed-off-by: nscuro <nscuro@protonmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens repository automation to address security findings flagged by zizmor, primarily by reducing credential persistence and preventing expression injection in run scripts across GitHub Actions workflows.
Changes:
- Disable persisted GitHub credentials in multiple
actions/checkoutsteps (persist-credentials: false) to reduce token exposure risk. - Move untrusted/expandable GitHub context values into
env:variables before using them in shell scripts (mitigates expression injection findings). - Tighten/clarify workflow permissions and adjust release publishing to use the built-in
GITHUB_TOKENwhere appropriate.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/mirror-container-image.yml | Moves registry package fields into env for safer shell usage when mirroring images. |
| .github/workflows/dependency-review.yaml | Disables persisted checkout credentials. |
| .github/workflows/ci-test-pr-coverage.yml | Uses env variables for Codacy token/commit SHA before invoking reporting script. |
| .github/workflows/ci-release.yaml | Removes custom checkout token usage; uses env indirection for inputs in the release step. |
| .github/workflows/ci-publish.yaml | Disables persisted checkout credentials; adds contents: write where needed; switches GH release edits/uploads to GITHUB_TOKEN. |
| .github/workflows/ci-openapi.yaml | Disables persisted checkout credentials in both jobs. |
| .github/workflows/ci-lint.yaml | Adds explicit empty top-level permissions and disables persisted checkout credentials. |
| .github/workflows/buf.yml | Disables persisted checkout credentials. |
| .github/workflows/_meta-build.yaml | Uses env indirection for workflow-call inputs used in shell script logic. |
| .github/dependabot.yml | Adds a cooldown block to Dependabot update configurations. |
Comments suppressed due to low confidence (1)
.github/workflows/ci-release.yaml:87
MAVEN_ARGSis built and exported based on workflow inputs, but themvn release:prepareinvocation doesn’t actually use it. Unless Maven is expected to consumeMAVEN_ARGSimplicitly (it usually doesn’t), therelease-version,development-version, anddry-runinputs won’t have any effect. Consider either passing the constructed arguments tomvnexplicitly or removing the dead argument-building logic.
MAVEN_ARGS="-B"
if [[ -n "${INPUT_RELEASE_VERSION}" ]]; then
MAVEN_ARGS="${MAVEN_ARGS} -DreleaseVersion=${INPUT_RELEASE_VERSION}"
fi
if [[ -n "${INPUT_DEVELOPMENT_VERSION}" ]]; then
MAVEN_ARGS="${MAVEN_ARGS} -DdevelopmentVersion=${INPUT_DEVELOPMENT_VERSION}"
fi
if [[ "${INPUT_DRY_RUN}" == "true" ]]; then
MAVEN_ARGS="${MAVEN_ARGS} -DdryRun=true"
fi
export MAVEN_ARGS
mvn release:prepare
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes findings identified by zizmor (https://github.com/zizmorcore/zizmor)
Addressed Issue
N/A
Additional Details
N/A
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR implements an enhancement, and I have provided tests to verify that it works as intendedThis PR introduces changes to the database model, and I have updated the migration changelog accordinglyThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly