|
| 1 | +# Permission-Free Zizmor Adapter |
| 2 | + |
| 3 | +**Stability:** consumer-testable pre-v1 alpha. Introduced in the optimization |
| 4 | +release candidate; its inputs and outputs may change before v1. |
| 5 | + |
| 6 | +**Owner:** Filecoin ecosystem security platform maintainers. A repository-wide |
| 7 | +CODEOWNERS policy has not yet been established and remains a pre-v1 governance |
| 8 | +gap. |
| 9 | + |
| 10 | +[`actions/zizmor-scan`](../../actions/zizmor-scan/action.yml) inspects GitHub |
| 11 | +Actions workflow and action definitions with Zizmor 1.28.0 in offline mode. It |
| 12 | +separates operational success from findings and does not require GitHub Code |
| 13 | +Security or `security-events: write`. |
| 14 | + |
| 15 | +## Immutable Consumption |
| 16 | + |
| 17 | +The supported Ecosystem Baseline already composes this adapter. Platform |
| 18 | +Maintainers needing it inside a custom job can pin the repository action: |
| 19 | + |
| 20 | +```yaml |
| 21 | +permissions: |
| 22 | + contents: read |
| 23 | + |
| 24 | +steps: |
| 25 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 |
| 26 | + with: |
| 27 | + persist-credentials: false |
| 28 | + - id: zizmor |
| 29 | + uses: filecoin-project/ff-sec-actions/actions/zizmor-scan@a6c0e17e90c5d2baef63b32e490c1f080ab97add |
| 30 | + with: |
| 31 | + input-path: . |
| 32 | + result-file: ${{ runner.temp }}/zizmor-actions.sarif |
| 33 | +``` |
| 34 | +
|
| 35 | +Do not replace either full commit with a branch or mutable tag. Consumer |
| 36 | +Engineers who want the normalized result and stable merge check should use the |
| 37 | +[Ecosystem Baseline](../consumers/ecosystem-baseline.md), not this leaf action. |
| 38 | +
|
| 39 | +## Authority And Execution Boundary |
| 40 | +
|
| 41 | +| Boundary | Behavior | |
| 42 | +|---|---| |
| 43 | +| Permissions | The adapter calls no GitHub API. A preceding checkout normally needs only `contents: read`. | |
| 44 | +| Secrets | None required or read. | |
| 45 | +| Network | Downloads a Zizmor release archive from GitHub over HTTPS unless `ZIZMOR_BIN` selects a preinstalled executable. The archive SHA-256 is pinned per supported platform. Zizmor itself runs `--offline`. | |
| 46 | +| Consumer code | Parses workflow YAML and action metadata; it does not run project build, package-manager, shell, or lifecycle commands. | |
| 47 | + |
| 48 | +## Inputs |
| 49 | + |
| 50 | +| Input | Required | Default | Meaning | |
| 51 | +|---|---:|---|---| |
| 52 | +| `input-path` | No | `.` | Repository path containing workflow and action definitions. | |
| 53 | +| `config-path` | No | Empty | Explicit Zizmor configuration. Empty disables repository configuration discovery. | |
| 54 | +| `result-file` | No | `zizmor-results.sarif` | Runner-local SARIF destination. | |
| 55 | + |
| 56 | +## Outputs And Completion |
| 57 | + |
| 58 | +| Output | Meaning | |
| 59 | +|---|---| |
| 60 | +| `scanner-outcome` | `success` when Zizmor ran and emitted SARIF, including when it found issues; `failure` for installation or scanner errors. | |
| 61 | +| `result-file` | The requested runner-local SARIF path. | |
| 62 | + |
| 63 | +Findings do not fail this leaf action. Its caller must validate SARIF and choose |
| 64 | +advisory or blocking policy; the supported `sec-actions.yml` workflow does that |
| 65 | +with the Evaluation Adapter. Operational failure is exposed through |
| 66 | +`scanner-outcome=failure` so it cannot be represented as zero findings. |
| 67 | + |
| 68 | +The action itself uploads no artifact and sets no retention period. The |
| 69 | +supported workflow uploads `evaluation-result-zizmor-actions` using GitHub's |
| 70 | +repository-default artifact retention. Raw SARIF remains runner-local unless a |
| 71 | +caller explicitly uploads it. |
| 72 | + |
| 73 | +## Events, Forks, And Runners |
| 74 | + |
| 75 | +The action has no event-specific behavior and can run on `pull_request`, |
| 76 | +`push`, `schedule`, or `workflow_dispatch`. It is fork-safe under a normal |
| 77 | +`pull_request` when the caller keeps read-only permissions and passes no |
| 78 | +secrets. Do not switch a consumer workflow to `pull_request_target`. |
| 79 | + |
| 80 | +The verified installer supports GitHub-hosted Linux and macOS runners on x64 |
| 81 | +and arm64. Other operating systems and architectures fail explicitly. Self- |
| 82 | +hosted runners must provide the same basic shell tools and outbound access, or |
| 83 | +preinstall Zizmor and select it with `ZIZMOR_BIN`. |
| 84 | + |
| 85 | +## Compatibility And Deprecation |
| 86 | + |
| 87 | +The adapter currently fixes Zizmor at 1.28.0 and uses its SARIF interface. |
| 88 | +Changing the tool version, checksums, severity/persona defaults, output shape, |
| 89 | +or supported platforms requires fixture verification and a reviewed immutable |
| 90 | +pin advance. There is no deprecated input or migration path yet because this |
| 91 | +surface is pre-v1. |
| 92 | + |
| 93 | +## Next |
| 94 | + |
| 95 | +- [Adopt the Ecosystem Baseline](../consumers/ecosystem-baseline.md) |
| 96 | +- [Understand Evaluation Results](../consumers/understand-results.md) |
| 97 | +- [Review release integrity](release-integrity.md) |
0 commit comments