Entrypoint cache should expire items #332
Labels
good first issue
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
meaty-juicy-coding-work
This task is mostly about implementation!!! And docs and tests of course but that's a given
When we lookup entrypoints for remote images, we cache it for later lookups. Items are never removed from the cache, so if the controller runs for long enough and sees enough unique builder images, it will consume more and more memory. This could present a risk of DoS, since a malicious user can craft valid build requests that fill the cache, especially with large values for entrypoints.
We should use a LRU cache (here's a popular one in Go) that will only keep the most recently-used entrypoints cached and drop entrypoints we haven't used recently.
The text was updated successfully, but these errors were encountered: