feat: add CI action to check for toolchain updates#146
feat: add CI action to check for toolchain updates#146lima-limon-inc wants to merge 4 commits intomainfrom
Conversation
b244a48 to
3fb855a
Compare
3fb855a to
70c8828
Compare
|
Sidenote: This PR is pointing to the |
| - name: Update manifest | ||
| run: | | ||
| ./target/release/update-manifest \ | ||
| --crate-name "${{ github.event.client_payload.crate_name }}" \ |
There was a problem hiding this comment.
This will allow anyone with a token that can trigger a workflow dispatch, the ability to inject malicious shell script which will execute with write access to the contents of the repo and all pull requests.
IMO, the better way to approach this sort of thing is to use GHA's cron feature to run a workflow once an hour that checks all of the existing repos for new releases, and if found, updates the manifest accordingly (or if we want to be even stricter about it, submits a PR to do so).
While that approach is more fragile (or at least, requires repos to use a convention for releases, which we should be doing anyway), it doesn't require adding anything to the GHA workflows of other repos, and has the advantage of not leaving a potential exploitable hole in the workflow of this repo (not saying it is possible to do real damage at the moment, just that the potential would exist, and specifically for a tool like midenup, supply-chain security is crucial).
Anyway, I know this PR is still in draft status, but figured I'd leave my notes while you're still working through it.
There was a problem hiding this comment.
This will allow anyone with a token that can trigger a workflow dispatch, the ability to inject malicious shell script which will execute with write access to the contents of the repo and all pull requests.
Great point, thanks!
IMO, the better way to approach this sort of thing is to use GHA's
cronfeature to run a workflow once an hour that checks all of the existing repos for new releases, and if found, updates the manifest accordingly (or if we want to be even stricter about it, submits a PR to do so).
Noted, I've reworked the PR using cron. Like I mentioned in the description, the large diff comes from the fact that I had to add a library component to midenup in order for the update-manifest to import its structure.
70c8828 to
b534863
Compare
1d03eb8 to
51e7890
Compare
|
I'll update this PR to include the missing Makefile directives and also update the Manifest's timestamp Edit: Done! Like I mentioned in the description, I went with splitting this PR into two in order to ease reviewing. |
f581234 to
a96dbdd
Compare
0a78303 to
b7298a3
Compare
a96dbdd to
8d64a42
Compare
lib.rs file
8d64a42 to
64003cf
Compare
64003cf to
dce718a
Compare
lib.rs filedce718a to
70c58ba
Compare
|
While I believe it's useful to have mechanisms in place that automatically check for updates, I believe the assumption under which this PR is based upon might be technically wrong. This PR presupposed that when a component had a new release with increase in its patch number, its required
So the mechanism to determine what requires an update probably requires a rework. |
aa61220 to
dd25980
Compare
In the case of In any case, I agree that we can't rely on the version number here to communicate a specific dependency on any given I'm also entirely OK with requiring that we adhere to some standardized metadata format in GitHub release notes for this, so long as we get buy-in from all the teams on what that looks like, and the process for it, e.g. something like one or more declarations like |
Completely agree, I believe the A while ago I began writing a |
70c58ba to
b4a9176
Compare
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
Signed-off-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
7098042 to
f44df4a
Compare
Closes #140
Depends on #155
(Sidenote: in order to ease a PR review, I split this PR into two. #155 which only comprises the splitting of
midenupinto abinandlibcomponent and this PR which adds theupdate-manifestpackage).This PR includes a new workflow for
midenup's CI.github/workflows/new-release.yml, which is scheduled to run every hour.The
update-manifestscript, iterates over all the components in the various channels in the manifest and checks whether a newer patch release was made (this is checked in cargo's crate index). If so, it updates the manifest and performs a PR with the newly made changes.