You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dealing with rust-lang/rust-bindgen and cargo-dist #145
Dealing with this would require migrating away from cargo-dist or sending patches upstream, which may be nontrivial (I haven't checked yet). It looks like they may be open to such patches upstream, as they've been fixed before (see: axodotdev/cargo-dist#2133). That said, issues of the same nature have been open for a few months now, so it seems like it may be a "if you want it done, do it yourself" situation (see: axodotdev/cargo-dist#2320). Which is fair and reasonable, but maybe in that case we'd be better off trying to migrate away from cargo-dist anyway, so we aren't relying on upstream patches being accepted and released to fix issues with CI.
I'm assigning this to myself, but input/help is welcome. Maybe upstream patches aren't too difficult to get done? We'll see.
If you are willing to send a few patches, it's worth considering how to extend their CI suite in way to catch zizmor regressions, e.g. having a new Job that every PR generates the GHA dist Worklow and also runs zizmor against it. Just an idea.
I think that sounds pretty reasonable, yeah. The question is what level of "zizmor support" would be accepted, if any. For our needs, they'd need to consider pedantic or higher, but they may be hesitant to provide support at all, especially if it later leads to others wanting auditor support.
They specify to open an issue before doing anything in their CONTRIBUTING.md, so I'll open an issue and we'll see where it goes from there.
In axodotdev/cargo-dist#2576, we got zizmor integrated into the test suite and CI. Similar to what we do here with crabwatch, there is a zizmor config file which disables all the lints that currently do not pass. It should be possible to incrementally (and concurrently) work on this, so feel free to help out.
As per some discussion on the PR, we're skipping unpinned-uses for now, potentially to be revisited later. I'm currently looking into dealing with excessive-permissions and undocumented-permissions, which I fear (though I'm not yet certain) may require significant refactoring to do properly (on top of already being one of the hardest to address, IMO, and only getting worse... (#t-infra/crabwatch > `excessive-permissions` may become more difficult to fix)).
I suspect we will want to skip concurrency-limits for similar reasons to why release-plz does.
Since the whole point of these workflows is producing and shipping artifacts, I suspect that the only correct way to address cache-poisoning will be to remove caching entirely, which may be controversial.
unpinned-images will probably also be skipped for reasons similar to unpinned-uses, but I'm not yet sure if cargo-dist provides a mechanism that allows end-users to cleanly resolve this themselves (unlike unpinned-images). If it doesn't it would be good to add such a mechanism.
I'm not sure what the deal with use-trusted-publishing is yet. I suspect cargo-dist does support using trusted publishing, but I haven't confirmed. rust-lang/rust-bindgen#3517 seems to suggest it is possible, but non-trivial. Regardless of whether it does or doesn't, I suspect there will be no desire to require it, so this probably can't be "completely solved".
anonymous-definition and template-injection will (hopefully) be fairly trivial to address.
I don't think I've ever had to deal with secrets-inherit before, so I'm not sure what to expect there, yet.
I don't get this, but maybe I'm not too used to cargo-dist:
Since the whole point of these workflows is producing and shipping artifacts, I suspect that the only correct way to address cache-poisoning will be to remove caching entirely, which may be controversial.
Which actions cache-poisoning flags in the generated workflows?
Activity
ubiratansoares commentedon Nov 9, 2026
Patching these templates upstream should be the way go.
If you are willing to send a few patches, it's worth considering how to extend their CI suite in way to catch zizmor regressions, e.g. having a new Job that every PR generates the GHA dist Worklow and also runs zizmor against it. Just an idea.
hashcatHitman commentedon Nov 9, 2026
I think that sounds pretty reasonable, yeah. The question is what level of "
zizmorsupport" would be accepted, if any. For our needs, they'd need to considerpedanticor higher, but they may be hesitant to provide support at all, especially if it later leads to others wantingauditorsupport.They specify to open an issue before doing anything in their
CONTRIBUTING.md, so I'll open an issue and we'll see where it goes from there.zizmorto audit and harden generated workflows axodotdev/cargo-dist#2573hashcatHitman commentedon Nov 12, 2026
In axodotdev/cargo-dist#2576, we got
zizmorintegrated into the test suite and CI. Similar to what we do here withcrabwatch, there is azizmorconfig file which disables all the lints that currently do not pass. It should be possible to incrementally (and concurrently) work on this, so feel free to help out.As per some discussion on the PR, we're skipping
unpinned-usesfor now, potentially to be revisited later. I'm currently looking into dealing withexcessive-permissionsandundocumented-permissions, which I fear (though I'm not yet certain) may require significant refactoring to do properly (on top of already being one of the hardest to address, IMO, and only getting worse... (#t-infra/crabwatch > `excessive-permissions` may become more difficult to fix)).I suspect we will want to skip
concurrency-limitsfor similar reasons to whyrelease-plzdoes.Since the whole point of these workflows is producing and shipping artifacts, I suspect that the only correct way to address
cache-poisoningwill be to remove caching entirely, which may be controversial.unpinned-imageswill probably also be skipped for reasons similar tounpinned-uses, but I'm not yet sure ifcargo-distprovides a mechanism that allows end-users to cleanly resolve this themselves (unlikeunpinned-images). If it doesn't it would be good to add such a mechanism.I'm not sure what the deal with
use-trusted-publishingis yet. I suspectcargo-distdoes support using trusted publishing, but I haven't confirmed. rust-lang/rust-bindgen#3517 seems to suggest it is possible, but non-trivial. Regardless of whether it does or doesn't, I suspect there will be no desire to require it, so this probably can't be "completely solved".anonymous-definitionandtemplate-injectionwill (hopefully) be fairly trivial to address.I don't think I've ever had to deal with
secrets-inheritbefore, so I'm not sure what to expect there, yet.ubiratansoares commentedon Nov 12, 2026
I don't get this, but maybe I'm not too used to
cargo-dist:Which actions
cache-poisoningflags in the generated workflows?hashcatHitman commentedon Nov 12, 2026
swatinem/rust-cacheactions/setup-node