Proposal: Allow opting out of cache ref restrictions #1549
Replies: 2 comments
-
I don't think there is any gap in the user feedback. There have been hundreds of requests and comments in the linked issues over the years. So, it's a no-brainer that the users need this. I'll repeat my comment just in case:
Originally posted by @aminya in #79 The security concerns can be addressed by making this opt-in and having a flag to limit it to the previous contributors of the repo. |
Beta Was this translation helpful? Give feedback.
-
Love this! This makes cache usable for GitHub releases. |
Beta Was this translation helpful? Give feedback.
-
As described in Restrictions for accessing a cache, caches are tied to a git ref (branch or tag). This level of isolation is critical to the security model for caching - without it caches would be a shared resource across all Actions workflow runs in a repository. This could be exploited to access trusted resources or secrets in trusted workflow runs by poisoning a cache in an untrusted context (such as workflow run from a fork pull request or on an unprotected branch).
Depending on their own trust model, not all users need this level of protection and it introduces friction that pushes users towards external solutions. Additionally, some events such as the
merge_group
don't work well with the branch isolation model due to usage of temporary refs.This is not a simple change nor is it something we'd change within the cache action itself as these permissions are built into the Actions JWT token used to authenticate with internal Actions APIs. Filing this discussion is not a commitment that we will add this feature, but I'd like to gather user feedback into a single place and understand the use cases better.
Open Questions
permissions
in a workflow worked with caching, how does impact the need for branch restrictions?Related Issues
main
) #1496crossTag
andcrossBranch
#1543Beta Was this translation helpful? Give feedback.
All reactions