Skip to content

Address zizmor findings: - #149

Merged
cpovirk merged 2 commits into
mainfrom
ziz
Aug 10, 2026
Merged

Address zizmor findings:#149
cpovirk merged 2 commits into
mainfrom
ziz

Conversation

@cpovirk

@cpovirk cpovirk commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

I've focused only on our custom CI configuration, not on the CI configuration from upstream: I'm not even sure whether we run the upstream configuration, and even if we do, I'd prefer not to introduce changes (fairly invasive ones in some cases!) that might lead to merge conflicts. Ideally we'd do better someday, including trying to make changes upstream.

- [`persist-credentials: false`](https://docs.zizmor.sh/audits/#artipacked)
- [pinning `uses`](https://docs.zizmor.sh/audits/#unpinned-uses)

I've focused only on our custom CI configuration, not on the CI configuration from upstream: I'm not even sure whether we run the upstream configuration, and even if we do, I'd prefer not to introduce changes (fairly invasive ones in some cases!) that might lead to merge conflicts. Ideally we'd do better someday, including trying to make changes upstream.
@cpovirk

cpovirk commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

I'm not even sure whether we run the upstream configuration

It looks like we "Prepare" but do nothing else:
image

Now presumably it would be nice to pin actions for that step and perhaps make other changes. Or we could delete that configuration entirely (at the cost of having to tell Git to ignore changes to those deleted files when we see merge conflicts).

Comment thread .github/workflows/jspecify.yml Outdated
JAVA_VERSION: 24
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think zizmor can add a comment for what version the SHA corresponds to?

Also, do we want to switch to a more recent version of this action while we're at it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks. (Or at least it will check that comments are correct, and Dependabot will (normally :)) update the comment when it updates the hash.) It looks like I can fill in a commit from a release along with a bogus version comment, and zizmor will correct the version comment. Done.

Comment thread .github/workflows/jspecify.yml Outdated
persist-credentials: false
- name: Set up JDK 24
uses: actions/setup-java@v4
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I will also see about setting up Dependabot. I think we'd avoided it because it could introduce diffs for the JDK CI jobs discussed above, but it looks like we can provide Dependabot with a list of files to ignore (though sadly we can't enumerate the files to check AFAICT).

@cpovirk
cpovirk merged commit 1bf97b4 into main Aug 10, 2026
27 checks passed
@cpovirk
cpovirk deleted the ziz branch August 10, 2026 16:46
cpovirk added a commit that referenced this pull request Aug 10, 2026
This would have saved us some effort in #149.
@cpovirk

cpovirk commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

I'm not even sure whether we run the upstream configuration

It looks like we "Prepare" but do nothing else:

And that seems to take all of ~12 seconds:

image

But that was apparently enough for me to get us into trouble by merging several commits in rapid succession, leading (I assume) the CI job for one to cancel previous jobs:

image

Those then get reported as failures:

image

I wondered if maybe the JDK CI was using styfle/cancel-workflow-action, which I've seen cancel CI jobs on the default branch and which I've been working to migrate various projects off. That doesn't seem to be the case, but it does seem to be using a concurrency.cancel-in-progress configuration...

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

...that differs from the one I've been moving projects to. I wonder if upstream would have any interest in a switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants