diff --git a/README.md b/README.md index 237e43a..d22eace 100644 --- a/README.md +++ b/README.md @@ -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"`. diff --git a/scripts/test-zizmor-policy.sh b/scripts/test-zizmor-policy.sh index b5fca64..9307d53 100755 --- a/scripts/test-zizmor-policy.sh +++ b/scripts/test-zizmor-policy.sh @@ -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." @@ -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 diff --git a/source.toml b/source.toml index d768574..651a779 100644 --- a/source.toml +++ b/source.toml @@ -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"] diff --git a/tests/zizmor-consumer/Fixtures/audit.yml.fixture b/tests/zizmor-consumer/Fixtures/audit.yml.fixture index 1c4e167..869b053 100644 --- a/tests/zizmor-consumer/Fixtures/audit.yml.fixture +++ b/tests/zizmor-consumer/Fixtures/audit.yml.fixture @@ -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