Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ The source enables these plugins at the versions and modes every project runs: T
actionlint, OSV-Scanner, Trivy (misconfiguration and dependency scanning), editorconfig-checker, PHPCS, PHP CS Fixer,
PHPStan, Radarlint, Terraform (formatting only) and TFLint. A plugin with nothing to lint in a repository does not run
there. The source also sets the PHP runtime and shared excludes, stops qlty discarding PHPCS 4.x findings as a crash,
and supplies the ESLint and Biome wiring for projects that enable them.
supplies the ESLint and Biome wiring for projects that enable them, and sets the zizmor version for projects that enable
zizmor.

List a plugin in your own file only to change it. A version or mode you leave out is taken from the source, but a list
you set, such as `drivers` or `extra_packages`, replaces the source's. To turn a plugin off, set `mode = "disabled"`.
Expand Down
5 changes: 4 additions & 1 deletion scripts/test-zizmor-policy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ fail() {
}

# The fixture's lines 13 to 16 are the checkout, the organization action, the
# third-party action and the injected run step.
# third-party action and the injected run step; lines 19 and 22 call the
# organization's and a third party's reusable workflows.
expect_reported() {
if ! grep -Eq "^ +$1:[0-9]+ .*zizmor/$2" <<< "${scan_output}"; then
fail "Expected zizmor to report $2 on line $1."
Expand All @@ -57,8 +58,10 @@ expect_silent() {
# green run would prove nothing.
expect_reported 15 unpinned-uses
expect_reported 16 template-injection
expect_reported 22 unpinned-uses

# The shared policy lets GitHub's and this organization's actions keep a tag,
# and turns off the checkout credential audit.
expect_silent 13
expect_silent 14
expect_silent 19
3 changes: 3 additions & 0 deletions source.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ exported_config_paths = ["security/.gitleaks.toml"]
[plugins.definitions.trivy]
exported_config_paths = ["security/trivy.yaml"]

# Pins the version a consumer runs without turning zizmor on for every consumer.
# Earlier releases skip reusable workflow references, which qlty Cloud reports.
[plugins.definitions.zizmor]
exported_config_paths = ["security/zizmor.yml"]
known_good_version = "1.32.0"

[plugins.definitions.editorconfig-checker]
exported_config_paths = ["editorconfig/.editorconfig-checker.json"]
Expand Down
6 changes: 6 additions & 0 deletions tests/zizmor-consumer/Fixtures/audit.yml.fixture
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ jobs:
- uses: sinemacula/example-action@v1
- uses: example-vendor/example-action@v1
- run: echo "${{ github.event.pull_request.title }}"

build:
uses: sinemacula/example-workflows/.github/workflows/build.yml@v1

deploy:
uses: example-vendor/example-workflows/.github/workflows/deploy.yml@v1
Loading