Skip to content

Prefer the GHA-provided rust tooling - #2521

Merged
AucaCoyan merged 2 commits into
devfrom
use-ga-rust-toolchain
Oct 7, 2025
Merged

AucaCoyan merged 2 commits into
devfrom
use-ga-rust-toolchain

Conversation

@n8henrie

@n8henrie n8henrie commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator

GitHub Actions can potentially be a significant security vulnerability;
we should try to avoid unnecessary dependencies.

The recent breakage seems to have been a transient issue; going
forward, I would advise that -- should we face such an issue again
-- we try temporarily pinning our runner image or our action to a
stable version (e.g. ubuntu-24.04 as opposed to ubuntu-latest,
actions/checkout@v4 as opposed to actions/checkout@main). Then we
can just revert back to latest or main once the issue has sorted itself
out.

@n8henrie
n8henrie requested a review from AucaCoyan as a code owner October 7, 2025 19:02
GitHub Actions can potentially be a significant security vulnerability;
we should try to avoid unnecessary dependencies.

The recent breakage seems to have been a transient issue; going
forward, I would advise that -- should we face such an issue again
-- we try temporarily pinning our runner image or our action to a
stable version (e.g. `ubuntu-24.04` as opposed to `ubuntu-latest`,
`actions/checkout@v4` as opposed to `actions/checkout@main`). Then we
can just revert back to latest or main once the issue has sorted itself
out.
@n8henrie
n8henrie force-pushed the use-ga-rust-toolchain branch from 767257b to e050a5e Compare October 7, 2025 19:04
@AucaCoyan

Copy link
Copy Markdown
Collaborator

Good! Nice move.
I added the x86 toolchain that was missing,

Upon a fast review, I realized we do not test windows or mac binaries. If we don't have specific functions to test in those OSes, that's fine. I have to check that

@n8henrie

n8henrie commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator Author

Upon a fast review, I realized we do not test windows or mac binaries.

Good catch. We probably should, though it will add some time to our CI builds.

We could probably recover some of that with caching though -- there is now an official GHA-provided cache that should work for rust builds. I tested it out at https://github.com/n8henrie/test-ga-fmt-cache/blob/master/.github/workflows/ci.yml

@n8henrie

n8henrie commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator Author

Also, to be clear, I'm not 100% against depending on third-party actions, I just think it should be avoided. I am fine with depending on the official GitHub-provided actions, as I would expect them to be more secure (and quickly updated when vulnerabilities are discovered).

For example, I'm pretty sure that a bad actor with access to an action upon which we depend could access our secrets, potentially compromising your codesigning certificate, which would be a mess. (The secrets are masked in the output, but they might be able to e.g. start an interactive tmate session, or possibly echo those secrets to a file and then upload the file as an artifact, etc.).

@n8henrie

n8henrie commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator Author

Well that failure is interesting.

error[E0463]: can't find crate for `core`

@AucaCoyan

Copy link
Copy Markdown
Collaborator

I was because it was missing the macos x86 target.
Dunno if it's specified for arm but not for x86, and cargo pulls a different crate, etc.

I should merge, right?

@n8henrie

n8henrie commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator Author

Oh, of course!

Yes, if it looks good to you, go ahead and merge.

I think I'm going to make a separate PR adding the cache.

@AucaCoyan
AucaCoyan merged commit 09ee1c6 into dev Oct 7, 2025
@AucaCoyan
AucaCoyan deleted the use-ga-rust-toolchain branch November 19, 2025 20:52
sboldt1978 pushed a commit to sboldt1978/espanso that referenced this pull request Feb 11, 2026
* Prefer the GHA-provided rust tooling

GitHub Actions can potentially be a significant security vulnerability;
we should try to avoid unnecessary dependencies.

The recent breakage seems to have been a transient issue; going
forward, I would advise that -- should we face such an issue again
-- we try temporarily pinning our runner image or our action to a
stable version (e.g. `ubuntu-24.04` as opposed to `ubuntu-latest`,
`actions/checkout@v4` as opposed to `actions/checkout@main`). Then we
can just revert back to latest or main once the issue has sorted itself
out.

* add x86 toolchain

---------
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