Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Pre-submission checks
- I am not filing a feature request. These should be filed via the feature request form instead.
- I have looked through the open issues for a duplicate report.
Expected behavior
This looks like a duplicate of #431 but neither v1.0.1 nor v1.1.1 (patched) seem able to parse it:
Actual behavior
Old version:
$ zizmor --verbose .github/workflows/test-go.yml
2025-01-18T13:32:17.920831Z DEBUG zizmor::state: using cache directory: "/home/cipherboy/.cache/zizmor"
failed to register input: .github/workflows/test-go.yml
Caused by:
0: invalid GitHub Actions definition: file:///home/cipherboy/GitHub/cipherboy/openbao/.github/workflows/test-go.yml
1: invalid GitHub Actions workflow: file:///home/cipherboy/GitHub/cipherboy/openbao/.github/workflows/test-go.yml
2: failed to register input as workflow or action
$ /home/cipherboy/.local/bin/zizmor --version
zizmor 1.0.1
Perform update:
$ python3.13 -m pip install -v "zizmor==1.1.1"
Using pip 24.2 from /usr/lib/python3.13/site-packages/pip (python 3.13)
Defaulting to user installation because normal site-packages is not writeable
Collecting zizmor==1.1.1
Obtaining dependency information for zizmor==1.1.1 from https://files.pythonhosted.org/packages/3a/e2/73fd210a5c3b8ccb0defdda959bbbc0c6f1f061107ae9326675d4aa8eed7/zizmor-1.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
Using cached zizmor-1.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.5 kB)
Using cached zizmor-1.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)
Installing collected packages: zizmor
Attempting uninstall: zizmor
Found existing installation: zizmor 1.0.1
Uninstalling zizmor-1.0.1:
Removing file or directory /home/cipherboy/.local/bin/zizmor
Removing file or directory /home/cipherboy/.local/lib/python3.13/site-packages/zizmor-1.0.1.dist-info/
Successfully uninstalled zizmor-1.0.1
Successfully installed zizmor-1.1.1
$ zizmor --version
zizmor 1.1.1
Rerun:
$ zizmor --verbose .github/workflows/test-go.yml
2025-01-18T13:40:09.036229Z DEBUG zizmor::state: using cache directory: "/home/cipherboy/.cache/zizmor"
failed to register input: .github/workflows/test-go.yml
Caused by:
0: invalid GitHub Actions definition: file:///home/cipherboy/GitHub/cipherboy/openbao/.github/workflows/test-go.yml
1: invalid GitHub Actions workflow: file:///home/cipherboy/GitHub/cipherboy/openbao/.github/workflows/test-go.yml
2: failed to register input as workflow or action
on this workflow: https://github.com/openbao/openbao/blob/8d3b68efd6b90adbde3ca76acf530a125061b98b/.github/workflows/test-go.yml
Reproduction steps
- Clone OpenBao: https://github.com/openbao/openbao
- Run
zizmor --verbose .github/workflows/test-go.yml - See failure
Logs
(Above)
Additional context
Removing all "uses:" entries doesn't seem to help, so I suspect the problem is unrelated? Based on the context I understand from zizmorcore/github-actions-models#30, it seems like perhaps a parse error isn't being surfaced correctly? Though this action runs in CI just fine (e.g., https://github.com/openbao/openbao/actions/runs/12837585390).
Saw this in the FOSDEM speakers chat, good luck and hope to see you there! Thank you as always! :-)
Reacted by FattiesPatties
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
woodruffw commentedon Jan 18, 2025
Hi @cipherboy, thanks for the report! I'm taking a look now.
woodruffw commentedon Jan 18, 2025
Thanks a ton for providing a repro case here!
I was able to minimize this, and it's a different bug than #431: the bug here is that the models assume that
timeout-minutes:is always a number, but it can also be an expression expansion. OpenBao has one such expansion here:https://github.com/openbao/openbao/blob/8d3b68efd6b90adbde3ca76acf530a125061b98b/.github/workflows/test-go.yml#L170
This should be a pretty simple fix on my end!
cipherboy commentedon Jan 18, 2025
Oh wow, that was fast @woodruffw! Thank you so much!!
bugfix: Step::timeout_minutes can be an expression
woodruffw commentedon Jan 18, 2025
No problem! Sorry the error message there is so opaque -- the models involve a lot of "untagged" structure matching, which with
serdemeans we unfortunately sometimes lose the exact error source that caused the parse failure. I'm going to be looking into improving that separately soon 🙂bugfix: bump github-actions-models