Skip to content

[GPCAPIM-336] Update GitHub Actions to use latest action versions and…#167

Merged
neil-sproston merged 2 commits intomainfrom
GPCAPIM-336actionPinning
Apr 13, 2026
Merged

[GPCAPIM-336] Update GitHub Actions to use latest action versions and…#167
neil-sproston merged 2 commits intomainfrom
GPCAPIM-336actionPinning

Conversation

@neil-sproston
Copy link
Copy Markdown
Contributor

@neil-sproston neil-sproston commented Apr 10, 2026

… pIn via SHA for improved security

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Deployment Complete

@neil-sproston neil-sproston marked this pull request as ready for review April 10, 2026 12:45
@neil-sproston neil-sproston requested a review from a team as a code owner April 10, 2026 12:45
Copilot AI review requested due to automatic review settings April 10, 2026 12:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates GitHub Actions workflow and composite-action dependencies to newer versions and pins third-party actions to full commit SHAs to improve supply-chain security.

Changes:

  • Pinned actions/checkout, actions/setup-python, actions/upload-artifact, actions/download-artifact, and aws-actions/configure-aws-credentials to specific SHAs across workflows/composite actions.
  • Updated a few workflow YAML formatting blocks (e.g., needs: formatting) and small comment/metadata tweaks.
  • Removed large commented-out Trivy blocks in preview-env.yml and replaced with placeholder security-scanning notes.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/stage-4-acceptance.yaml Pin actions/checkout to a SHA; minor formatting.
.github/workflows/stage-3-build.yaml Pin actions/checkout to a SHA.
.github/workflows/stage-2-test.yaml Pin checkout/artifact actions to SHAs; reformatted merge-test-coverage.needs.
.github/workflows/stage-1-commit.yaml Pin actions/checkout to a SHA across jobs.
.github/workflows/preview-env.yml Pin checkout + AWS credentials action; replace large commented-out Trivy section with placeholders.
.github/workflows/cicd-3-deploy.yaml Pin actions/checkout and update commented notify action reference to a SHA.
.github/workflows/cicd-2-publish.yaml Pin actions/checkout + release actions to SHAs; minor YAML quoting/comment tweaks.
.github/workflows/cicd-1-pull-request.yaml Pin actions/checkout to a SHA; adjust secrets indentation formatting.
.github/workflows/alpha-integration-env.yml Pin checkout + AWS credentials action to SHAs.
.github/actions/setup-python-project/action.yaml Pin actions/setup-python to a SHA.
.github/actions/scan-dependencies/action.yaml Pin upload-artifact and AWS credentials action to SHAs.
.github/actions/create-lines-of-code-report/action.yaml Pin upload-artifact and AWS credentials action to SHAs.
.github/actions/check-python-format/action.yaml Pin actions/setup-python to a SHA.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -68,7 +68,7 @@ jobs:
# run: echo "secret_exist=${{ secrets.TEAMS_NOTIFICATION_WEBHOOK_URL != '' }}" >> $GITHUB_OUTPUT
# - name: "Notify on deployment to an environment"
# if: steps.check.outputs.secret_exist == 'true'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we just tidy this up by removing the commented out section instead? Always feels bad to keep commented out code since it's in git history anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is being done under the re-plumbing exercise that is on-going, this PR is solely to pin to SHA versions.

- name: "Authenticate to send the report"
if: steps.check.outputs.secrets_exist == 'true'
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bit of a picky point, but this is actually still within the 7 day "cooldown" that we ideally want to avoid. Probably worth just waiting until Monday before we merge. It's obviously unlikely to be a problem, but it's easy and means we're doing everything properly.

@ian-robinson-35
Copy link
Copy Markdown
Contributor

Approving now for merge on Monday

@neil-sproston neil-sproston merged commit cbc73bf into main Apr 13, 2026
57 checks passed
@neil-sproston neil-sproston deleted the GPCAPIM-336actionPinning branch April 13, 2026 09:52
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