-
Notifications
You must be signed in to change notification settings - Fork 1
BUILD-12475 Document persist-credentials: false for actions requiring contents: write #341
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 |
|---|---|---|
|
|
@@ -235,6 +235,8 @@ permissions: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/config-maven@v1 | ||
| - run: mvn verify | ||
| ``` | ||
|
|
@@ -337,6 +339,8 @@ permissions: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
Comment on lines
341
to
+343
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.
|
||
| - uses: SonarSource/ci-github-actions/config-maven@v1 | ||
| - uses: SonarSource/ci-github-actions/build-maven@v1 | ||
| ``` | ||
|
|
@@ -446,6 +450,8 @@ permissions: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/config-poetry@v1 | ||
| - run: poetry install | ||
| ``` | ||
|
|
@@ -532,6 +538,8 @@ jobs: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/build-poetry@v1 | ||
| ``` | ||
|
|
||
|
|
@@ -641,6 +649,8 @@ permissions: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/config-gradle@v1 | ||
| - run: ./gradlew build | ||
| ``` | ||
|
|
@@ -766,6 +776,8 @@ jobs: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/build-gradle@v1 | ||
| ``` | ||
|
|
||
|
|
@@ -969,6 +981,8 @@ config: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/config-npm@v1 | ||
| ``` | ||
|
|
||
|
|
@@ -1058,6 +1072,8 @@ jobs: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/build-npm@v1 | ||
| ``` | ||
|
|
||
|
|
@@ -1168,6 +1184,8 @@ jobs: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/build-yarn@v1 | ||
| ``` | ||
|
|
||
|
|
@@ -1236,6 +1254,8 @@ permissions: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: SonarSource/ci-github-actions/config-pip@v1 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
|
|
@@ -1350,6 +1370,8 @@ permissions: | |
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1 | ||
| - uses: SonarSource/ci-github-actions/config-uv@v1 | ||
| - run: jf uv sync | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
💡 Quality: New persist-credentials pattern not propagated or explained
The migration templates in
.cursor/cirrus-github-migration.md(lines 313-320 and 1789-1795) grantcontents: writeand check out with the defaultpersist-credentials: true, so every workflow generated from them reproduces exactly the token-persistence exposure this PR sets out to close; nothing in the diff updates them or states they are intentionally excluded. Additionally, the README change is snippet-only: the per-action "Required GitHub Permissions" sections that call outcontents: writenever mentionpersist-credentials: false, so a reader who copies only the permissions block (or is told to addcontents: write, as at README:88-92) gets the elevated token without the mitigation. Add thewith: persist-credentials: falseto the migration templates and one sentence of rationale next to thecontents: writerequirement.Apply the same pattern to both build-job templates in .cursor/cirrus-github-migration.md and document the rationale once in the README requirements prose.:
Was this helpful? React with 👍 / 👎