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
{{ message }}
Repository navigation
Multiline dagger.#Secrets are not hidden properly inside containers #1892
When trying to mount an SSH key securely inside my container, I realized that a cat command would not hide multiline env variables set as secrets properly
Sorry, I made a mistake between my tests. You're totally right, on the host, I do:
export FOO='fezds
fezdseds
zedsqx
ezds
Dagger has a primitive type dagger.#Secret which is never directly referenced in the DAG (for security reasons). However, whenever mounting one inside a container, some commands might use it and may inadvertly leak a secret.
Our way of managing this issue is to make sure that a secret always gets printed as **** when exposed in a container:
make sure that a secret always gets printed as ****
But once you print the secret to a plaintext file, then cat said file, how would you determine that file was a dagger.#Secret?
Sorry, I was flooded in notifications, Buildkit knows as we mount them as secrets in Buildkit (a small repro will prove this point). Cue doesn't understand the concept of secrets, we implemented that, but Buidlkit does
Activity
OneCricketeer commentedon Apr 1, 2022
Maybe I'm not understanding the logs, but how does this
With
contents: client.env.FOORelate to this?
And why should usage of
cathide anything?grouville commentedon Apr 1, 2022
Sorry, I made a mistake between my tests. You're totally right, on the host, I do:
Dagger has a primitive type
dagger.#Secretwhich is never directly referenced in the DAG (for security reasons). However, whenever mounting one inside a container, some commands might use it and may inadvertly leak a secret.Our way of managing this issue is to make sure that a secret always gets printed as
****when exposed in a container:OneCricketeer commentedon Apr 3, 2022
But once you print the secret to a plaintext file, then
catsaid file, how would you determine that file was adagger.#Secret?grouville commentedon Apr 6, 2022
Sorry, I was flooded in notifications, Buildkit knows as we mount them as secrets in Buildkit (a small repro will prove this point). Cue doesn't understand the concept of secrets, we implemented that, but Buidlkit does
TomChv commentedon Jul 12, 2022
@grouville Is this issue still accurate?
grouville commentedon Jan 5, 2023
Closing, even though this issue is Buildkit related, not Cue specific. It might require a future upstream contribution