mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 02:26:42 +01:00
ci: enable zizmor to fail PRs (#4556)
* ci: enable zizmor to fail PRs Enable zizmor (gh actions yaml linter) to fail builds in PRs. Fix any outstanding linting errors found by this tool. Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> * fix outdated version comments Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> --------- Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
This commit is contained in:
parent
5987f46353
commit
3e563d90d5
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@ -15,6 +15,8 @@ updates:
|
|||||||
|
|
||||||
- package-ecosystem: gomod
|
- package-ecosystem: gomod
|
||||||
directory: "/"
|
directory: "/"
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
day: "friday"
|
day: "friday"
|
||||||
@ -34,6 +36,8 @@ updates:
|
|||||||
directories:
|
directories:
|
||||||
- "/"
|
- "/"
|
||||||
- "/.github/actions/bootstrap"
|
- "/.github/actions/bootstrap"
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
day: "friday"
|
day: "friday"
|
||||||
|
|||||||
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 #v3.29.5
|
uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
@ -58,7 +58,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 #v3.29.5
|
uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@ -72,4 +72,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 #v3.29.5
|
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
|
||||||
|
|||||||
@ -30,6 +30,7 @@ jobs:
|
|||||||
- name: "Run zizmor"
|
- name: "Run zizmor"
|
||||||
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
|
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
|
||||||
with:
|
with:
|
||||||
config-file: .github/zizmor.yml
|
config: .github/zizmor.yml
|
||||||
sarif-upload: true
|
# Disable SARIF upload so the step is a simple pass/fail gate
|
||||||
|
advanced-security: false
|
||||||
inputs: .github
|
inputs: .github
|
||||||
|
|||||||
8
.github/zizmor.yml
vendored
8
.github/zizmor.yml
vendored
@ -1,9 +1,9 @@
|
|||||||
rules:
|
rules:
|
||||||
unpinned-uses:
|
unpinned-uses:
|
||||||
ignore:
|
config:
|
||||||
# Allow unpinned uses of trusted internal anchore/workflows actions
|
policies:
|
||||||
- update-anchore-dependencies.yml
|
# anchore/workflows is an internal repository; using @main is acceptable
|
||||||
|
anchore/*: any
|
||||||
dangerous-triggers:
|
dangerous-triggers:
|
||||||
ignore:
|
ignore:
|
||||||
# Safe use of pull_request_target - only runs trusted scripts from base repo,
|
# Safe use of pull_request_target - only runs trusted scripts from base repo,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user