-
Notifications
You must be signed in to change notification settings - Fork 229
Pin GitHub Actions workflow step hashes and use minimum permission #1474
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2b58145
Pin GitHub Actions workflow step hashes and use mimimum permission
zimeg e70c893
docs: remove a space to confirm permissions of the docs workflow are …
zimeg 387fb3c
revert: space removal for a more focused set of changes in this pull …
zimeg 4c04a6b
ci: move actions permissions into the job for fine grained details
zimeg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,8 @@ name: JDK 14 Build & Tests | |
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
|
|
@@ -11,21 +12,24 @@ jobs: | |
| timeout-minutes: 12 | ||
| strategy: | ||
| matrix: | ||
| java-version: ['14'] | ||
|
|
||
| java-version: ["14"] | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
Member
Author
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. 🗣️ Changes unrelated to hashing steps are due to indentation! No change to testing or functionalities otherwise. |
||
| - name: Install JDK | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: ${{ matrix.java-version }} | ||
| distribution: 'adopt' | ||
| - name: Run all tests | ||
| run: | | ||
| ./scripts/run_no_prep_tests.sh -ci | ||
| env: | ||
| SKIP_UNSTABLE_TESTS: 1 | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Install JDK | ||
| uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 | ||
| with: | ||
| java-version: ${{ matrix.java-version }} | ||
| distribution: "adopt" | ||
| - name: Run all tests | ||
| run: | | ||
| ./scripts/run_no_prep_tests.sh -ci | ||
| env: | ||
| SKIP_UNSTABLE_TESTS: 1 | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
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
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
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.
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.
📣 Permissions for the
buildstep are proving alright with justread! This is interesting to me, but makes sense in the context of uploading artifacts to action outputs perhaps?📚 https://github.com/slackapi/java-slack-sdk/actions/runs/15126115805?pr=1474
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.
Makes sense 👍