Skip to content

Commit 92de9a4

Browse files
committed
fix: kics scan digest pin
1 parent 8f82ae3 commit 92de9a4

3 files changed

Lines changed: 51 additions & 23 deletions

File tree

.github/workflows/kics.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
on:
1515
push:
16-
branches: [main]
16+
branches: [ main ]
1717
paths:
1818
- "**/*.yaml"
1919
- "**/*.yml"
@@ -22,7 +22,7 @@ on:
2222
- "**/Dockerfile"
2323
- ".github/workflows/kics.yml"
2424
pull_request:
25-
branches: [main]
25+
branches: [ main ]
2626
paths:
2727
- "**/*.yaml"
2828
- "**/*.yml"
@@ -44,24 +44,26 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Checkout
47-
uses: actions/checkout@v6
47+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4848

4949
- name: Create results dir
5050
run: mkdir -p results-dir
5151

52-
- name: Run KICS scan
53-
uses: Checkmarx/kics-github-action@05aa5eb70eede1355220f4ca5238d96b397e30a6 # v2.1.20
52+
- name: Run KICS
53+
uses: synkube/actions/.github/actions/kics-github-action@main
5454
with:
55-
path: "."
56-
output_path: "results-dir"
57-
output_formats: "json,sarif"
58-
ignore_on_exit: "results"
59-
enable_jobs_summary: "true"
55+
path: .
56+
token: ${{ secrets.GITHUB_TOKEN }}
57+
output_path: results-dir/
58+
output_formats: json,sarif
59+
ignore_on_exit: results
6060
enable_annotations: "true"
61+
enable_comments: "false"
62+
enable_jobs_summary: "true"
6163

6264
- name: Upload KICS SARIF
6365
if: env.ADVANCED_SECURITY == 'true'
64-
uses: github/codeql-action/upload-sarif@v4
66+
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
6567
continue-on-error: true
6668
with:
6769
sarif_file: "results-dir/results.sarif"
@@ -70,7 +72,7 @@ jobs:
7072

7173
- name: Upload KICS results as artifacts
7274
if: env.ADVANCED_SECURITY == 'true'
73-
uses: actions/upload-artifact@v7
75+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7476
with:
7577
name: kics-results
7678
path: results-dir/

.github/workflows/test-and-release.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
charts: ${{ steps.matrix.outputs.charts }}
2929
has-changes: ${{ steps.matrix.outputs.has-changes }}
3030
steps:
31-
- uses: actions/checkout@v6
31+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3232
with:
3333
fetch-depth: 0
3434

@@ -122,10 +122,19 @@ jobs:
122122
chart: ${{ fromJSON(needs.detect-changes.outputs.charts) }}
123123

124124
steps:
125-
- uses: actions/checkout@v6
125+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
126126

127127
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
128-
- uses: mikefarah/yq@5a7e72a743649b1b3a47d1a1d8214f3453173c51 # v4.52.4
128+
- name: Install yq
129+
env:
130+
YQ_VERSION: v4.53.2
131+
YQ_SHA256: d56bf5c6819e8e696340c312bd70f849dc1678a7cda9c2ad63eebd906371d56b
132+
run: |
133+
set -euo pipefail
134+
curl -fsSL "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" -o /tmp/yq
135+
echo "${YQ_SHA256} /tmp/yq" | sha256sum -c -
136+
sudo install -m 0755 /tmp/yq /usr/local/bin/yq
137+
yq --version
129138
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4.0.1
130139

131140
- name: Update Helm repositories
@@ -169,7 +178,7 @@ jobs:
169178
helm package . --version ${{ env.CHART_VERSION }}
170179
171180
- name: Upload chart artifact
172-
uses: actions/upload-artifact@v7
181+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
173182
with:
174183
name: chart-${{ matrix.chart }}-${{ env.CHART_VERSION }}
175184
path: charts/${{ matrix.chart }}/${{ matrix.chart }}-${{ env.CHART_VERSION }}.tgz
@@ -188,10 +197,19 @@ jobs:
188197
charts-published: ${{ steps.collect.outputs.charts }}
189198

190199
steps:
191-
- uses: actions/checkout@v6
200+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
192201

193202
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
194-
- uses: mikefarah/yq@5a7e72a743649b1b3a47d1a1d8214f3453173c51 # v4.52.4
203+
- name: Install yq
204+
env:
205+
YQ_VERSION: v4.53.2
206+
YQ_SHA256: d56bf5c6819e8e696340c312bd70f849dc1678a7cda9c2ad63eebd906371d56b
207+
run: |
208+
set -euo pipefail
209+
curl -fsSL "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" -o /tmp/yq
210+
echo "${YQ_SHA256} /tmp/yq" | sha256sum -c -
211+
sudo install -m 0755 /tmp/yq /usr/local/bin/yq
212+
yq --version
195213
196214
- name: Get chart version
197215
id: vars
@@ -202,7 +220,7 @@ jobs:
202220
echo "REPOSITORY=${repository@L}" >> $GITHUB_ENV
203221
204222
- name: Download chart artifact
205-
uses: actions/download-artifact@v8
223+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
206224
with:
207225
name: chart-${{ matrix.chart }}-${{ env.CHART_VERSION }}
208226
path: charts/${{ matrix.chart }}/
@@ -243,12 +261,21 @@ jobs:
243261
contents: write # Required for chart-releaser to push to gh-pages branch
244262

245263
steps:
246-
- uses: actions/checkout@v6
264+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
247265
with:
248266
fetch-depth: 0
249267

250268
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
251-
- uses: mikefarah/yq@5a7e72a743649b1b3a47d1a1d8214f3453173c51 # v4.52.4
269+
- name: Install yq
270+
env:
271+
YQ_VERSION: v4.53.2
272+
YQ_SHA256: d56bf5c6819e8e696340c312bd70f849dc1678a7cda9c2ad63eebd906371d56b
273+
run: |
274+
set -euo pipefail
275+
curl -fsSL "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" -o /tmp/yq
276+
echo "${YQ_SHA256} /tmp/yq" | sha256sum -c -
277+
sudo install -m 0755 /tmp/yq /usr/local/bin/yq
278+
yq --version
252279
253280
- name: Get repository info
254281
run: |

charts/app-starter/values.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ statefulSet:
3737
image:
3838
repository: nginx
3939
tag: latest
40-
# Optional digest (e.g. sha256:...) appended as repository:tag@digest in pod templates.
41-
digest: ""
40+
digest: sha256:6e23479198b998e5e25921dff8455837c7636a67111a04a635cf1bb363d199dc
4241
pullPolicy: IfNotPresent
4342

4443
imagePullSecrets: []

0 commit comments

Comments
 (0)