Provide a way to get cache archive location
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
If your issue is relevant to this repository, please include the information below:
Describe the enhancement
I have implemented a way for GitHub Action users to block outbound calls to allowed endpoints. This helps in improving security of GitHub Action workflows, as rogue/ compromised dependencies/ components will be detected and not be able to exfiltrate credentials. Moreover users will get visibility into outbound calls being made during workflow run.
One problem users are facing (example1, example2) is that when they use the GitHub Actions caching, the cache archive location is not discoverable when there is a cache miss. Cache restore gets an archive location, which is typically a storage account. Cache save does not make a call to this archive location. Moreover, the archive location is different on forks, which will cause confusion
I would like to be able to get the cache archive location at runtime, so it can be added to the allowed endpoints list without the users needing to know about it.
Request you to please provide a way to get cache archive location. I see this getCacheEntry method, but it is internal only.
Code Snippet
If applicable, add a code snippet to show the api enhancement.
Ideally, there would be an api like
archiveLocation = await cache.getArchiveLocation()
I can then add the domain of archiveLocation to allowed endpoints list.
I will be happy to contribute code to make this happen. Please let me know. Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/cache/src/cache.ts and its internal getCacheEntry method. Trace the cache-miss path and determine how a supported public API could expose the archive location at runtime. Done means callers can retrieve that location for endpoint allowlisting, including when the workflow runs from a fork.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- api, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100