You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the security review, this is HIGH-2: Cache poisoning by accessing other applications caches. The action plan asks us to ensure that
Buildpacks binaries have to ensure that the build and launch caches belong to the application which is being built before processing them or restrict their usage by modifying the needed permissions
Proposed solution
pack should expect a PACK_VOLUME_KEY environment variable containing a secret key, and when computing build and launch cache volume names, should take this key into account.
When an application is first built, pack should generate a volume key for the application name and save it in ~/.pack/volume-keys.toml or similar.
If PACK_VOLUME_KEY is unset, pack should source it from ~/.pack/volume-keys.toml (this avoids the need for application developers to keep track of this variable).
PACK_VOLUME_KEY should be overridden when pack is running in CI (we could warn if this env var is unset and we detect that pack is running in a container as this effectively disables caching).
We could recommend that platform operators use a repository secret for PACK_VOLUME_KEY.
Describe alternatives you've considered
We considered using a secret key combined with authentication codes stored in the cache root, but this is a heavier approach.
Additional context
This feature should be documented somewhere
The text was updated successfully, but these errors were encountered:
In buildpacks/pack#2224 pack started adding random seeds to the volume cache names which breaks our cache acceptance tests. This updates the acceptance tests to manually configure the volume name for each test to prevent addition of random seed.
PiperOrigin-RevId: 702207226
Change-Id: I3c8702588d24a96be03175a9a4fd8075b49670dc
copybara-servicebot
pushed a commit
to GoogleCloudPlatform/buildpacks
that referenced
this issue
Dec 4, 2024
In buildpacks/pack#2224 pack started adding random seeds to the volume cache names which breaks our cache acceptance tests. This updates the acceptance tests to manually configure the volume name for each test to prevent addition of random seed.
PiperOrigin-RevId: 702590872
Change-Id: Ida6d828e79f6dba52b5edf3c5cd548e41084a7a5
Description
In the security review, this is
HIGH-2: Cache poisoning by accessing other applications caches
. The action plan asks us to ensure thatProposed solution
PACK_VOLUME_KEY
environment variable containing a secret key, and when computing build and launch cache volume names, should take this key into account.~/.pack/volume-keys.toml
or similar.PACK_VOLUME_KEY
is unset, pack should source it from~/.pack/volume-keys.toml
(this avoids the need for application developers to keep track of this variable).PACK_VOLUME_KEY
should be overridden when pack is running in CI (we could warn if this env var is unset and we detect that pack is running in a container as this effectively disables caching).PACK_VOLUME_KEY
.Describe alternatives you've considered
We considered using a secret key combined with authentication codes stored in the cache root, but this is a heavier approach.
Additional context
The text was updated successfully, but these errors were encountered: