Skip to content

Commit d1420da

Browse files
authored
Merge pull request #118 from crazy-max/harden-zizmor-uv-install
zizmor: harden uv tool install
2 parents 0ba3a80 + 47308c6 commit d1420da

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

.github/workflows/zizmor.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
version:
1111
required: false
1212
type: string
13+
default: latest
1314
collect:
1415
required: false
1516
type: string
@@ -95,7 +96,18 @@ jobs:
9596
with:
9697
script: |
9798
const inpVersion = core.getInput('version');
98-
await exec.exec('uv', ['tool', 'install', `zizmor${inpVersion ? `@${inpVersion}` : ''}`]);
99+
const toolSpec = inpVersion === 'latest' ? 'zizmor' : `zizmor@${inpVersion}`;
100+
await exec.exec('uv', [
101+
'tool',
102+
'install',
103+
'--no-build',
104+
'--no-cache',
105+
'--no-config',
106+
'--no-managed-python',
107+
'--no-progress',
108+
'--no-python-downloads',
109+
toolSpec
110+
]);
99111
-
100112
name: Run zizmor
101113
id: zizmor

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -386,20 +386,20 @@ jobs:
386386
387387
Here are the main inputs for this reusable workflow:
388388
389-
| Name | Type | Default | Description |
390-
|---------------------------|--------|---------|-------------------------------------------------------------------------------|
391-
| `path` | String | `.` | Path passed to `zizmor` as the scan target. |
392-
| `version` | String | | Install a specific zizmor version. |
393-
| `collect` | List | | Extra artifact collection modes passed as repeated `--collect=` flags. |
394-
| `min-severity` | String | | Minimum severity to report. |
395-
| `min-confidence` | String | | Minimum confidence to report. |
396-
| `persona` | String | | Zizmor persona to use for findings and output tuning. |
397-
| `offline` | Bool | `false` | Disable network access for audits. |
398-
| `no-online-audits` | Bool | `false` | Skip online audits while keeping the rest of the scan enabled. |
399-
| `strict-collection` | Bool | `false` | Fail when artifact collection cannot be completed. |
400-
| `github-app-client-id` | String | | GitHub App client ID used to mint an installation token for online audits. |
401-
| `github-app-owner` | String | | Optional owner whose installation should be used when creating the app token. |
402-
| `github-app-repositories` | String | | Optional comma or newline-separated repository list for the app token scope. |
389+
| Name | Type | Default | Description |
390+
|---------------------------|--------|----------|-------------------------------------------------------------------------------|
391+
| `path` | String | `.` | Path passed to `zizmor` as the scan target. |
392+
| `version` | String | `latest` | Install `latest` or a specific zizmor version. |
393+
| `collect` | List | | Extra artifact collection modes passed as repeated `--collect=` flags. |
394+
| `min-severity` | String | | Minimum severity to report. |
395+
| `min-confidence` | String | | Minimum confidence to report. |
396+
| `persona` | String | | Zizmor persona to use for findings and output tuning. |
397+
| `offline` | Bool | `false` | Disable network access for audits. |
398+
| `no-online-audits` | Bool | `false` | Skip online audits while keeping the rest of the scan enabled. |
399+
| `strict-collection` | Bool | `false` | Fail when artifact collection cannot be completed. |
400+
| `github-app-client-id` | String | | GitHub App client ID used to mint an installation token for online audits. |
401+
| `github-app-owner` | String | | Optional owner whose installation should be used when creating the app token. |
402+
| `github-app-repositories` | String | | Optional comma or newline-separated repository list for the app token scope. |
403403

404404
Optional secret:
405405

0 commit comments

Comments
 (0)