zizmor 1.2.0__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 (190) hide show
  1. zizmor-1.2.0/.github/ISSUE_TEMPLATE/bug-report.yml +77 -0
  2. zizmor-1.2.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  3. zizmor-1.2.0/.github/ISSUE_TEMPLATE/feature-request.yml +52 -0
  4. zizmor-1.2.0/.github/dependabot.yml +19 -0
  5. zizmor-1.2.0/.github/workflows/ci.yml +55 -0
  6. zizmor-1.2.0/.github/workflows/pypi.yml +178 -0
  7. zizmor-1.2.0/.github/workflows/release.yml +21 -0
  8. zizmor-1.2.0/.github/workflows/site.yml +50 -0
  9. zizmor-1.2.0/.github/workflows/zizmor.yml +31 -0
  10. zizmor-1.2.0/.gitignore +9 -0
  11. zizmor-1.2.0/CONTRIBUTING.md +84 -0
  12. zizmor-1.2.0/Cargo.lock +3152 -0
  13. zizmor-1.2.0/Cargo.toml +70 -0
  14. zizmor-1.2.0/LICENSE +21 -0
  15. zizmor-1.2.0/Makefile +27 -0
  16. zizmor-1.2.0/PKG-INFO +80 -0
  17. zizmor-1.2.0/README.md +67 -0
  18. zizmor-1.2.0/docs/assets/favicon48x48.png +0 -0
  19. zizmor-1.2.0/docs/assets/rainbow.svg +1 -0
  20. zizmor-1.2.0/docs/assets/zizmor-demo.gif +0 -0
  21. zizmor-1.2.0/docs/audits.md +897 -0
  22. zizmor-1.2.0/docs/configuration.md +81 -0
  23. zizmor-1.2.0/docs/development.md +284 -0
  24. zizmor-1.2.0/docs/index.md +27 -0
  25. zizmor-1.2.0/docs/installation.md +127 -0
  26. zizmor-1.2.0/docs/magiclink.css +107 -0
  27. zizmor-1.2.0/docs/quickstart.md +88 -0
  28. zizmor-1.2.0/docs/release-notes.md +471 -0
  29. zizmor-1.2.0/docs/snippets/help.txt +44 -0
  30. zizmor-1.2.0/docs/snippets/render-sponsors.py +56 -0
  31. zizmor-1.2.0/docs/snippets/render-trophies.py +40 -0
  32. zizmor-1.2.0/docs/snippets/sponsors.html +15 -0
  33. zizmor-1.2.0/docs/snippets/sponsors.json +7 -0
  34. zizmor-1.2.0/docs/snippets/trophies.md +782 -0
  35. zizmor-1.2.0/docs/snippets/trophies.txt +151 -0
  36. zizmor-1.2.0/docs/trophy-case.md +18 -0
  37. zizmor-1.2.0/docs/usage.md +562 -0
  38. zizmor-1.2.0/mkdocs.yml +122 -0
  39. zizmor-1.2.0/pyproject.toml +6 -0
  40. zizmor-1.2.0/site-requirements.txt +2 -0
  41. zizmor-1.2.0/src/audit/artipacked.rs +148 -0
  42. zizmor-1.2.0/src/audit/bot_conditions.rs +200 -0
  43. zizmor-1.2.0/src/audit/cache_poisoning.rs +331 -0
  44. zizmor-1.2.0/src/audit/dangerous_triggers.rs +56 -0
  45. zizmor-1.2.0/src/audit/excessive_permissions.rs +225 -0
  46. zizmor-1.2.0/src/audit/github_env.rs +607 -0
  47. zizmor-1.2.0/src/audit/hardcoded_container_credentials.rs +105 -0
  48. zizmor-1.2.0/src/audit/impostor_commit.rs +198 -0
  49. zizmor-1.2.0/src/audit/insecure_commands.rs +164 -0
  50. zizmor-1.2.0/src/audit/known_vulnerable_actions.rs +193 -0
  51. zizmor-1.2.0/src/audit/mod.rs +222 -0
  52. zizmor-1.2.0/src/audit/ref_confusion.rs +146 -0
  53. zizmor-1.2.0/src/audit/secrets_inherit.rs +50 -0
  54. zizmor-1.2.0/src/audit/self_hosted_runner.rs +154 -0
  55. zizmor-1.2.0/src/audit/template_injection.rs +391 -0
  56. zizmor-1.2.0/src/audit/unpinned_uses.rs +100 -0
  57. zizmor-1.2.0/src/audit/use_trusted_publishing.rs +125 -0
  58. zizmor-1.2.0/src/config.rs +207 -0
  59. zizmor-1.2.0/src/expr/expr.pest +79 -0
  60. zizmor-1.2.0/src/expr/mod.rs +575 -0
  61. zizmor-1.2.0/src/finding/locate.rs +59 -0
  62. zizmor-1.2.0/src/finding/mod.rs +432 -0
  63. zizmor-1.2.0/src/github_api.rs +518 -0
  64. zizmor-1.2.0/src/main.rs +419 -0
  65. zizmor-1.2.0/src/models/coordinate.rs +282 -0
  66. zizmor-1.2.0/src/models/uses.rs +147 -0
  67. zizmor-1.2.0/src/models.rs +899 -0
  68. zizmor-1.2.0/src/registry.rs +316 -0
  69. zizmor-1.2.0/src/render.rs +156 -0
  70. zizmor-1.2.0/src/sarif.rs +175 -0
  71. zizmor-1.2.0/src/state.rs +52 -0
  72. zizmor-1.2.0/src/utils.rs +214 -0
  73. zizmor-1.2.0/tests/acceptance.rs +272 -0
  74. zizmor-1.2.0/tests/common.rs +12 -0
  75. zizmor-1.2.0/tests/snapshot.rs +475 -0
  76. zizmor-1.2.0/tests/snapshots/snapshot__artipacked-2.snap +14 -0
  77. zizmor-1.2.0/tests/snapshots/snapshot__artipacked-3.snap +25 -0
  78. zizmor-1.2.0/tests/snapshots/snapshot__artipacked-4.snap +18 -0
  79. zizmor-1.2.0/tests/snapshots/snapshot__artipacked.snap +14 -0
  80. zizmor-1.2.0/tests/snapshots/snapshot__bot_conditions.snap +46 -0
  81. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-10.snap +19 -0
  82. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-11.snap +60 -0
  83. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-12.snap +22 -0
  84. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-13.snap +22 -0
  85. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-14.snap +6 -0
  86. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-2.snap +19 -0
  87. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-3.snap +21 -0
  88. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-4.snap +21 -0
  89. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-5.snap +22 -0
  90. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-6.snap +6 -0
  91. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-7.snap +6 -0
  92. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-8.snap +22 -0
  93. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning-9.snap +22 -0
  94. zizmor-1.2.0/tests/snapshots/snapshot__cache_poisoning.snap +6 -0
  95. zizmor-1.2.0/tests/snapshots/snapshot__cant_retrieve.snap +7 -0
  96. zizmor-1.2.0/tests/snapshots/snapshot__conflicting_online_options-2.snap +10 -0
  97. zizmor-1.2.0/tests/snapshots/snapshot__conflicting_online_options-3.snap +10 -0
  98. zizmor-1.2.0/tests/snapshots/snapshot__conflicting_online_options.snap +10 -0
  99. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-2.snap +14 -0
  100. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-3.snap +33 -0
  101. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-4.snap +14 -0
  102. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-5.snap +14 -0
  103. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-6.snap +6 -0
  104. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-7.snap +36 -0
  105. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-8.snap +30 -0
  106. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions-9.snap +6 -0
  107. zizmor-1.2.0/tests/snapshots/snapshot__excessive_permissions.snap +6 -0
  108. zizmor-1.2.0/tests/snapshots/snapshot__github_env-2.snap +16 -0
  109. zizmor-1.2.0/tests/snapshots/snapshot__github_env-3.snap +16 -0
  110. zizmor-1.2.0/tests/snapshots/snapshot__github_env.snap +33 -0
  111. zizmor-1.2.0/tests/snapshots/snapshot__insecure_commands-2.snap +15 -0
  112. zizmor-1.2.0/tests/snapshots/snapshot__insecure_commands-3.snap +32 -0
  113. zizmor-1.2.0/tests/snapshots/snapshot__insecure_commands.snap +23 -0
  114. zizmor-1.2.0/tests/snapshots/snapshot__secrets_inherit.snap +17 -0
  115. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted-2.snap +6 -0
  116. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted-3.snap +14 -0
  117. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted-4.snap +15 -0
  118. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted-5.snap +19 -0
  119. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted-6.snap +21 -0
  120. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted-7.snap +6 -0
  121. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted-8.snap +6 -0
  122. zizmor-1.2.0/tests/snapshots/snapshot__self_hosted.snap +14 -0
  123. zizmor-1.2.0/tests/snapshots/snapshot__template_injection-2.snap +17 -0
  124. zizmor-1.2.0/tests/snapshots/snapshot__template_injection-3.snap +6 -0
  125. zizmor-1.2.0/tests/snapshots/snapshot__template_injection-4.snap +19 -0
  126. zizmor-1.2.0/tests/snapshots/snapshot__template_injection-5.snap +39 -0
  127. zizmor-1.2.0/tests/snapshots/snapshot__template_injection-6.snap +18 -0
  128. zizmor-1.2.0/tests/snapshots/snapshot__template_injection-7.snap +6 -0
  129. zizmor-1.2.0/tests/snapshots/snapshot__template_injection-8.snap +62 -0
  130. zizmor-1.2.0/tests/snapshots/snapshot__template_injection.snap +6 -0
  131. zizmor-1.2.0/tests/snapshots/snapshot__unpinned_uses-2.snap +38 -0
  132. zizmor-1.2.0/tests/snapshots/snapshot__unpinned_uses-3.snap +22 -0
  133. zizmor-1.2.0/tests/snapshots/snapshot__unpinned_uses-4.snap +6 -0
  134. zizmor-1.2.0/tests/snapshots/snapshot__unpinned_uses.snap +46 -0
  135. zizmor-1.2.0/tests/test-data/artipacked/issue-447-repro.yml +23 -0
  136. zizmor-1.2.0/tests/test-data/artipacked.yml +22 -0
  137. zizmor-1.2.0/tests/test-data/bot-conditions.yml +24 -0
  138. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-disabled-by-default.yml +21 -0
  139. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-enabled-by-default.yml +20 -0
  140. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-not-configurable.yml +21 -0
  141. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-opt-in-boolean-toggle.yml +23 -0
  142. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-opt-in-boolish-toggle.yml +18 -0
  143. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-opt-in-expression.yml +23 -0
  144. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-opt-in-multi-value-toggle.yml +22 -0
  145. zizmor-1.2.0/tests/test-data/cache-poisoning/caching-opt-out.yml +22 -0
  146. zizmor-1.2.0/tests/test-data/cache-poisoning/issue-343-repro.yml +43 -0
  147. zizmor-1.2.0/tests/test-data/cache-poisoning/issue-378-repro.yml +25 -0
  148. zizmor-1.2.0/tests/test-data/cache-poisoning/no-cache-aware-steps.yml +16 -0
  149. zizmor-1.2.0/tests/test-data/cache-poisoning/publisher-step.yml +34 -0
  150. zizmor-1.2.0/tests/test-data/cache-poisoning/workflow-release-branch-trigger.yml +21 -0
  151. zizmor-1.2.0/tests/test-data/cache-poisoning/workflow-tag-trigger.yml +22 -0
  152. zizmor-1.2.0/tests/test-data/cache-poisoning.yml +17 -0
  153. zizmor-1.2.0/tests/test-data/excessive-permissions/issue-336-repro.yml +12 -0
  154. zizmor-1.2.0/tests/test-data/excessive-permissions/jobs-broaden-permissions.yml +20 -0
  155. zizmor-1.2.0/tests/test-data/excessive-permissions/workflow-default-perms-all-jobs-explicit.yml +24 -0
  156. zizmor-1.2.0/tests/test-data/excessive-permissions/workflow-default-perms.yml +13 -0
  157. zizmor-1.2.0/tests/test-data/excessive-permissions/workflow-empty-perms.yml +20 -0
  158. zizmor-1.2.0/tests/test-data/excessive-permissions/workflow-read-all.yml +18 -0
  159. zizmor-1.2.0/tests/test-data/excessive-permissions/workflow-write-all.yml +18 -0
  160. zizmor-1.2.0/tests/test-data/excessive-permissions/workflow-write-explicit.yml +25 -0
  161. zizmor-1.2.0/tests/test-data/excessive-permissions.yml +11 -0
  162. zizmor-1.2.0/tests/test-data/github-env/action.yml +28 -0
  163. zizmor-1.2.0/tests/test-data/github-env/github-path.yml +16 -0
  164. zizmor-1.2.0/tests/test-data/github-env/issue-397-repro.yml +18 -0
  165. zizmor-1.2.0/tests/test-data/github_env.yml +16 -0
  166. zizmor-1.2.0/tests/test-data/hardcoded-credentials.yml +21 -0
  167. zizmor-1.2.0/tests/test-data/inlined-ignores.yml +35 -0
  168. zizmor-1.2.0/tests/test-data/insecure-commands/action.yml +32 -0
  169. zizmor-1.2.0/tests/test-data/insecure-commands.yml +24 -0
  170. zizmor-1.2.0/tests/test-data/secrets-inherit.yml +24 -0
  171. zizmor-1.2.0/tests/test-data/self-hosted/issue-283-repro.yml +15 -0
  172. zizmor-1.2.0/tests/test-data/self-hosted/self-hosted-matrix-dimension.yml +14 -0
  173. zizmor-1.2.0/tests/test-data/self-hosted/self-hosted-matrix-exclusion.yml +18 -0
  174. zizmor-1.2.0/tests/test-data/self-hosted/self-hosted-matrix-inclusion.yml +16 -0
  175. zizmor-1.2.0/tests/test-data/self-hosted/self-hosted-runner-group.yml +12 -0
  176. zizmor-1.2.0/tests/test-data/self-hosted/self-hosted-runner-label.yml +11 -0
  177. zizmor-1.2.0/tests/test-data/self-hosted.yml +13 -0
  178. zizmor-1.2.0/tests/test-data/template-injection/issue-22-repro.yml +66 -0
  179. zizmor-1.2.0/tests/test-data/template-injection/issue-339-repro.yml +30 -0
  180. zizmor-1.2.0/tests/test-data/template-injection/issue-418-repro.yml +19 -0
  181. zizmor-1.2.0/tests/test-data/template-injection/pr-317-repro.yml +28 -0
  182. zizmor-1.2.0/tests/test-data/template-injection/pr-425-backstop/action.yml +31 -0
  183. zizmor-1.2.0/tests/test-data/template-injection/static-env.yml +55 -0
  184. zizmor-1.2.0/tests/test-data/template-injection/template-injection-dynamic-matrix.yml +21 -0
  185. zizmor-1.2.0/tests/test-data/template-injection/template-injection-static-matrix.yml +20 -0
  186. zizmor-1.2.0/tests/test-data/template-injection.yml +18 -0
  187. zizmor-1.2.0/tests/test-data/unpinned-uses/action.yml +11 -0
  188. zizmor-1.2.0/tests/test-data/unpinned-uses/issue-433-repro.yml +19 -0
  189. zizmor-1.2.0/tests/test-data/unpinned-uses.yml +33 -0
  190. zizmor-1.2.0/tests/test-data/use-trusted-publishing.yml +15 -0
@@ -0,0 +1,77 @@
1
+ name: Bug Report
2
+ description: File a bug report.
3
+ title: "[BUG]: "
4
+ labels:
5
+ - bug
6
+ - triage
7
+ body:
8
+ - type: markdown
9
+ attributes:
10
+ value: |
11
+ Thank you for taking the time to fill out this bug report!
12
+
13
+ Please read the following parts of this template carefully.
14
+ Invalid or incomplete submissions take longer to triage,
15
+ and may be given a lower priority or closed outright
16
+ if not actionable.
17
+
18
+ - type: checkboxes
19
+ attributes:
20
+ label: Pre-submission checks
21
+ description: |
22
+ By submitting this issue, you affirm that you've satisfied the
23
+ following conditions.
24
+ options:
25
+ - label: >-
26
+ I am **not** filing a feature request. These should be filed via
27
+ the feature request form instead.
28
+ required: true
29
+ - label: >-
30
+ I have looked through the
31
+ [open issues](https://github.com/woodruffw/zizmor/issues?q=is%3Aissue+is%3Aopen+)
32
+ for a duplicate report.
33
+ required: true
34
+
35
+ - type: textarea
36
+ attributes:
37
+ label: Expected behavior
38
+ description: A clear and concise description of what you expected to happen.
39
+ placeholder: |
40
+ I expected `zizmor ...` to do X, Y, and Z.
41
+ validations:
42
+ required: true
43
+
44
+ - type: textarea
45
+ attributes:
46
+ label: Actual behavior
47
+ description: A clear and concise description of what actually happened.
48
+ placeholder: |
49
+ Instead of doing X, Y, and Z, `zizmor ...` produced the following error: ...
50
+ validations:
51
+ required: true
52
+
53
+ - type: textarea
54
+ attributes:
55
+ label: Reproduction steps
56
+ description: A step-by-step list of actions that we can take to reproduce the actual behavior.
57
+ placeholder: |
58
+ 1. Do this
59
+ 2. Do that
60
+ 3. Do another thing
61
+ validations:
62
+ required: true
63
+
64
+ - type: textarea
65
+ attributes:
66
+ label: Logs
67
+ description: |
68
+ If applicable, please paste any logs or console errors here.
69
+
70
+ If you can re-run the command that produced the error, run it with
71
+ `--verbose` and paste the full verbose logs here.
72
+ render: plain text
73
+
74
+ - type: textarea
75
+ attributes:
76
+ label: Additional context
77
+ description: Add any other additional context about the problem here.
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Discussions Forum
4
+ url: https://github.com/woodruffw/zizmor/discussions
5
+ about: Please ask and answer questions here.
6
+ - name: Security Reports
7
+ url: https://github.com/woodruffw/zizmor/security/advisories
8
+ about: Please report potential security vulnerabilities here.
@@ -0,0 +1,52 @@
1
+ name: Feature request
2
+ description: Suggest an idea or enhancement for zizmor
3
+ title: "Feature: "
4
+ labels:
5
+ - enhancement
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Thanks for making a `zizmor` feature request!
11
+
12
+ Please read the following parts of this form carefully.
13
+ Invalid or incomplete submissions take longer to triage,
14
+ and may be given a lower priority or closed outright
15
+ if not actionable.
16
+
17
+ - type: checkboxes
18
+ attributes:
19
+ label: Pre-submission checks
20
+ description: |
21
+ By submitting this issue, you affirm that you've satisfied the following conditions.
22
+ options:
23
+ - label: >-
24
+ I am **not** reporting a bug (crash, false positive/negative, etc).
25
+ These must be filed via the bug report template.
26
+ required: true
27
+ - label: >-
28
+ I have looked through the open issues for a duplicate request.
29
+ required: true
30
+
31
+ - type: textarea
32
+ attributes:
33
+ label: What's the problem this feature will solve?
34
+ description: |
35
+ A clear and concise description of the problem.
36
+ placeholder: |
37
+ I'm always frustrated when ...
38
+ validations:
39
+ required: true
40
+
41
+ - type: textarea
42
+ attributes:
43
+ label: Describe the solution you'd like
44
+ description: A clear and concise description of what you want to happen.
45
+ validations:
46
+ required: true
47
+
48
+ - type: textarea
49
+ attributes:
50
+ label: Additional context
51
+ description: |
52
+ Any additional context, screenshots, or other material about the feature request.
@@ -0,0 +1,19 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: cargo
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ groups:
8
+ cargo:
9
+ patterns:
10
+ - "*"
11
+
12
+ - package-ecosystem: github-actions
13
+ directory: /
14
+ schedule:
15
+ interval: weekly
16
+ groups:
17
+ github-actions:
18
+ patterns:
19
+ - "*"
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ permissions: {}
10
+
11
+ jobs:
12
+ lint:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16
+ with:
17
+ persist-credentials: false
18
+
19
+ - name: Format
20
+ run: cargo fmt && git diff --exit-code
21
+
22
+ - uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
23
+
24
+ - name: Lint
25
+ run: cargo clippy -- -D warnings
26
+
27
+ test:
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
31
+ with:
32
+ persist-credentials: false
33
+
34
+ - uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
35
+
36
+ - uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
37
+
38
+ - name: Test
39
+ run: cargo test
40
+
41
+ - name: Test snippets
42
+ run: |
43
+ make snippets
44
+ git diff --exit-code
45
+
46
+ all-tests-pass:
47
+ if: always()
48
+ needs: [lint, test]
49
+ runs-on: ubuntu-latest
50
+
51
+ steps:
52
+ - name: check test jobs
53
+ uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
54
+ with:
55
+ jobs: ${{ toJSON(needs) }}
@@ -0,0 +1,178 @@
1
+ name: zizmor wheel builds for PyPI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - '*'
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ linux:
16
+ runs-on: ${{ matrix.platform.runner }}
17
+ strategy:
18
+ matrix:
19
+ platform:
20
+ - runner: ubuntu-24.04
21
+ target: x86_64
22
+ manylinux: auto
23
+ - runner: ubuntu-24.04
24
+ target: x86
25
+ manylinux: auto
26
+ - runner: ubuntu-24.04-arm
27
+ target: aarch64
28
+ manylinux: "2_24"
29
+ - runner: ubuntu-24.04
30
+ target: armv7
31
+ manylinux: auto
32
+ - runner: ubuntu-24.04
33
+ target: s390x
34
+ manylinux: auto
35
+ - runner: ubuntu-24.04
36
+ target: ppc64le
37
+ manylinux: auto
38
+ steps:
39
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
40
+ with:
41
+ persist-credentials: false
42
+ - name: Build wheels
43
+ uses: PyO3/maturin-action@ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab # v1
44
+ with:
45
+ target: ${{ matrix.platform.target }}
46
+ args: --release --out dist
47
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
48
+ manylinux: ${{ matrix.platform.manylinux }}
49
+ - name: Upload wheels
50
+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
51
+ with:
52
+ name: wheels-linux-${{ matrix.platform.target }}
53
+ path: dist
54
+
55
+ musllinux:
56
+ runs-on: ${{ matrix.platform.runner }}
57
+ strategy:
58
+ matrix:
59
+ platform:
60
+ - runner: ubuntu-24.04
61
+ target: x86_64
62
+ - runner: ubuntu-24.04
63
+ target: x86
64
+ - runner: ubuntu-24.04
65
+ target: aarch64
66
+ - runner: ubuntu-24.04
67
+ target: armv7
68
+ steps:
69
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
70
+ with:
71
+ persist-credentials: false
72
+ - name: Build wheels
73
+ uses: PyO3/maturin-action@ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab # v1
74
+ with:
75
+ target: ${{ matrix.platform.target }}
76
+ args: --release --out dist
77
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
78
+ manylinux: musllinux_1_2
79
+ - name: Upload wheels
80
+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
81
+ with:
82
+ name: wheels-musllinux-${{ matrix.platform.target }}
83
+ path: dist
84
+
85
+ windows:
86
+ runs-on: ${{ matrix.platform.runner }}
87
+ strategy:
88
+ matrix:
89
+ platform:
90
+ - runner: windows-latest
91
+ target: x64
92
+ - runner: windows-latest
93
+ target: x86
94
+ steps:
95
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
96
+ with:
97
+ persist-credentials: false
98
+ - name: Build wheels
99
+ uses: PyO3/maturin-action@ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab # v1
100
+ with:
101
+ target: ${{ matrix.platform.target }}
102
+ args: --release --out dist
103
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
104
+ - name: Upload wheels
105
+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
106
+ with:
107
+ name: wheels-windows-${{ matrix.platform.target }}
108
+ path: dist
109
+
110
+ macos:
111
+ runs-on: ${{ matrix.platform.runner }}
112
+ strategy:
113
+ matrix:
114
+ platform:
115
+ - runner: macos-13
116
+ target: x86_64
117
+ - runner: macos-14
118
+ target: aarch64
119
+ steps:
120
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
121
+ with:
122
+ persist-credentials: false
123
+ - name: Build wheels
124
+ uses: PyO3/maturin-action@ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab # v1
125
+ with:
126
+ target: ${{ matrix.platform.target }}
127
+ args: --release --out dist
128
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
129
+ - name: Upload wheels
130
+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
131
+ with:
132
+ name: wheels-macos-${{ matrix.platform.target }}
133
+ path: dist
134
+
135
+ sdist:
136
+ runs-on: ubuntu-latest
137
+ steps:
138
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
139
+ with:
140
+ persist-credentials: false
141
+ - name: Build sdist
142
+ uses: PyO3/maturin-action@ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab # v1
143
+ with:
144
+ command: sdist
145
+ args: --out dist
146
+ - name: Upload sdist
147
+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
148
+ with:
149
+ name: wheels-sdist
150
+ path: dist
151
+
152
+ release:
153
+ name: Release
154
+ runs-on: ubuntu-latest
155
+ environment:
156
+ name: pypi
157
+ url: https://pypi.org/p/zizmor
158
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
159
+ needs: [linux, musllinux, windows, macos, sdist]
160
+ permissions:
161
+ # Use to sign the release artifacts
162
+ id-token: write
163
+ # Used to upload release artifacts
164
+ contents: write
165
+ # Used to generate artifact attestation
166
+ attestations: write
167
+ steps:
168
+ - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
169
+ - name: Generate artifact attestation
170
+ uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2
171
+ with:
172
+ subject-path: 'wheels-*/*'
173
+ - name: Publish to PyPI
174
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
175
+ uses: PyO3/maturin-action@ea5bac0f1ccd0ab11c805e2b804bfcb65dac2eab # v1
176
+ with:
177
+ command: upload
178
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,21 @@
1
+ on:
2
+ release:
3
+ types:
4
+ - published
5
+
6
+ name: release
7
+
8
+ permissions: {}
9
+
10
+ jobs:
11
+ crates:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15
+ with:
16
+ persist-credentials: false
17
+
18
+ - name: publish to crates.io
19
+ run: cargo publish
20
+ env:
21
+ CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}"
@@ -0,0 +1,50 @@
1
+ name: Deploy zizmor site
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: "pages"
12
+ cancel-in-progress: false
13
+
14
+ permissions: {}
15
+
16
+ jobs:
17
+ deploy:
18
+ permissions:
19
+ contents: read
20
+ pages: write
21
+ id-token: write
22
+ environment:
23
+ name: github-pages
24
+ url: ${{ steps.deployment.outputs.page_url }}
25
+
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
29
+ with:
30
+ persist-credentials: false
31
+
32
+ - name: Install the latest version of uv
33
+ uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v3
34
+
35
+ - name: build site
36
+ run: make site
37
+
38
+ - name: Setup Pages
39
+ if: github.repository_owner == 'woodruffw'
40
+ uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
41
+
42
+ - name: Upload artifact
43
+ uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
44
+ with:
45
+ path: site_html
46
+
47
+ - name: Deploy to GitHub Pages
48
+ if: github.repository_owner == 'woodruffw'
49
+ id: deployment
50
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
@@ -0,0 +1,31 @@
1
+ name: GitHub Actions Security Analysis with zizmor 🌈
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["*"]
8
+
9
+ jobs:
10
+ zizmor:
11
+ name: zizmor latest via Cargo
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ security-events: write
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
19
+ with:
20
+ persist-credentials: false
21
+ - name: Install the latest version of uv
22
+ uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v4
23
+ - name: Run zizmor 🌈
24
+ run: uvx zizmor --format sarif . > results.sarif
25
+ env:
26
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
+ - name: Upload SARIF file
28
+ uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
29
+ with:
30
+ sarif_file: results.sarif
31
+ category: zizmor
@@ -0,0 +1,9 @@
1
+ /target
2
+
3
+ # website artifacts
4
+ /site_html
5
+ .cache
6
+
7
+ # IDEs / Editors
8
+ .idea
9
+ .DS_STORE
@@ -0,0 +1,84 @@
1
+ # Contributing to `zizmor`
2
+
3
+ Thank you for your interest in contributing to `zizmor`!
4
+
5
+ This is intended to be a "high-level" guide with some suggestions
6
+ for ways to contribute. Once you've picked a contribution idea,
7
+ please see our [development docs]
8
+ for concrete guidance on specific development tasks and style prescriptions.
9
+
10
+ ## How to contribute
11
+
12
+ Here's a short list of steps you can follow to contribute:
13
+
14
+ 1. *Figure out what you want to contribute.* See the
15
+ [contribution ideas](#contribution-ideas) section below if you're looking
16
+ for ideas!
17
+ 2. *File or reply to an issue, if appropriate.* Some contributions require
18
+ new issues (like new bugs), while others involve an existing issue
19
+ (like known documentation defects). Others don't require an issue at all,
20
+ like small typo fixes. In general, if you aren't sure, *error on the side
21
+ of making or replying to an issue* — it helps maintain shared
22
+ development context.
23
+ 3. *Hack away.* Once you know what you're working on, refer to our
24
+ [development docs] for help with specific development tasks. And don't be
25
+ afraid to ask for help!
26
+
27
+ ## Contribution ideas
28
+
29
+ Here are some ways that you can contribute to `zizmor`. These aren't the only
30
+ ways; they're just for inspiration.
31
+
32
+ ### Good first issues
33
+
34
+ We use the ["good first issue"] label to track issues that we think are
35
+ (somewhat) easy and/or straightforward, making them good choices for an
36
+ early contribution.
37
+
38
+ To work on one of these, **please leave a comment** on its issue before opening
39
+ a pull request to make sure nobody else duplicates your work!
40
+
41
+ ["good first issue"]: https://github.com/woodruffw/zizmor/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
42
+
43
+ ### Writing documentation
44
+
45
+ One of the best ways to help us with `zizmor` is to help us improve our
46
+ documentation!
47
+
48
+ Here are some things we could use help with:
49
+
50
+ * Improving our [CLI usage recipes](https://woodruffw.github.io/zizmor/usage/).
51
+ * Improving the detail in our
52
+ [audit documentation pages](https://woodruffw.github.io/zizmor/audits/).
53
+ * Improving our internal (Rust API) documentation, especially in conjunction
54
+ with more unit tests.
55
+
56
+ More generally, see [issues labeled with `documentation`] for a potential
57
+ list of documentation efforts to contribute on.
58
+
59
+ [issues labeled with `documentation`]: https://github.com/woodruffw/zizmor/issues?q=is%3Aissue+is%3Aopen+label%3Adocumentation
60
+
61
+ ### Writing unit tests
62
+
63
+ We can always use more unit tests! Pick a part of the Rust codebase and
64
+ start testing.
65
+
66
+ Keep the cardinal rule of unit testing in mind: a unit test must test
67
+ **a single unit** of behavior. If it tests more than one unit, then
68
+ consider making it an integration test instead.
69
+
70
+ ### Reducing false positives/negatives in audits
71
+
72
+ Static analysis is inherently imprecise, and `zizmor` is no exception.
73
+
74
+ We track imprecision bugs with the ["false positive"] and ["false negative"]
75
+ labels. These can sometimes be tricky to address, so we recommend
76
+ (but don't require) leaving an explanatory comment on the issue before
77
+ beginning a pull request.
78
+
79
+ ["false positive"]: https://github.com/woodruffw/zizmor/issues?q=is%3Aopen+label%3Afalse-positive
80
+
81
+ ["false negative"]: https://github.com/woodruffw/zizmor/issues?q=is%3Aopen+label%3Afalse-negative
82
+
83
+ [development docs]: https://woodruffw.github.io/zizmor/development/
84
+