Skip to content

Commit 9430c1a

Browse files
authored
Merge branch 'master' into introduce_ruff
2 parents 7e1dd4f + f3c2648 commit 9430c1a

File tree

12 files changed

+70
-62
lines changed

12 files changed

+70
-62
lines changed

.github/workflows/build-image-test.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ jobs:
3838

3939
- name: Get changed Docker related files
4040
id: changed-files-specific
41-
uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45.0.7
41+
uses: tj-actions/changed-files@2f7c5bfce28377bc069a65ba478de0a74aa0ca32 # v46.0.1
4242
with:
4343
files: |
44-
Dockerfile
4544
.dockerignore
46-
tools/entrypoint.sh
4745
.github/workflows/build-image-test.yaml
48-
tools/*.sh
46+
Dockerfile
47+
tools/entrypoint.sh
48+
tools/install/*.sh
4949
5050
- name: Set IMAGE environment variable
5151
if: steps.changed-files-specific.outputs.any_changed == 'true'
@@ -56,12 +56,12 @@ jobs:
5656
>> $GITHUB_ENV
5757
5858
- name: Set up Docker Buildx
59-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
59+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
6060
if: steps.changed-files-specific.outputs.any_changed == 'true'
6161

6262
- name: Build if Dockerfile changed
6363
if: steps.changed-files-specific.outputs.any_changed == 'true'
64-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
64+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
6565
with:
6666
context: .
6767
build-args: |
@@ -100,7 +100,7 @@ jobs:
100100
101101
- name: Dive - check image for waste files
102102
if: steps.changed-files-specific.outputs.any_changed == 'true'
103-
uses: MaxymVlasov/dive-action@94506fd846be3ec26406118c3878ccd2ad2b0150 # v1.3.0
103+
uses: MaxymVlasov/dive-action@43dafd0015826beaca5110157c9262c5dc10672a # v1.4.0
104104
with:
105105
image: ${{ env.IMAGE }}
106106
config-file: ${{ github.workspace }}/.github/.dive-ci.yaml
@@ -112,7 +112,7 @@ jobs:
112112
if: >-
113113
steps.changed-files-specific.outputs.any_changed == 'true'
114114
&& matrix.os == 'ubuntu-latest'
115-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
115+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
116116
with:
117117
context: .
118118
build-args: |

.github/workflows/build-image.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
- name: Checkout code
2323
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
- name: Set up Docker Buildx
25-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
25+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
2626
- name: Login to GitHub Container Registry
27-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
27+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
2828
with:
2929
registry: ghcr.io
3030
username: ${{ github.repository_owner }}
@@ -43,11 +43,11 @@ jobs:
4343
run: >-
4444
echo "IMAGE_REPO=ghcr.io/${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV
4545
- name: Set up Docker Buildx
46-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
46+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
4747

4848
- name: Build and Push release
4949
if: github.event_name != 'schedule'
50-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
50+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
5151
with:
5252
context: .
5353
build-args: |
@@ -64,7 +64,7 @@ jobs:
6464
6565
- name: Build and Push nightly
6666
if: github.event_name == 'schedule'
67-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
67+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
6868
with:
6969
context: .
7070
build-args: |

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
echo "dir=$(python -m pip cache dir)" >> "${GITHUB_OUTPUT}"
162162
shell: bash
163163
- name: Set up pip cache
164-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
164+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
165165
with:
166166
path: ${{ steps.pip-cache-dir.outputs.dir }}
167167
key: >-
@@ -307,7 +307,7 @@ jobs:
307307
run: >-
308308
echo "dir=$(python -m pip cache dir)" >> "${GITHUB_OUTPUT}"
309309
- name: Set up pip cache
310-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
310+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
311311
with:
312312
path: ${{ steps.pip-cache-dir.outputs.dir }}
313313
key: >-
@@ -372,7 +372,7 @@ jobs:
372372
>> "${GITHUB_OUTPUT}"
373373
working-directory: dist
374374
- name: Store the distribution packages
375-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
375+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
376376
with:
377377
name: >-
378378
${{ needs.pre-setup.outputs.dists-artifact-name }}

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
49+
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
5050
with:
5151
languages: ${{ matrix.language }}
5252
# If you wish to specify custom queries, you can do so here or in
@@ -58,7 +58,7 @@ jobs:
5858
# If this step fails, then you should remove it and run the build
5959
# manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
61+
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# yamllint disable-line rule:line-length
@@ -73,6 +73,6 @@ jobs:
7373
# ./location_of_script_within_repo/buildscript.sh
7474

7575
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
76+
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
7777
with:
7878
category: /language:${{matrix.language}}

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# Skip terraform_tflint which interferes to commit pre-commit auto-fixes
5656
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
5757
with:
58-
python-version: '3.9'
58+
python-version: '3.13'
5959
- name: Execute pre-commit
6060
uses: pre-commit/action@9b88afc9cd57fd75b655d5c71bd38146d07135fe # v2.0.3
6161
env:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
fetch-depth: 0
3737

3838
- name: Release
39-
uses: cycjimmy/semantic-release-action@b1b432f13acb7768e0c8efdec416d363a57546f2 # v4.1.1
39+
uses: cycjimmy/semantic-release-action@0a51e81a6baff2acad3ee88f4121c589c73d0f0e # v4.2.0
4040
with:
4141
semantic_version: 18.0.0
4242
extra_plugins: |

.github/workflows/reusable-tox.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ jobs:
181181

182182
- name: Cache pre-commit.com virtualenvs
183183
if: inputs.toxenv == 'pre-commit'
184-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
184+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
185185
with:
186186
path: ~/.cache/pre-commit
187187
key: >-
@@ -239,7 +239,7 @@ jobs:
239239
shell: bash
240240
- name: Set up pip cache
241241
if: fromJSON(steps.py-abi.outputs.is-stable-abi)
242-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
242+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
243243
with:
244244
path: ${{ steps.pip-cache-dir.outputs.dir }}
245245
key: >-
@@ -266,7 +266,7 @@ jobs:
266266
- name: Download all the dists
267267
if: >-
268268
contains(fromJSON('["metadata-validation", "pytest"]'), inputs.toxenv)
269-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
269+
uses: actions/download-artifact@b14cf4c92620c250e1c074ab0a5800e37df86765 # v4.2.0
270270
with:
271271
name: ${{ inputs.dists-artifact-name }}
272272
path: dist/
@@ -375,7 +375,7 @@ jobs:
375375
if: >-
376376
!cancelled()
377377
&& steps.tox-run.outputs.cov-report-files != ''
378-
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
378+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
379379
with:
380380
disable_search: true
381381
fail_ci_if_error: >-
@@ -399,7 +399,10 @@ jobs:
399399
if: >-
400400
!cancelled()
401401
&& steps.tox-run.outputs.test-result-files != ''
402-
uses: codecov/test-results-action@44ecb3a270cd942bdf0fa8f2ce14cb32493e810a # v1.0.3
402+
uses: codecov/test-results-action@f2dba722c67b86c6caa034178c6e4d35335f6706 # v1.1.0
403+
# FIXME There is a bug in action which provokes it to fail during upload
404+
# Related issue: https://github.com/codecov/codecov-action/issues/1794
405+
continue-on-error: true
403406
with:
404407
disable_search: true
405408
fail_ci_if_error: >-

.github/workflows/scorecards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
persist-credentials: false
4343

4444
- name: Run analysis
45-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
45+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
4646
with:
4747
results_file: results.sarif
4848
results_format: sarif
@@ -66,14 +66,14 @@ jobs:
6666
# Upload the results as artifacts (optional). Commenting out will disable
6767
# uploads of run results in SARIF format to the repository Actions tab.
6868
- name: Upload artifact
69-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
69+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
7070
with:
7171
name: SARIF file
7272
path: results.sarif
7373
retention-days: 5
7474

7575
# Upload the results to GitHub's code scanning dashboard.
7676
- name: Upload to code-scanning
77-
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
77+
uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
7878
with:
7979
sarif_file: results.sarif

.pre-commit-config.yaml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,17 @@ repos:
4343

4444
# Detect hardcoded secrets
4545
- repo: https://github.com/gitleaks/gitleaks
46-
rev: v8.23.3
46+
rev: v8.24.0
4747
hooks:
4848
- id: gitleaks
4949

50-
# Dockerfile linter
50+
# Dockerfile
5151
- repo: https://github.com/hadolint/hadolint
5252
rev: v2.12.1-beta
5353
hooks:
5454
- id: hadolint
55-
args:
56-
- --ignore=DL3007 # Using latest
57-
- --ignore=DL3013 # Pin versions in pip
58-
- --ignore=DL3027 # Do not use apt
59-
- --ignore=DL3059 # Docker `RUN`s shouldn't be consolidated here
60-
- --ignore=DL4006 # Not related to alpine
61-
- --ignore=SC1091 # Useless check
62-
- --ignore=SC2015 # Useless check
63-
- --ignore=SC3037 # Not related to alpine
6455

65-
#
66-
# YAML Linters
67-
#
56+
# YAML
6857
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
6958
rev: 0.2.3
7059
hooks:
@@ -77,7 +66,7 @@ repos:
7766
- --implicit_start
7867

7968
- repo: https://github.com/adrienverge/yamllint.git
80-
rev: v1.35.1
69+
rev: v1.36.2
8170
hooks:
8271
- id: yamllint
8372
types:
@@ -86,16 +75,15 @@ repos:
8675
args:
8776
- --strict
8877

89-
# JSON5 Linter
78+
# JSON5
9079
- repo: https://github.com/pre-commit/mirrors-prettier
9180
rev: v3.1.0
9281
hooks:
9382
- id: prettier
9483
# https://prettier.io/docs/en/options.html#parser
9584
files: .json5$
9685

97-
98-
# Bash Linter
86+
# Bash
9987
- repo: https://github.com/jumanjihouse/pre-commit-hooks
10088
rev: 3.0.0
10189
hooks:
@@ -109,9 +97,7 @@ repos:
10997
- -w
11098
- id: shellcheck
11199

112-
#
113-
# Python Linters
114-
#
100+
# Python
115101
- repo: https://github.com/astral-sh/ruff-pre-commit
116102
rev: v0.8.4
117103
hooks:

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ RUN if [ "$INSTALL_ALL" != "false" ]; then \
6565
echo "TRIVY_VERSION=latest" >> /.env \
6666
; fi
6767

68+
# Docker `RUN`s shouldn't be consolidated here
69+
# hadolint global ignore=DL3059
6870
RUN /install/opentofu.sh
6971
RUN /install/terraform.sh
7072

@@ -81,11 +83,15 @@ RUN /install/trivy.sh
8183

8284

8385
# Checking binaries versions and write it to debug file
86+
87+
# SC2086 - We do not need to quote "$F" variable, because it's not contain spaces
88+
# DL4006 - Not Applicable for /bin/sh in alpine images. Disable, as recommended by check itself
89+
# hadolint ignore=SC2086,DL4006
8490
RUN . /.env && \
8591
F=tools_versions_info && \
8692
pre-commit --version >> $F && \
87-
(if [ "$OPENTOFU_VERSION" != "false" ]; then echo "./tofu --version | head -n 1" >> $F; else echo "opentofu SKIPPED" >> $F ; fi) && \
88-
(if [ "$TERRAFORM_VERSION" != "false" ]; then echo "./terraform --version | head -n 1" >> $F; else echo "terraform SKIPPED" >> $F ; fi) && \
93+
(if [ "$OPENTOFU_VERSION" != "false" ]; then ./tofu --version | head -n 1 >> $F; else echo "opentofu SKIPPED" >> $F ; fi) && \
94+
(if [ "$TERRAFORM_VERSION" != "false" ]; then ./terraform --version | head -n 1 >> $F; else echo "terraform SKIPPED" >> $F ; fi) && \
8995
\
9096
(if [ "$CHECKOV_VERSION" != "false" ]; then echo "checkov $(checkov --version)" >> $F; else echo "checkov SKIPPED" >> $F ; fi) && \
9197
(if [ "$HCLEDIT_VERSION" != "false" ]; then echo "hcledit $(./hcledit version)" >> $F; else echo "hcledit SKIPPED" >> $F ; fi) && \
@@ -97,7 +103,7 @@ RUN . /.env && \
97103
(if [ "$TFSEC_VERSION" != "false" ]; then echo "tfsec $(./tfsec --version)" >> $F; else echo "tfsec SKIPPED" >> $F ; fi) && \
98104
(if [ "$TFUPDATE_VERSION" != "false" ]; then echo "tfupdate $(./tfupdate --version)" >> $F; else echo "tfupdate SKIPPED" >> $F ; fi) && \
99105
(if [ "$TRIVY_VERSION" != "false" ]; then echo "trivy $(./trivy --version)" >> $F; else echo "trivy SKIPPED" >> $F ; fi) && \
100-
echo -e "\n\n" && cat $F && echo -e "\n\n"
106+
printf "\n\n\n" && cat $F && printf "\n\n\n"
101107

102108

103109

0 commit comments

Comments
 (0)