Skip to content

Commit 88e26b2

Browse files
authored
Chore: [AEA-0000] - move to new qc (#653)
## Summary - Routine Change ### Details - move to latest qc - remove all trivy files - add CODEOWNERS to restrict updates to workflows - use least permissions on all workflows - add --ignore-scripts true to npm install
1 parent bed0836 commit 88e26b2

File tree

14 files changed

+86
-139
lines changed

14 files changed

+86
-139
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"args": {
77
"DOCKER_GID": "${env:DOCKER_GID:}",
88
"IMAGE_NAME": "node_24_python_3_14",
9-
"IMAGE_VERSION": "v1.2.0",
9+
"IMAGE_VERSION": "v1.4.4",
1010
"USER_UID": "${localEnv:USER_ID:}",
1111
"USER_GID": "${localEnv:GROUP_ID:}"
1212
}

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# restrict access to approving workflow changes
2+
.github/workflows/ @NHSDigital/eps-admins

.github/workflows/ci.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@ on:
44
push:
55
branches: [main]
66

7-
env:
8-
BRANCH_NAME: ${{ github.ref_name }}
9-
7+
permissions: {}
108
jobs:
119
get_config_values:
12-
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@b0172dbdb3af4ae232873106553c316d79d784fc
10+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
1311
with:
1412
verify_published_from_main_image: true
13+
permissions:
14+
attestations: read
15+
contents: read
16+
packages: read
1517
quality_checks:
16-
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
18+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
1719
needs: [get_config_values]
20+
permissions:
21+
contents: read
22+
id-token: write
23+
packages: read
1824
with:
1925
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
2026
run_docker_scan: false
@@ -23,14 +29,17 @@ jobs:
2329

2430
tag_release:
2531
needs: [quality_checks, get_config_values]
26-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
32+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
33+
permissions:
34+
contents: write
35+
id-token: write
36+
packages: write
2737
with:
2838
dry_run: true
2939
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
3040
branch_name: main
3141
publish_packages: packages/cdkConstructs,packages/deploymentUtils
3242
tag_format: ${{ needs.get_config_values.outputs.tag_format }}
33-
secrets: inherit
3443

3544
package_npm_code:
3645
needs: [quality_checks, get_config_values]

.github/workflows/package_npm_code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pinned_image:
77
type: string
88
required: true
9-
9+
permissions: {}
1010
jobs:
1111
package_npm_code:
1212
runs-on: ubuntu-22.04
@@ -23,7 +23,7 @@ jobs:
2323
- name: Checkout code
2424
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2525
with:
26-
ref: ${{ env.BRANCH_NAME }}
26+
persist-credentials: false
2727

2828
- name: Install dependencies
2929
run: |

.github/workflows/pull_request.yml

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,42 @@ on:
44
pull_request:
55
branches: [main]
66

7-
env:
8-
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
9-
7+
permissions: {}
108
jobs:
119
get_config_values:
12-
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@b0172dbdb3af4ae232873106553c316d79d784fc
10+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
1311
with:
1412
verify_published_from_main_image: false
13+
permissions:
14+
attestations: read
15+
contents: read
16+
packages: read
1517
dependabot-auto-approve-and-merge:
1618
needs: quality_checks
17-
uses: NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@352f15f692c23b18f67215ad858f27b06a878717
19+
uses: NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
20+
permissions:
21+
contents: write
22+
pull-requests: write
1823
secrets:
1924
AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }}
2025
AUTOMERGE_PEM: ${{ secrets.AUTOMERGE_PEM }}
2126
pr_title_format_check:
22-
uses: NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@b0172dbdb3af4ae232873106553c316d79d784fc
27+
uses: NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
28+
permissions:
29+
pull-requests: write
2330
quality_checks:
24-
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
31+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
2532
needs: [get_config_values]
33+
permissions:
34+
contents: read
35+
id-token: write
36+
packages: read
2637
with:
2738
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
2839
run_docker_scan: false
2940

3041
secrets:
3142
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
32-
33-
get_issue_number:
34-
runs-on: ubuntu-22.04
35-
outputs:
36-
issue_number: ${{steps.get_issue_number.outputs.result}}
37-
38-
steps:
39-
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
40-
name: get issue number
41-
id: get_issue_number
42-
with:
43-
script: |
44-
if (context.issue.number) {
45-
// Return issue number if present
46-
return context.issue.number;
47-
} else {
48-
// Otherwise return issue number from commit
49-
return (
50-
await github.rest.repos.listPullRequestsAssociatedWithCommit({
51-
commit_sha: context.sha,
52-
owner: context.repo.owner,
53-
repo: context.repo.repo,
54-
})
55-
).data[0].number;
56-
}
57-
result-encoding: string
58-
59-
6043
package_npm_code:
6144
needs: [quality_checks, get_config_values]
6245
uses: ./.github/workflows/package_npm_code.yml
@@ -65,11 +48,14 @@ jobs:
6548

6649
tag_release:
6750
needs: [get_config_values]
68-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
51+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
52+
permissions:
53+
contents: write
54+
id-token: write
55+
packages: write
6956
with:
7057
dry_run: true
7158
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
7259
branch_name: ${{ github.event.pull_request.head.ref }}
7360
publish_packages: packages/cdkConstructs,packages/deploymentUtils
7461
tag_format: ${{ needs.get_config_values.outputs.tag_format }}
75-
secrets: inherit

.github/workflows/release.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,23 @@ on:
55
schedule:
66
- cron: "0 8 * * 3"
77

8-
env:
9-
BRANCH_NAME: ${{ github.ref_name }}
10-
8+
permissions: {}
119
jobs:
1210
get_config_values:
13-
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@b0172dbdb3af4ae232873106553c316d79d784fc
11+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
1412
with:
1513
verify_published_from_main_image: true
14+
permissions:
15+
attestations: read
16+
contents: read
17+
packages: read
1618
quality_checks:
17-
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
19+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
1820
needs: [get_config_values]
21+
permissions:
22+
contents: read
23+
id-token: write
24+
packages: read
1925
with:
2026
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
2127
run_docker_scan: false
@@ -24,11 +30,14 @@ jobs:
2430

2531
tag_release:
2632
needs: [quality_checks, get_config_values]
27-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
33+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
34+
permissions:
35+
contents: write
36+
id-token: write
37+
packages: write
2838
with:
2939
dry_run: false
3040
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
3141
branch_name: main
3242
publish_packages: packages/cdkConstructs,packages/deploymentUtils
3343
tag_format: ${{ needs.get_config_values.outputs.tag_format }}
34-
secrets: inherit

.github/workflows/sync_copilot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: "0 6 * * 1"
7-
7+
permissions: {}
88
jobs:
99
sync-copilot-instructions:
1010
runs-on: ubuntu-22.04

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ _site/
2828
vendor
2929
.trivy_out/
3030
*.tgz
31+
.sbom/

.grype.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ignore:
2+
# picomatch
3+
- vulnerability: GHSA-c2c7-rcm5-vvqj
4+
# flatted
5+
- vulnerability: GHSA-rf6f-7fwh-wjgh
6+
# minimatch
7+
- vulnerability: GHSA-3ppc-4f35-3m26
8+
- vulnerability: GHSA-7r86-cg39-jmmj
9+
- vulnerability: GHSA-23c5-xmqv-rm74
10+
- vulnerability: GHSA-25h7-pfq9-p65f

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ repos:
2323

2424
- repo: local
2525
hooks:
26+
- id: grype-scan-local
27+
name: Grype scan local changes
28+
entry: make
29+
args: ["grype-scan-local"]
30+
language: system
31+
pass_filenames: false
32+
always_run: true
33+
2634
- id: check-commit-signing
2735
name: Check commit signing
2836
description: Ensures that commits are GPG signed

0 commit comments

Comments
 (0)