Repository navigation
fix(ci): restore id-based credential matching for Maven 3.10 deploys #3654
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ jobs: | |
| gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
|
||
| - name: Publish to Apache Maven Central | ||
| run: ./mvnw package deploy -Prelease | ||
| run: ./mvnw package deploy -Prelease -Dmaven.repository.credentialScope=id | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: set -eu
printf '%s\n' '--- workflow ---'
nl -ba .github/workflows/snapshot-releases.yml
printf '%s\n' '--- diff base..head ---'
git diff --no-ext-diff --unified=80 349cd5606523db37b4847b20e7a6224ad7d69a93 4a911b60739044c8cd22d2f3b4cc6365f0824c94 -- .github/workflows/snapshot-releases.yml
printf '%s\n' '--- permissions references ---'
rg -n -F --glob '.github/workflows/*.yml' --glob '.github/workflows/*.yaml' -e 'permissions:' -e 'contents:' .github/workflows || test "$?" -eq 1
printf '%s\n' '--- zizmor/config references ---'
rg -n -F --glob '!target/**' --glob '!build/**' -e 'zizmor' -e 'permissions' .github . 2>/dev/null | head -200 || trueRepository: operator-framework/java-operator-sdk Length of output: 36793 🏁 Script executed: set -u
if command -v zizmor >/dev/null 2>&1; then
printf '%s\n' "zizmor: $(command -v zizmor)"
zizmor .github/workflows/snapshot-releases.yml
status=$?
printf 'zizmor_exit=%s\n' "$status"
else
printf '%s\n' 'zizmor: unavailable'
fiRepository: operator-framework/java-operator-sdk Length of output: 619 🏁 Script executed: zizmor --help 2>&1 | sed -n '1,240p'Repository: operator-framework/java-operator-sdk Length of output: 6717 🏁 Script executed: zizmor --offline --format=plain .github/workflows/snapshot-releases.yml 2>&1
status=$?
printf 'zizmor_exit=%s\n' "$status"
exit 0Repository: operator-framework/java-operator-sdk Length of output: 4893 Pin the workflow token permissions.
🐛 Suggested fix on:
push:
paths-ignore:
- 'docs/**'
branches: [ main, v1, v2, v3, next ]
workflow_dispatch:
+permissions:
+ contents: read
jobs:🧰 Tools🪛 zizmor (1.30.1)[warning] 1-51: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) [warning] 28-51: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| env: | ||
| MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
| MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PASSWORD }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
Limit the publish job to read access.
The
publishjob only checks out the repository and runs Maven deployment. It does not require repository write access. Addcontents: readto this job. Keepcontents: writeon the caller andfinalize-release, which performs the release finalization.Suggested fix
🤖 Prompt for AI Agents