zizmor 1.3.0__tar.gz → 1.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of zizmor might be problematic. Click here for more details.

Files changed (204) hide show
  1. {zizmor-1.3.0 → zizmor-1.3.1}/.github/workflows/ci.yml +5 -3
  2. {zizmor-1.3.0 → zizmor-1.3.1}/.github/workflows/site.yml +1 -1
  3. {zizmor-1.3.0 → zizmor-1.3.1}/.github/workflows/zizmor.yml +2 -2
  4. {zizmor-1.3.0 → zizmor-1.3.1}/Cargo.lock +13 -13
  5. {zizmor-1.3.0 → zizmor-1.3.1}/Cargo.toml +10 -4
  6. {zizmor-1.3.0 → zizmor-1.3.1}/PKG-INFO +13 -3
  7. {zizmor-1.3.0 → zizmor-1.3.1}/README.md +12 -2
  8. {zizmor-1.3.0 → zizmor-1.3.1}/docs/development.md +22 -7
  9. {zizmor-1.3.0 → zizmor-1.3.1}/docs/release-notes.md +21 -1
  10. {zizmor-1.3.0 → zizmor-1.3.1}/docs/snippets/trophies.md +67 -0
  11. {zizmor-1.3.0 → zizmor-1.3.1}/docs/snippets/trophies.txt +11 -0
  12. {zizmor-1.3.0 → zizmor-1.3.1}/docs/usage.md +1 -1
  13. {zizmor-1.3.0 → zizmor-1.3.1}/src/expr/expr.pest +1 -1
  14. {zizmor-1.3.0 → zizmor-1.3.1}/src/expr/mod.rs +4 -0
  15. {zizmor-1.3.0 → zizmor-1.3.1}/src/github_api.rs +1 -1
  16. {zizmor-1.3.0 → zizmor-1.3.1}/src/main.rs +9 -2
  17. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshot.rs +22 -25
  18. zizmor-1.3.1/tests/snapshots/snapshot__ref_confusion-2.snap +5 -0
  19. zizmor-1.3.1/tests/snapshots/snapshot__ref_confusion.snap +13 -0
  20. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/artipacked/issue-447-repro.yml +1 -1
  21. zizmor-1.3.1/tests/test-data/ref-confusion/issue-518-repro.yml +12 -0
  22. zizmor-1.3.1/tests/test-data/ref-confusion.yml +11 -0
  23. zizmor-1.3.0/tests/snapshots/snapshot__conflicting_online_options-2.snap +0 -10
  24. zizmor-1.3.0/tests/snapshots/snapshot__conflicting_online_options-3.snap +0 -10
  25. zizmor-1.3.0/tests/snapshots/snapshot__conflicting_online_options.snap +0 -10
  26. {zizmor-1.3.0 → zizmor-1.3.1}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  27. {zizmor-1.3.0 → zizmor-1.3.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  28. {zizmor-1.3.0 → zizmor-1.3.1}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  29. {zizmor-1.3.0 → zizmor-1.3.1}/.github/dependabot.yml +0 -0
  30. {zizmor-1.3.0 → zizmor-1.3.1}/.github/workflows/pypi.yml +0 -0
  31. {zizmor-1.3.0 → zizmor-1.3.1}/.github/workflows/release.yml +0 -0
  32. {zizmor-1.3.0 → zizmor-1.3.1}/.gitignore +0 -0
  33. {zizmor-1.3.0 → zizmor-1.3.1}/CONTRIBUTING.md +0 -0
  34. {zizmor-1.3.0 → zizmor-1.3.1}/LICENSE +0 -0
  35. {zizmor-1.3.0 → zizmor-1.3.1}/Makefile +0 -0
  36. {zizmor-1.3.0 → zizmor-1.3.1}/docs/assets/favicon48x48.png +0 -0
  37. {zizmor-1.3.0 → zizmor-1.3.1}/docs/assets/rainbow.svg +0 -0
  38. {zizmor-1.3.0 → zizmor-1.3.1}/docs/assets/zizmor-demo.gif +0 -0
  39. {zizmor-1.3.0 → zizmor-1.3.1}/docs/audits.md +0 -0
  40. {zizmor-1.3.0 → zizmor-1.3.1}/docs/configuration.md +0 -0
  41. {zizmor-1.3.0 → zizmor-1.3.1}/docs/index.md +0 -0
  42. {zizmor-1.3.0 → zizmor-1.3.1}/docs/installation.md +0 -0
  43. {zizmor-1.3.0 → zizmor-1.3.1}/docs/magiclink.css +0 -0
  44. {zizmor-1.3.0 → zizmor-1.3.1}/docs/quickstart.md +0 -0
  45. {zizmor-1.3.0 → zizmor-1.3.1}/docs/snippets/help.txt +0 -0
  46. {zizmor-1.3.0 → zizmor-1.3.1}/docs/snippets/render-sponsors.py +0 -0
  47. {zizmor-1.3.0 → zizmor-1.3.1}/docs/snippets/render-trophies.py +0 -0
  48. {zizmor-1.3.0 → zizmor-1.3.1}/docs/snippets/sponsors.html +0 -0
  49. {zizmor-1.3.0 → zizmor-1.3.1}/docs/snippets/sponsors.json +0 -0
  50. {zizmor-1.3.0 → zizmor-1.3.1}/docs/trophy-case.md +0 -0
  51. {zizmor-1.3.0 → zizmor-1.3.1}/mkdocs.yml +0 -0
  52. {zizmor-1.3.0 → zizmor-1.3.1}/pyproject.toml +0 -0
  53. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/artipacked.rs +0 -0
  54. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/bot_conditions.rs +0 -0
  55. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/cache_poisoning.rs +0 -0
  56. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/dangerous_triggers.rs +0 -0
  57. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/excessive_permissions.rs +0 -0
  58. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/github_env.rs +0 -0
  59. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/hardcoded_container_credentials.rs +0 -0
  60. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/impostor_commit.rs +0 -0
  61. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/insecure_commands.rs +0 -0
  62. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/known_vulnerable_actions.rs +0 -0
  63. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/mod.rs +0 -0
  64. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/overprovisioned_secrets.rs +0 -0
  65. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/ref_confusion.rs +0 -0
  66. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/secrets_inherit.rs +0 -0
  67. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/self_hosted_runner.rs +0 -0
  68. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/template_injection.rs +0 -0
  69. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/unpinned_uses.rs +0 -0
  70. {zizmor-1.3.0 → zizmor-1.3.1}/src/audit/use_trusted_publishing.rs +0 -0
  71. {zizmor-1.3.0 → zizmor-1.3.1}/src/config.rs +0 -0
  72. {zizmor-1.3.0 → zizmor-1.3.1}/src/finding/mod.rs +0 -0
  73. {zizmor-1.3.0 → zizmor-1.3.1}/src/models/coordinate.rs +0 -0
  74. {zizmor-1.3.0 → zizmor-1.3.1}/src/models/uses.rs +0 -0
  75. {zizmor-1.3.0 → zizmor-1.3.1}/src/models.rs +0 -0
  76. {zizmor-1.3.0 → zizmor-1.3.1}/src/registry.rs +0 -0
  77. {zizmor-1.3.0 → zizmor-1.3.1}/src/render.rs +0 -0
  78. {zizmor-1.3.0 → zizmor-1.3.1}/src/sarif.rs +0 -0
  79. {zizmor-1.3.0 → zizmor-1.3.1}/src/state.rs +0 -0
  80. {zizmor-1.3.0 → zizmor-1.3.1}/src/utils.rs +0 -0
  81. {zizmor-1.3.0 → zizmor-1.3.1}/tests/acceptance.rs +0 -0
  82. {zizmor-1.3.0 → zizmor-1.3.1}/tests/common.rs +0 -0
  83. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__artipacked-2.snap +0 -0
  84. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__artipacked-3.snap +0 -0
  85. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__artipacked-4.snap +0 -0
  86. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__artipacked.snap +0 -0
  87. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__bot_conditions.snap +0 -0
  88. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-10.snap +0 -0
  89. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-11.snap +0 -0
  90. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-12.snap +0 -0
  91. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-13.snap +0 -0
  92. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-14.snap +0 -0
  93. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-2.snap +0 -0
  94. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-3.snap +0 -0
  95. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-4.snap +0 -0
  96. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-5.snap +0 -0
  97. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-6.snap +0 -0
  98. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-7.snap +0 -0
  99. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-8.snap +0 -0
  100. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning-9.snap +0 -0
  101. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cache_poisoning.snap +0 -0
  102. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__cant_retrieve.snap +0 -0
  103. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-10.snap +0 -0
  104. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-11.snap +0 -0
  105. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-12.snap +0 -0
  106. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-2.snap +0 -0
  107. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-3.snap +0 -0
  108. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-4.snap +0 -0
  109. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-5.snap +0 -0
  110. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-6.snap +0 -0
  111. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-7.snap +0 -0
  112. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-8.snap +0 -0
  113. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions-9.snap +0 -0
  114. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__excessive_permissions.snap +0 -0
  115. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__github_env-2.snap +0 -0
  116. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__github_env-3.snap +0 -0
  117. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__github_env.snap +0 -0
  118. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__insecure_commands-2.snap +0 -0
  119. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__insecure_commands-3.snap +0 -0
  120. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__insecure_commands.snap +0 -0
  121. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__invalid_inputs.snap +0 -0
  122. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__overprovisioned_secrets.snap +0 -0
  123. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__secrets_inherit.snap +0 -0
  124. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted-2.snap +0 -0
  125. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted-3.snap +0 -0
  126. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted-4.snap +0 -0
  127. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted-5.snap +0 -0
  128. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted-6.snap +0 -0
  129. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted-7.snap +0 -0
  130. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted-8.snap +0 -0
  131. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__self_hosted.snap +0 -0
  132. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection-2.snap +0 -0
  133. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection-3.snap +0 -0
  134. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection-4.snap +0 -0
  135. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection-5.snap +0 -0
  136. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection-6.snap +0 -0
  137. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection-7.snap +0 -0
  138. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection-8.snap +0 -0
  139. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__template_injection.snap +0 -0
  140. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__unpinned_uses-2.snap +0 -0
  141. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__unpinned_uses-3.snap +0 -0
  142. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__unpinned_uses-4.snap +0 -0
  143. {zizmor-1.3.0 → zizmor-1.3.1}/tests/snapshots/snapshot__unpinned_uses.snap +0 -0
  144. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/artipacked.yml +0 -0
  145. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/bot-conditions.yml +0 -0
  146. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-disabled-by-default.yml +0 -0
  147. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-enabled-by-default.yml +0 -0
  148. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-not-configurable.yml +0 -0
  149. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-opt-in-boolean-toggle.yml +0 -0
  150. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-opt-in-boolish-toggle.yml +0 -0
  151. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-opt-in-expression.yml +0 -0
  152. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-opt-in-multi-value-toggle.yml +0 -0
  153. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/caching-opt-out.yml +0 -0
  154. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/issue-343-repro.yml +0 -0
  155. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/issue-378-repro.yml +0 -0
  156. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/no-cache-aware-steps.yml +0 -0
  157. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/publisher-step.yml +0 -0
  158. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/workflow-release-branch-trigger.yml +0 -0
  159. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning/workflow-tag-trigger.yml +0 -0
  160. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/cache-poisoning.yml +0 -0
  161. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/issue-336-repro.yml +0 -0
  162. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/issue-472-repro.yml +0 -0
  163. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/jobs-broaden-permissions.yml +0 -0
  164. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/reusable-workflow-call.yml +0 -0
  165. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/reusable-workflow-other-triggers.yml +0 -0
  166. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/workflow-default-perms-all-jobs-explicit.yml +0 -0
  167. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/workflow-default-perms.yml +0 -0
  168. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/workflow-empty-perms.yml +0 -0
  169. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/workflow-read-all.yml +0 -0
  170. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/workflow-write-all.yml +0 -0
  171. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions/workflow-write-explicit.yml +0 -0
  172. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/excessive-permissions.yml +0 -0
  173. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/github-env/action.yml +0 -0
  174. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/github-env/github-path.yml +0 -0
  175. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/github-env/issue-397-repro.yml +0 -0
  176. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/github_env.yml +0 -0
  177. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/hardcoded-credentials.yml +0 -0
  178. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/inlined-ignores.yml +0 -0
  179. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/insecure-commands/action.yml +0 -0
  180. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/insecure-commands.yml +0 -0
  181. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/invalid/invalid-workflow.yml +0 -0
  182. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/overprovisioned-secrets.yml +0 -0
  183. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/secrets-inherit.yml +0 -0
  184. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/self-hosted/issue-283-repro.yml +0 -0
  185. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/self-hosted/self-hosted-matrix-dimension.yml +0 -0
  186. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/self-hosted/self-hosted-matrix-exclusion.yml +0 -0
  187. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/self-hosted/self-hosted-matrix-inclusion.yml +0 -0
  188. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/self-hosted/self-hosted-runner-group.yml +0 -0
  189. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/self-hosted/self-hosted-runner-label.yml +0 -0
  190. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/self-hosted.yml +0 -0
  191. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/issue-22-repro.yml +0 -0
  192. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/issue-339-repro.yml +0 -0
  193. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/issue-418-repro.yml +0 -0
  194. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/pr-317-repro.yml +0 -0
  195. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/pr-425-backstop/action.yml +0 -0
  196. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/static-env.yml +0 -0
  197. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/template-injection-dynamic-matrix.yml +0 -0
  198. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection/template-injection-static-matrix.yml +0 -0
  199. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/template-injection.yml +0 -0
  200. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/unpinned-uses/action.yml +0 -0
  201. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/unpinned-uses/issue-433-repro.yml +0 -0
  202. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/unpinned-uses.yml +0 -0
  203. {zizmor-1.3.0 → zizmor-1.3.1}/tests/test-data/use-trusted-publishing.yml +0 -0
  204. {zizmor-1.3.0 → zizmor-1.3.1}/uv.lock +0 -0
@@ -33,10 +33,12 @@ jobs:
33
33
 
34
34
  - uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
35
35
 
36
- - uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca # v5.2.1
36
+ - uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
37
37
 
38
38
  - name: Test
39
- run: cargo test
39
+ run: cargo test --features online-tests
40
+ env:
41
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40
42
 
41
43
  - name: Test snippets
42
44
  run: |
@@ -50,7 +52,7 @@ jobs:
50
52
  with:
51
53
  persist-credentials: false
52
54
 
53
- - uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca # v5.2.1
55
+ - uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
54
56
 
55
57
  - name: Test site
56
58
  run: make site
@@ -30,7 +30,7 @@ jobs:
30
30
  persist-credentials: false
31
31
 
32
32
  - name: Install the latest version of uv
33
- uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca # v5.2.1
33
+ uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
34
34
 
35
35
  - name: build site
36
36
  run: make site
@@ -21,13 +21,13 @@ jobs:
21
21
  with:
22
22
  persist-credentials: false
23
23
  - name: Install the latest version of uv
24
- uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca # v5.2.1
24
+ uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
25
25
  - name: Run zizmor 🌈
26
26
  run: uvx zizmor --format sarif . > results.sarif
27
27
  env:
28
28
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
29
  - name: Upload SARIF file
30
- uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
30
+ uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
31
31
  with:
32
32
  sarif_file: results.sarif
33
33
  category: zizmor
@@ -125,9 +125,9 @@ dependencies = [
125
125
 
126
126
  [[package]]
127
127
  name = "async-trait"
128
- version = "0.1.83"
128
+ version = "0.1.86"
129
129
  source = "registry+https://github.com/rust-lang/crates.io-index"
130
- checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
130
+ checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d"
131
131
  dependencies = [
132
132
  "proc-macro2",
133
133
  "quote",
@@ -616,9 +616,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
616
616
 
617
617
  [[package]]
618
618
  name = "github-actions-models"
619
- version = "0.23.0"
619
+ version = "0.25.0"
620
620
  source = "registry+https://github.com/rust-lang/crates.io-index"
621
- checksum = "f2269402e4d8fe06d41aa858a0fe15a49842764334d0aacc52f5f41e11466e30"
621
+ checksum = "d3d33cc977e9aaa73b0e447c5c387e1720dcdfbc54e7f86e32c76e2a78bfcb9c"
622
622
  dependencies = [
623
623
  "indexmap",
624
624
  "serde",
@@ -660,9 +660,9 @@ dependencies = [
660
660
 
661
661
  [[package]]
662
662
  name = "http"
663
- version = "1.1.0"
663
+ version = "1.2.0"
664
664
  source = "registry+https://github.com/rust-lang/crates.io-index"
665
- checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
665
+ checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
666
666
  dependencies = [
667
667
  "bytes",
668
668
  "fnv",
@@ -694,9 +694,9 @@ dependencies = [
694
694
 
695
695
  [[package]]
696
696
  name = "http-cache"
697
- version = "0.20.0"
697
+ version = "0.20.1"
698
698
  source = "registry+https://github.com/rust-lang/crates.io-index"
699
- checksum = "33b65cd1687caf2c7fff496741a2f264c26f54e6d6cec03dac8f276fa4e5430e"
699
+ checksum = "7e883defacf53960c7717d9e928dc8667be9501d9f54e6a8b7703d7a30320e9c"
700
700
  dependencies = [
701
701
  "async-trait",
702
702
  "bincode",
@@ -710,9 +710,9 @@ dependencies = [
710
710
 
711
711
  [[package]]
712
712
  name = "http-cache-reqwest"
713
- version = "0.15.0"
713
+ version = "0.15.1"
714
714
  source = "registry+https://github.com/rust-lang/crates.io-index"
715
- checksum = "735586904a5ce0c13877c57cb4eb8195eb7c11ec1ffd64d4db053fb8559ca62e"
715
+ checksum = "e076afd9d376f09073b515ce95071b29393687d98ed521948edb899195595ddf"
716
716
  dependencies = [
717
717
  "anyhow",
718
718
  "async-trait",
@@ -1803,9 +1803,9 @@ dependencies = [
1803
1803
 
1804
1804
  [[package]]
1805
1805
  name = "serde_json"
1806
- version = "1.0.137"
1806
+ version = "1.0.138"
1807
1807
  source = "registry+https://github.com/rust-lang/crates.io-index"
1808
- checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b"
1808
+ checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949"
1809
1809
  dependencies = [
1810
1810
  "itoa",
1811
1811
  "memchr",
@@ -3151,7 +3151,7 @@ dependencies = [
3151
3151
 
3152
3152
  [[package]]
3153
3153
  name = "zizmor"
3154
- version = "1.3.0"
3154
+ version = "1.3.1"
3155
3155
  dependencies = [
3156
3156
  "annotate-snippets",
3157
3157
  "anstream",
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "zizmor"
3
3
  description = "Static analysis for GitHub Actions"
4
- version = "1.3.0"
4
+ version = "1.3.1"
5
5
  edition = "2021"
6
6
  repository = "https://github.com/woodruffw/zizmor"
7
7
  homepage = "https://github.com/woodruffw/zizmor"
@@ -12,6 +12,12 @@ keywords = ["cli", "github-actions", "static-analysis", "security"]
12
12
  categories = ["command-line-utilities"]
13
13
  rust-version = "1.80.1"
14
14
 
15
+ [features]
16
+ # Test-only: enable online audits that make use of a GitHub token via GH_TOKEN.
17
+ gh-token-tests = []
18
+ # Test-only: enable all online audits.
19
+ online-tests = ["gh-token-tests"]
20
+
15
21
  [dependencies]
16
22
  annotate-snippets = "0.11.5"
17
23
  anstream = "0.6.18"
@@ -23,8 +29,8 @@ clap-verbosity-flag = { version = "3.0.2", features = [
23
29
  ], default-features = false }
24
30
  etcetera = "0.8.0"
25
31
  flate2 = "1.0.35"
26
- github-actions-models = "0.23.0"
27
- http-cache-reqwest = "0.15.0"
32
+ github-actions-models = "0.25.0"
33
+ http-cache-reqwest = "0.15.1"
28
34
  human-panic = "2.0.1"
29
35
  indexmap = "2.7.1"
30
36
  indicatif = "0.17.11"
@@ -42,7 +48,7 @@ reqwest = { version = "0.12.12", features = [
42
48
  reqwest-middleware = "0.4.0"
43
49
  serde = { version = "1.0.217", features = ["derive"] }
44
50
  serde-sarif = "0.7.0"
45
- serde_json = "1.0.137"
51
+ serde_json = "1.0.138"
46
52
  serde_yaml = "0.9.34"
47
53
  # TODO remove pending https://github.com/tree-sitter/tree-sitter/pull/4034
48
54
  streaming-iterator = "0.1.9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zizmor
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  License-File: LICENSE
5
5
  Summary: Static analysis for GitHub Actions
6
6
  Keywords: cli,github-actions,static-analysis,security
@@ -19,8 +19,18 @@ Project-URL: Source Code, https://github.com/woodruffw/zizmor
19
19
  [![Packaging status](https://repology.org/badge/tiny-repos/zizmor.svg)](https://repology.org/project/zizmor/versions)
20
20
  [![GitHub Sponsors](https://img.shields.io/github/sponsors/woodruffw?style=flat&logo=githubsponsors&labelColor=white&color=white)](https://github.com/sponsors/woodruffw)
21
21
 
22
- `zizmor` is a static analysis tool for GitHub Actions. It can find
23
- many common security issues in typical GitHub Actions CI/CD setups.
22
+ `zizmor` is a static analysis tool for GitHub Actions.
23
+
24
+ It can find many common security issues in typical GitHub Actions CI/CD setups,
25
+ including:
26
+
27
+ * Template injection vulnerabilities, leading to attacker-controlled code execution
28
+ * Accidental credential persistence and leakage
29
+ * Excessive permission scopes and credential grants to runners
30
+ * Impostor commits and confusable `git` references
31
+ * ...[and much more]!
32
+
33
+ [and much more]: https://woodruffw.github.io/zizmor/audits/
24
34
 
25
35
  ![zizmor demo](https://raw.githubusercontent.com/woodruffw/zizmor/main/docs/assets/zizmor-demo.gif)
26
36
 
@@ -5,8 +5,18 @@
5
5
  [![Packaging status](https://repology.org/badge/tiny-repos/zizmor.svg)](https://repology.org/project/zizmor/versions)
6
6
  [![GitHub Sponsors](https://img.shields.io/github/sponsors/woodruffw?style=flat&logo=githubsponsors&labelColor=white&color=white)](https://github.com/sponsors/woodruffw)
7
7
 
8
- `zizmor` is a static analysis tool for GitHub Actions. It can find
9
- many common security issues in typical GitHub Actions CI/CD setups.
8
+ `zizmor` is a static analysis tool for GitHub Actions.
9
+
10
+ It can find many common security issues in typical GitHub Actions CI/CD setups,
11
+ including:
12
+
13
+ * Template injection vulnerabilities, leading to attacker-controlled code execution
14
+ * Accidental credential persistence and leakage
15
+ * Excessive permission scopes and credential grants to runners
16
+ * Impostor commits and confusable `git` references
17
+ * ...[and much more]!
18
+
19
+ [and much more]: https://woodruffw.github.io/zizmor/audits/
10
20
 
11
21
  ![zizmor demo](https://raw.githubusercontent.com/woodruffw/zizmor/main/docs/assets/zizmor-demo.gif)
12
22
 
@@ -90,6 +90,21 @@ cargo test --test snapshot
90
90
  cargo test
91
91
  ```
92
92
 
93
+ ### Online tests
94
+
95
+ `zizmor` has some online tests that are ignored by default. These
96
+ tests are gated behind crate features:
97
+
98
+ - `gh-token-tests`: Enable online tests that use the GitHub API.
99
+ - `online-tests`: Enable all online tests, including `gh-token-tests`.
100
+
101
+ To run these successfully, you'll need to set the `GH_TOKEN` environment
102
+ variable and pass the `--features` flag to `cargo test`:
103
+
104
+ ```bash
105
+ GH_TOKEN=$(gh auth token) cargo test --features online-tests
106
+ ```
107
+
93
108
  ### Writing snapshot tests
94
109
 
95
110
  `zizmor` uses @mitsuhiko/insta for snapshot testing.
@@ -215,9 +230,9 @@ Some things that can be useful to discuss beforehand:
215
230
  When developing a new `zizmor` audit, there are a couple of implementation details to be aware of:
216
231
 
217
232
  - All existing audits live in a Rust modules grouped under `src/audit` folder
218
- - The expected behavior for all audits is defined by the `WorkflowAudit` trait at `src/audit/mod.rs`
233
+ - The expected behavior for all audits is defined by the `Audit` trait at `src/audit/mod.rs`
219
234
  - The expected outcome of an executed audit is defined by the `Finding` struct at `src/finding/mod.rs`
220
- - Any `WorkflowAudit` implementation can have access to an `AuditState` instance, as per `src/state.rs`
235
+ - Any `Audit` implementation can have access to an `AuditState` instance, as per `src/state.rs`
221
236
  - If an audit requires data from the GitHub API, there is a `Client` implementation at `src/github_api.rs`
222
237
  - All the audits must be registered at `src/main.rs` according to the `register_audit!` macro
223
238
 
@@ -233,12 +248,12 @@ cargo test
233
248
 
234
249
  !!! tip
235
250
 
236
- `WorkflowAudit` has various default implementations that are useful if your
251
+ `Audit` has various default implementations that are useful if your
237
252
  audit only needs to look at individual jobs, steps, etc.
238
253
 
239
- For example, you may want to implement `WorkflowAudit::audit_step` to
254
+ For example, you may want to implement `Audit::audit_step` to
240
255
  audit each step individually rather than having to iterate from the workflow
241
- downwards with `WorkflowAudit::audit`.
256
+ downwards with `Audit::audit`.
242
257
 
243
258
  !!! tip
244
259
 
@@ -248,8 +263,8 @@ The general procedure for adding a new audit can be described as:
248
263
 
249
264
  - Define a new file at `src/audit/my_new_audit.rs`
250
265
  - Define a struct like `MyNewAudit`
251
- - Use the `audit_meta!` macro to implement `Audit` for `MyNewAudit`
252
- - Implement the `WorkflowAudit` trait for `MyNewAudit`
266
+ - Use the `audit_meta!` macro to implement `AuditCore` for `MyNewAudit`
267
+ - Implement the `Audit` trait for `MyNewAudit`
253
268
  - You may want to use both the `AuditState` and `github_api::Client` to get the job done
254
269
  - Assign the proper `location` when creating a `Finding`, grabbing it from the
255
270
  proper `Workflow`, `Job` or `Step` instance
@@ -9,7 +9,27 @@ of `zizmor`.
9
9
 
10
10
  ## Next (UNRELEASED)
11
11
 
12
- Nothing to see here yet!
12
+ Nothing yet!
13
+
14
+ ## v1.3.1
15
+
16
+ ### Improvements 🌱
17
+
18
+ * Passing both `--offline` and a GitHub token (either implicitly with
19
+ `GH_TOKEN` or explicitly with `--gh-token`) no longer results in an
20
+ error. `--offline` is now given precedence, regardless of
21
+ any other flags or environment settings (#519)
22
+
23
+ ### Bug Fixes 🐛
24
+
25
+ * Fixed a bug where `zizmor` would fail to parse composite actions with
26
+ inputs/outputs that are missing descriptions (#502)
27
+ * Expressions that contain indices with non-semantic whitespace are now parsed
28
+ correctly (#511)
29
+ * Fixed a false positive in [ref-confusion] where partial tag matches were
30
+ incorrectly considered confusable (#519)
31
+ * Fixed a bug where `zizmor` would fail to parse workflow definitions with
32
+ an expression inside `strategy.max-parallel` (#522)
13
33
 
14
34
  ## v1.3.0
15
35
 
@@ -16,6 +16,16 @@
16
16
  - apache/opennlp#736
17
17
 
18
18
 
19
+ - ![](https://github.com/artichoke.png?size=40){ width="40" loading=lazy align=left } artichoke
20
+
21
+ ---
22
+
23
+ ??? example "Examples"
24
+ - artichoke/boba#265
25
+ - artichoke/project-infrastructure#683
26
+ - artichoke/setup-rust#121
27
+
28
+
19
29
  - ![](https://github.com/ashishb.png?size=40){ width="40" loading=lazy align=left } ashishb
20
30
 
21
31
  ---
@@ -419,6 +429,14 @@
419
429
  - mongodb-labs/flask-pymongo#170
420
430
 
421
431
 
432
+ - ![](https://github.com/mozilla.png?size=40){ width="40" loading=lazy align=left } mozilla
433
+
434
+ ---
435
+
436
+ ??? example "Examples"
437
+ - mozilla/neqo#2413
438
+
439
+
422
440
  - ![](https://github.com/narwhals-dev.png?size=40){ width="40" loading=lazy align=left } narwhals-dev
423
441
 
424
442
  ---
@@ -631,6 +649,7 @@
631
649
 
632
650
  ??? example "Examples"
633
651
  - python-telegram-bot/python-telegram-bot#4606
652
+ - python-telegram-bot/python-telegram-bot#4668
634
653
 
635
654
 
636
655
  - ![](https://github.com/python-trio.png?size=40){ width="40" loading=lazy align=left } python-trio
@@ -641,6 +660,14 @@
641
660
  - python-trio/trio#3154
642
661
 
643
662
 
663
+ - ![](https://github.com/pyvista.png?size=40){ width="40" loading=lazy align=left } pyvista
664
+
665
+ ---
666
+
667
+ ??? example "Examples"
668
+ - pyvista/pyvista#7006
669
+
670
+
644
671
  - ![](https://github.com/PyVRP.png?size=40){ width="40" loading=lazy align=left } PyVRP
645
672
 
646
673
  ---
@@ -684,6 +711,30 @@
684
711
  - Saghen/blink.cmp#991
685
712
 
686
713
 
714
+ - ![](https://github.com/scientific-python.png?size=40){ width="40" loading=lazy align=left } scientific-python
715
+
716
+ ---
717
+
718
+ ??? example "Examples"
719
+ - scientific-python/repo-review#257
720
+
721
+
722
+ - ![](https://github.com/scikit-build.png?size=40){ width="40" loading=lazy align=left } scikit-build
723
+
724
+ ---
725
+
726
+ ??? example "Examples"
727
+ - scikit-build/scikit-build-core#983
728
+
729
+
730
+ - ![](https://github.com/scikit-image.png?size=40){ width="40" loading=lazy align=left } scikit-image
731
+
732
+ ---
733
+
734
+ ??? example "Examples"
735
+ - scikit-image/scikit-image#7662
736
+
737
+
687
738
  - ![](https://github.com/sigstore.png?size=40){ width="40" loading=lazy align=left } sigstore
688
739
 
689
740
  ---
@@ -799,6 +850,22 @@
799
850
  - wagtail/wagtail-localize#843
800
851
 
801
852
 
853
+ - ![](https://github.com/wntrblm.png?size=40){ width="40" loading=lazy align=left } wntrblm
854
+
855
+ ---
856
+
857
+ ??? example "Examples"
858
+ - wntrblm/nox#925
859
+
860
+
861
+ - ![](https://github.com/zcash.png?size=40){ width="40" loading=lazy align=left } zcash
862
+
863
+ ---
864
+
865
+ ??? example "Examples"
866
+ - zcash/librustzcash#1679
867
+
868
+
802
869
  - ![](https://github.com/zkonduit.png?size=40){ width="40" loading=lazy align=left } zkonduit
803
870
 
804
871
  ---
@@ -7,6 +7,9 @@
7
7
  adafruit/circuitpython#9785
8
8
  apache/airflow#45408
9
9
  apache/opennlp#736
10
+ artichoke/boba#265
11
+ artichoke/project-infrastructure#683
12
+ artichoke/setup-rust#121
10
13
  ashishb/wp2hugo#91
11
14
  astral-sh/ruff#14844
12
15
  astropy/astropy#17315
@@ -88,6 +91,7 @@ MoarVM/MoarVM#1875
88
91
  mongodb/motor#312
89
92
  mongodb/mongo-python-driver#2001
90
93
  mongodb-labs/flask-pymongo#170
94
+ mozilla/neqo#2413
91
95
  narwhals-dev/narwhals#1567
92
96
  NetApp/harvest#3247
93
97
  nextcloud/.github#477
@@ -126,7 +130,9 @@ python-poetry/poetry-core#799
126
130
  python-poetry/poetry-plugin-export#308
127
131
  python-poetry/poetry-plugin-bundle#125
128
132
  python-telegram-bot/python-telegram-bot#4606
133
+ python-telegram-bot/python-telegram-bot#4668
129
134
  python-trio/trio#3154
135
+ pyvista/pyvista#7006
130
136
  PyVRP/PyVRP#670
131
137
  PyO3/pyo3#4774
132
138
  rubygems/rubygems.org#5350
@@ -136,6 +142,9 @@ rustls/rustls#2261
136
142
  rustls/tokio-rustls#96
137
143
  rustls/webpki#299
138
144
  Saghen/blink.cmp#991
145
+ scientific-python/repo-review#257
146
+ scikit-build/scikit-build-core#983
147
+ scikit-image/scikit-image#7662
139
148
  sigstore/cosign#3959
140
149
  sigstore/fulcio#1910
141
150
  sigstore/gitsign#602
@@ -153,5 +162,7 @@ uutils/coreutils#6973
153
162
  ViaVersion/ViaVersion#4315
154
163
  vlang/v#22681
155
164
  wagtail/wagtail-localize#843
165
+ wntrblm/nox#925
166
+ zcash/librustzcash#1679
156
167
  zkonduit/ezkl#907
157
168
  zkonduit/ezkl#906
@@ -457,7 +457,7 @@ To do so, add the following to your `.pre-commit-config.yaml` `repos` section:
457
457
 
458
458
  ```yaml
459
459
  - repo: https://github.com/woodruffw/zizmor-pre-commit
460
- rev: v1.3.0 # (1)!
460
+ rev: v1.3.1 # (1)!
461
461
  hooks:
462
462
  - id: zizmor
463
463
  ```
@@ -73,7 +73,7 @@ null = { "null" }
73
73
  context = ${ (function_call | identifier) ~ (("." ~ (identifier | star)) | index)* }
74
74
  star = { "*" }
75
75
  identifier = @{ (ASCII_ALPHA | "_" | "-") ~ (ASCII_ALPHANUMERIC | "_" | "-")* }
76
- index = { ("[" ~ (or_expr | star) ~ "]") }
76
+ index = !{ ("[" ~ (or_expr | star) ~ "]") }
77
77
 
78
78
  /// Function calls
79
79
  function_call = !{ identifier ~ "(" ~ (or_expr ~ ("," ~ or_expr)*)? ~ ")" }
@@ -527,6 +527,10 @@ mod tests {
527
527
  "foo()[0]",
528
528
  "fromJson(steps.runs.outputs.data).workflow_runs[0].id",
529
529
  multiline,
530
+ "'a' == 'b' && 'c' || 'd'",
531
+ "github.event['a']",
532
+ "github.event['a' == 'b']",
533
+ "github.event['a' == 'b' && 'c' || 'd']",
530
534
  ];
531
535
 
532
536
  for case in cases {
@@ -182,7 +182,7 @@ impl Client {
182
182
  #[tokio::main]
183
183
  pub(crate) async fn has_tag(&self, owner: &str, repo: &str, tag: &str) -> Result<bool> {
184
184
  let url = format!(
185
- "{api_base}/repos/{owner}/{repo}/git/refs/tags/{tag}",
185
+ "{api_base}/repos/{owner}/{repo}/git/ref/tags/{tag}",
186
186
  api_base = self.api_base
187
187
  );
188
188
 
@@ -50,8 +50,7 @@ struct App {
50
50
  ///
51
51
  /// This disables all online audit rules, and prevents zizmor from
52
52
  /// auditing remote repositories.
53
- #[arg(short, long, env = "ZIZMOR_OFFLINE",
54
- conflicts_with_all = ["gh_token", "gh_hostname"])]
53
+ #[arg(short, long, env = "ZIZMOR_OFFLINE")]
55
54
  offline: bool,
56
55
 
57
56
  /// The GitHub API token to use.
@@ -330,6 +329,14 @@ fn run() -> Result<ExitCode> {
330
329
  app.persona = Persona::Pedantic;
331
330
  }
332
331
 
332
+ // Unset the GitHub token if we're in offline mode.
333
+ // We do this manually instead of with clap's `conflicts_with` because
334
+ // we want to support explicitly enabling offline mode while still
335
+ // having `GH_TOKEN` present in the environment.
336
+ if app.offline {
337
+ app.gh_token = None;
338
+ }
339
+
333
340
  let indicatif_layer = IndicatifLayer::new();
334
341
 
335
342
  let filter = EnvFilter::builder()
@@ -1,4 +1,4 @@
1
- use anyhow::Result;
1
+ use anyhow::{Context, Result};
2
2
  use assert_cmd::Command;
3
3
  use common::workflow_under_test;
4
4
 
@@ -36,6 +36,7 @@ impl Zizmor {
36
36
  self
37
37
  }
38
38
 
39
+ #[allow(dead_code)]
39
40
  fn setenv(mut self, key: &str, value: &str) -> Self {
40
41
  self.cmd.env(key, value);
41
42
  self
@@ -65,6 +66,10 @@ impl Zizmor {
65
66
  fn run(mut self) -> Result<String> {
66
67
  if self.offline {
67
68
  self.cmd.arg("--offline");
69
+ } else {
70
+ // If we're running in online mode, we pre-assert the
71
+ // presence of GH_TOKEN to make configuration failures more obvious.
72
+ std::env::var("GH_TOKEN").context("online tests require GH_TOKEN to be set")?;
68
73
  }
69
74
 
70
75
  if let Some(workflow) = &self.workflow {
@@ -103,30 +108,6 @@ fn test_cant_retrieve() -> Result<()> {
103
108
  Ok(())
104
109
  }
105
110
 
106
- #[test]
107
- fn test_conflicting_online_options() -> Result<()> {
108
- insta::assert_snapshot!(zizmor()
109
- .output(OutputMode::Stderr)
110
- .setenv("GH_TOKEN", "phony")
111
- .offline(true)
112
- .run()?);
113
-
114
- insta::assert_snapshot!(zizmor()
115
- .output(OutputMode::Stderr)
116
- .offline(true)
117
- .args(["--gh-token=phony"])
118
- .run()?);
119
-
120
- insta::assert_snapshot!(zizmor()
121
- .output(OutputMode::Stderr)
122
- .setenv("ZIZMOR_OFFLINE", "true")
123
- .setenv("GH_TOKEN", "phony")
124
- .offline(false) // explicitly disable so that we test ZIZMOR_OFFLINE above
125
- .run()?);
126
-
127
- Ok(())
128
- }
129
-
130
111
  #[test]
131
112
  fn test_invalid_inputs() -> Result<()> {
132
113
  insta::assert_snapshot!(zizmor()
@@ -512,3 +493,19 @@ fn overprovisioned_secrets() -> Result<()> {
512
493
 
513
494
  Ok(())
514
495
  }
496
+
497
+ #[cfg_attr(not(feature = "gh-token-tests"), ignore)]
498
+ #[test]
499
+ fn ref_confusion() -> Result<()> {
500
+ insta::assert_snapshot!(zizmor()
501
+ .workflow(workflow_under_test("ref-confusion.yml"))
502
+ .offline(false)
503
+ .run()?);
504
+
505
+ insta::assert_snapshot!(zizmor()
506
+ .workflow(workflow_under_test("ref-confusion/issue-518-repro.yml"))
507
+ .offline(false)
508
+ .run()?);
509
+
510
+ Ok(())
511
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ source: tests/snapshot.rs
3
+ expression: "zizmor().workflow(workflow_under_test(\"ref-confusion/issue-518-repro.yml\")).offline(false).run()?"
4
+ ---
5
+ No findings to report. Good job! (1 suppressed)
@@ -0,0 +1,13 @@
1
+ ---
2
+ source: tests/snapshot.rs
3
+ expression: "zizmor().workflow(workflow_under_test(\"ref-confusion.yml\")).offline(false).run()?"
4
+ ---
5
+ warning[ref-confusion]: git ref for action with ambiguous ref type
6
+ --> @@INPUT@@:11:9
7
+ |
8
+ 11 | - uses: woodruffw/gha-hazmat/ref-confusion@confusable
9
+ | --------------------------------------------------- uses a ref that's provided by both the branch and tag namespaces
10
+ |
11
+ = note: audit confidence → High
12
+
13
+ 2 findings (1 suppressed): 0 unknown, 0 informational, 0 low, 1 medium, 0 high
@@ -6,7 +6,7 @@ on: push
6
6
  permissions: {}
7
7
 
8
8
  jobs:
9
- issue-557-repro:
9
+ issue-447-repro:
10
10
  runs-on: ubuntu-latest
11
11
 
12
12
  steps:
@@ -0,0 +1,12 @@
1
+ name: ISSUE-518-REPRO
2
+ on: [push]
3
+
4
+ permissions: {}
5
+
6
+ jobs:
7
+ issue-518-repro:
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - name: Install Task
12
+ uses: arduino/setup-task@v2
@@ -0,0 +1,11 @@
1
+ name: example
2
+ on: [push]
3
+
4
+ permissions: {}
5
+
6
+ jobs:
7
+ commit:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ # NOT OK: `confusable` is both a tag and a branch
11
+ - uses: woodruffw/gha-hazmat/ref-confusion@confusable