1212 outputs :
1313 image : ${{ steps.set-var.outputs.image }}
1414 steps :
15- - uses : actions/checkout@v4
15+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1616 - id : set-var
1717 run : |
1818 echo 'image<<EOF' >> $GITHUB_OUTPUT
2828 target : ["development", "production"]
2929 image : ${{fromJSON(needs.get-matrix-values.outputs.image)}}
3030 steps :
31- - uses : actions/checkout@v4
31+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3232 - id : setEnv
3333 name : Set Job env vars
3434 run : |
5656 echo "dockerTags=$DOCKERTAGS" >> $GITHUB_OUTPUT
5757
5858 - name : Set up Docker
59- uses : docker/setup-docker-action@v4
59+ uses : docker/setup-docker-action@e43656e248c0bd0647d3f5c195d116aacf6fcaf4 # v4
6060 with :
6161 daemon-config : |
6262 {
@@ -67,10 +67,10 @@ jobs:
6767 }
6868
6969 - name : Set up QEMU
70- uses : docker/setup-qemu-action@v3
70+ uses : docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
7171
7272 - name : Set up Docker Buildx
73- uses : docker/setup-buildx-action@v3
73+ uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
7474
7575 - name : Build the Docker image
7676 run : |
@@ -101,7 +101,7 @@ jobs:
101101 - name : Run Anchore Grype scan
102102 id : grype-scan
103103 if : ${{ matrix.target == 'production' }}
104- uses : anchore/scan-action@v7
104+ uses : anchore/scan-action@e1165082ffb1fe366ebaf02d8526e7c4989ea9d2 # v7
105105 with :
106106 image : docker-archive:image-${{ matrix.image.netVersion }}.tar
107107 fail-build : true
@@ -111,7 +111,7 @@ jobs:
111111 - name : Run Aqua Trivy scan
112112 id : trivy-scan
113113 if : ${{ matrix.target == 'production' }}
114- uses : aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1
114+ uses : aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # 0.35.0
115115 with :
116116 input : image-${{ matrix.image.netVersion }}.tar
117117 scan-type : image
@@ -124,14 +124,14 @@ jobs:
124124
125125 - name : Upload Grype SARIF report
126126 if : ${{ steps.grype-scan.outcome == 'failure' && matrix.target == 'production' }}
127- uses : actions/upload-artifact@v4
127+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
128128 with :
129129 name : grype-reports-dotnet-${{ matrix.image.netVersion }}
130130 path : ${{ steps.grype-scan.outputs.sarif }}
131131
132132 - name : Upload Trivy SARIF report
133133 if : ${{ steps.trivy-scan.outcome == 'failure' && matrix.target == 'production' }}
134- uses : actions/upload-artifact@v4
134+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
135135 with :
136136 name : trivy-reports-dotnet-${{ matrix.image.netVersion }}
137137 path : trivy-reports-dotnet-${{ matrix.image.netVersion }}
@@ -145,7 +145,7 @@ jobs:
145145 exit 1
146146
147147 - name : Login to DockerHub
148- uses : docker/login-action@v2
148+ uses : docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
149149 if : github.ref == 'refs/heads/main'
150150 with :
151151 username : ${{ secrets.DOCKER_USERNAME }}
@@ -165,7 +165,7 @@ jobs:
165165 runs-on : ubuntu-latest
166166 needs : build-images
167167 steps :
168- - uses : actions/checkout@v3
168+ - uses : actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
169169
170170 - name : Create GitHub release
171171 if : github.ref == 'refs/heads/main'
0 commit comments