Skip to content

Conversation

@MartinWheelerMT
Copy link
Collaborator

@MartinWheelerMT MartinWheelerMT commented May 27, 2025

  • Restrict permissions per job to ensure that only the least required permissions are granted in build workflow.
  • Use SHAs for GitHub Actions actions instead of versions to ensure we have control over exactly which version is being used in build workflow.
  • Remove id-token write permissions from integration_tests job.
  • Remove id-token write permissions from build-and-publish-docker-image job.

@MartinWheelerMT MartinWheelerMT force-pushed the niad-3332-review-github-actions branch from 2161d32 to 240b1d2 Compare May 27, 2025 14:17
* Restrict permissions per job to ensure that only the least required permissions are granted in `build` workflow.
* Use SHAs for GitHub Actions `actions` instead of versions to ensure we have control over exactly which version is being used in `build` workflow.
@MartinWheelerMT MartinWheelerMT force-pushed the niad-3332-review-github-actions branch from 240b1d2 to 4f49f52 Compare May 27, 2025 14:18
@github-actions
Copy link

github-actions bot commented May 27, 2025

Images built and published to ECR using a Build Id of PR-103-9e7d7aa

@MartinWheelerMT MartinWheelerMT force-pushed the niad-3332-review-github-actions branch from 759ead0 to 0a164de Compare May 27, 2025 14:33
@MartinWheelerMT MartinWheelerMT force-pushed the niad-3332-review-github-actions branch from 0a164de to 57a442e Compare May 27, 2025 14:43
* Update GitHub Action `actions` to use a named SHA rather than major version as suggested by best practices.
* Removed unneeded in `input` for `publish` job.
@MartinWheelerMT MartinWheelerMT enabled auto-merge (squash) May 27, 2025 14:56
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Copy link

Choose a reason for hiding this comment

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

does not actions/checkout@v4 take the latest version? I am just trying to understand why do we need to pull "checkout@11bd71901bbe5b1630ceea73d27597364c9af683" ? looks a bit scary :) ....

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To ensure a specific version is used and prevent the latest version being used in case of malicious updates or security issues with introduced dependencies.

Please see: Pin actions to specific versions

steps:
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
Copy link

Choose a reason for hiding this comment

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

the same here as above... doesn't "thollander/actions-comment-pull-request@v3" take the latest version ? or we need specifically v.3.0.1 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To ensure a specific version is used and prevent the latest version being used in case of malicious updates or security issues with introduced dependencies.

Please see: Pin actions to specific versions

@MartinWheelerMT MartinWheelerMT merged commit 46d2c35 into develop May 27, 2025
6 checks passed
@MartinWheelerMT MartinWheelerMT deleted the niad-3332-review-github-actions branch May 27, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants