Open ChristopherHX opened 1 week ago
I have a wait-and-see attitude towards this proposal.
Regarding running safely in host mode, my first instinct is:
To clarify, in the current design, Gitea does not actively assign tasks to runners; it only attempts to assign a new task when a runner requests one (if available). The purpose of this design is to allow the runner to decide for itself whether it is ready to receive more tasks, while Gitea only determines if there are new tasks to assign.
Regarding running safely in host mode, my first instinct is:
This matches with the new run once mode that has been recently merged: https://gitea.com/gitea/act_runner/pulls/598
Anyone can fetch new jobs with the current runner state files, that could be uploaded to a bad actors server when the runner is in host-mode.
The same applies to GitHub Actions as long they are not ephemeral.
My proposal would optionally invalidate the token like in GitHub Actions.
Making FetchTask always fail after a job has been fetched is another idea that depends on once mode of the runner.
It cannot be a reason that "#598 has been merged so we should keep going that way." I just want to discuss whether we have a better design to handle this.
Yes let's discuss, this is still a pure proposal except the hardening change.
I only wanted to clairify the problems of the approuch you have described and that it looks based on my opinion like the once flag.
In GitHub Actions there is an alternative way as well for long lived runner state files
Adding more native act runtimes, seems to be a mess.
Feature Description
My idea is to
UpdateTask and UpdateLog scope access to runnerid(Done)This proposal would allow to securely deploy a registred host-mode act_runner in a VM and reset the same after job exit.
Some of my idea has been scetched in https://github.com/ChristopherHX/gitea/tree/ephemeral-runners.
Protocol proposal here: https://gitea.com/gitea/actions-proto-def/pulls/14
Read more here: https://gitea.com/gitea/act_runner/issues/19#issuecomment-932880
Screenshots
No response