Skip to content

Commit

Permalink
chore(ci): pin 3rd-party actions to specific commit hashes (#210)
Browse files Browse the repository at this point in the history
KAG-6149
  • Loading branch information
Water-Melon authored Jan 16, 2025
1 parent 3b7dd91 commit d2a3cdb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion code-check-actions/lua-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
# Ref: https://github.com/EnricoMi/publish-unit-test-result-action/issues/181
# Publishing: https://github.com/EnricoMi/publish-unit-test-result-action#publishing-test-results
- name: Luacheck Report
uses: EnricoMi/publish-unit-test-result-action@v2
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2
if: always() && github.actor != 'dependabot[bot]'
with:
files: |
Expand Down
4 changes: 2 additions & 2 deletions code-check-actions/rust-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ runs:
manifest_dir: ${{ inputs.manifest_dir }}
run: $GITHUB_ACTION_PATH/scripts/set-env.sh

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # v1

- uses: actions-rs/clippy-check@v1
- uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # v1
continue-on-error: true
with:
token: ${{ inputs.token }}
Expand Down
16 changes: 8 additions & 8 deletions security-actions/sca/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ runs:

# Must upload artifact for output file parameter to have effect
- name: Generate SPDX SBOM Using Syft
uses: anchore/sbom-action@v0.17.8
uses: anchore/sbom-action@55dc4ee22412511ee8c3142cbea40418e6cec693 # v0.17.8
id: sbom_spdx
with:
config: ${{ inputs.config }}
Expand All @@ -105,7 +105,7 @@ runs:
github-token: ${{ inputs.github-token }}

- name: Generate CycloneDX SBOM Using Syft
uses: anchore/sbom-action@v0.17.8
uses: anchore/sbom-action@55dc4ee22412511ee8c3142cbea40418e6cec693 # v0.17.8
id: sbom_cyclonedx
with:
config: ${{ inputs.config }}
Expand All @@ -120,14 +120,14 @@ runs:
github-token: ${{ inputs.github-token }}

- name: Check SBOM files existence
uses: andstor/file-existence-action@v3
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
id: sbom_report
with:
files: "${{ steps.meta.outputs.sbom_spdx_file }}, ${{ steps.meta.outputs.sbom_cyclonedx_file }}"
fail: true

- name: Download Grype
uses: anchore/scan-action/download-grype@v4.1.2
uses: anchore/scan-action/download-grype@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2

# Skip Cache Restoration: If skip_grype_db_cache is true, skip the restoration of the cache.
# Check for any existing cache to reuse
Expand Down Expand Up @@ -203,7 +203,7 @@ runs:
# Don't fail during report generation
- name: Vulnerability analysis of SBOM
uses: anchore/scan-action@v4.1.2
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
id: grype_analysis_sarif
if: ${{ steps.sbom_report.outputs.files_exists == 'true' && steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }} # Run only if DB is available on the runner }}
with:
Expand All @@ -216,7 +216,7 @@ runs:
# Don't fail during report generation
# JSON format will report any ignored rules
- name: Vulnerability analysis of SBOM
uses: anchore/scan-action@v4.1.2
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
id: grype_analysis_json
if: ${{ steps.sbom_report.outputs.files_exists == 'true' && steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }} # Run only if DB is available on the runner}}
with:
Expand All @@ -230,7 +230,7 @@ runs:

- name: Check vulnerability analysis report existence
if: ${{ steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }}
uses: andstor/file-existence-action@v3
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
id: grype_report
with:
files: "${{ steps.grype_analysis_sarif.outputs.sarif }}, ${{ steps.grype_analysis_json.outputs.json }}"
Expand Down Expand Up @@ -268,7 +268,7 @@ runs:
# Notify grype quick scan results in table format
# Table format will supress any specified ignore rules
- name: Inspect Vulnerability analysis of SBOM
uses: anchore/scan-action@v4.1.2
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
if: ${{ steps.sbom_report.outputs.files_exists == 'true' && steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }}
with:
sbom: ${{ steps.meta.outputs.sbom_spdx_file }}
Expand Down
18 changes: 9 additions & 9 deletions security-actions/scan-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ runs:

# Must upload artifact for output file parameter to have effect
- name: Generate SPDX SBOM Using Syft
uses: anchore/sbom-action@v0.17.8
uses: anchore/sbom-action@55dc4ee22412511ee8c3142cbea40418e6cec693 # v0.17.8
id: sbom_spdx
with:
config: ${{ inputs.config }}
Expand All @@ -122,7 +122,7 @@ runs:
github-token: ${{ inputs.github-token }}

- name: Generate CycloneDX SBOM Using Syft
uses: anchore/sbom-action@v0.17.8
uses: anchore/sbom-action@55dc4ee22412511ee8c3142cbea40418e6cec693 # v0.17.8
id: sbom_cyclonedx
with:
config: ${{ inputs.config }}
Expand All @@ -138,14 +138,14 @@ runs:
github-token: ${{ inputs.github-token }}

- name: Check SBOM files existence
uses: andstor/file-existence-action@v3
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
id: sbom_report
with:
files: "${{ steps.meta.outputs.sbom_spdx_file }}, ${{ steps.meta.outputs.sbom_cyclonedx_file }}"
fail: true

- name: Download Grype
uses: anchore/scan-action/download-grype@v4.1.2
uses: anchore/scan-action/download-grype@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2

# Skip Cache Restoration: If skip_grype_db_cache is true, skip the restoration of the cache.
# Check for any existing cache to reuse
Expand Down Expand Up @@ -223,7 +223,7 @@ runs:
# Grype is invoked first time ever
# Don't fail during report generation
- name: Vulnerability analysis of SBOM
uses: anchore/scan-action@v4.1.2
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
id: grype_analysis_sarif
if: ${{ steps.sbom_report.outputs.files_exists == 'true' && steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }}
with:
Expand All @@ -238,7 +238,7 @@ runs:
# Don't fail during report generation
# JSON format will report any ignored rules
- name: Vulnerability analysis of SBOM
uses: anchore/scan-action@v4.1.2
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
id: grype_analysis_json
if: ${{ steps.sbom_report.outputs.files_exists == 'true' && steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }}
with:
Expand All @@ -252,7 +252,7 @@ runs:

- name: Check vulnerability analysis report existence
if: ${{ steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }} # Run only if DB is available on the runner
uses: andstor/file-existence-action@v3
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
id: grype_report
with:
files: "${{ steps.grype_analysis_sarif.outputs.sarif }}, ${{ steps.grype_analysis_json.outputs.json }}"
Expand Down Expand Up @@ -290,7 +290,7 @@ runs:
# Notify grype quick scan results in table format
# Table format will supress any specified ignore rules
- name: Inspect Vulnerability analysis of SBOM
uses: anchore/scan-action@v4.1.2
uses: anchore/scan-action@64a33b277ea7a1215a3c142735a1091341939ff5 # v4.1.2
if: ${{ steps.sbom_report.outputs.files_exists == 'true' && steps.grype_db_check_updates.outputs.GRYPE_DB_UPDATE_STATUS == 0 }}
with:
sbom: ${{ steps.meta.outputs.sbom_spdx_file }}
Expand All @@ -303,7 +303,7 @@ runs:

- name: Check docker OCI tar existence
if: ${{ steps.meta.outputs.scan_image != '' }}
uses: andstor/file-existence-action@v3
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3
id: docker_tar
with:
files: "${{ steps.meta.outputs.scan_image }}"
Expand Down
4 changes: 2 additions & 2 deletions security-actions/scan-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ runs:

# Don't fail during report generation
- name: Vulnerability analysis of SBOM
uses: anchore/scan-action@v3.3.5
uses: anchore/scan-action@4be3c24559b430723e51858969965e163b196957 # v3.3.5
continue-on-error: true
id: scan
with:
Expand Down Expand Up @@ -87,7 +87,7 @@ runs:
# Notify grype quick scan results in table format
# Table format will supress any specified ignore rules
- name: Vulnerability Report
uses: anchore/scan-action@v3.3.5
uses: anchore/scan-action@4be3c24559b430723e51858969965e163b196957 # v3.3.5
with:
path: ${{ steps.meta.outputs.scan_dir }}
output-format: table
Expand Down

0 comments on commit d2a3cdb

Please sign in to comment.