Chore: [AEA-6424] - use new common workflows#510
Open
anthony-nhs wants to merge 6 commits intomainfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repository to align with the latest EPS common workflow patterns and security posture (least-privilege workflows, pinned actions), while adjusting local tooling and housekeeping files.
Changes:
- Migrates CI/release workflows to newer
eps-common-workflowsrevisions and adds workflow-levelpermissions: {}with job-scoped permissions. - Removes Trivy ignore configuration, adds Zizmor config, and introduces a local Grype pre-commit hook.
- Hardens supply-chain defaults (e.g.,
npm ci --ignore-scripts, pinned GitHub Actions, CODEOWNERS for workflows, devcontainer image bump).
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
zizmor.yml |
Adds Zizmor rule ignores for known findings. |
Makefile |
Uses npm ci --ignore-scripts to reduce install-time risk. |
.trivyignore.yaml |
Removes Trivy ignore list (note: Trivy config still exists elsewhere). |
.pre-commit-config.yaml |
Adds a local Grype scan hook. |
.gitignore |
Ignores generated .sbom/ output. |
.github/workflows/sync_copilot.yml |
Applies workflow-level empty permissions. |
.github/workflows/run_regression_tests.yml |
Applies workflow-level empty permissions and checkout hardening. |
.github/workflows/release.yml |
Updates common workflow refs and scopes job permissions. |
.github/workflows/release_all_stacks.yml |
Adds workflow-level empty permissions, checkout hardening, and safer env handling for gh-pages update. |
.github/workflows/pull_request.yml |
Updates common workflow refs, adds workflow-level empty permissions, and checkout hardening. |
.github/workflows/delete_old_cloudformation_stacks.yml |
Adds workflow-level empty permissions and checkout hardening. |
.github/workflows/create_release_notes.yml |
Removes unused workflow file. |
.github/workflows/ci.yml |
Updates common workflow refs and scopes job permissions. |
.github/workflows/cdk_package_code.yml |
Adds workflow-level empty permissions, checkout hardening, and pins upload-artifact. |
.github/CODEOWNERS |
Requires @NHSDigital/eps-admins review for workflow changes. |
.github/actions/sync_documents/action.yml |
Uses env variables for safer shell interpolation/quoting. |
.devcontainer/devcontainer.json |
Bumps devcontainer image version. |
Comments suppressed due to low confidence (1)
.github/workflows/pull_request.yml:149
get_issue_numberusesactions/github-scriptwithout providing a token input, so it relies onGITHUB_TOKEN. With workflow-levelpermissions: {}this job has no scopes and the API calls will fail. Add a job-levelpermissions:block (at leastpull-requests: read, and likelycontents: read) and/or explicitly passgithub-token.
get_issue_number:
runs-on: ubuntu-22.04
outputs:
issue_number: ${{steps.get_issue_number.outputs.result}}
steps:
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
name: get issue number
id: get_issue_number
with:
script: |
if (context.issue.number) {
// Return issue number if present
return context.issue.number;
} else {
// Otherwise return issue number from commit
return (
await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
})
).data[0].number;
}
result-encoding: string
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Details