Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[buildkite] Fix env leakage of signed tokens #42526

Merged
merged 2 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .buildkite/cryptic_repo_keys/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore the unencrypted repo_key
repo_key

# Ignore any agent keys (public or private) we have stored
agent_key*
7 changes: 4 additions & 3 deletions .buildkite/pipelines/main/misc/signed_pipeline_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ agents:
## pipeline that showcases decryption of environment variable
steps:
- label: ":lock: :rocket: Signed pipeline test"
# We must accept the signed job id secret in order to propagate secrets
env:
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
depends_on:
plugins:
- staticfloat/cryptic#v1:
variables:
- SECRET_KEY="U2FsdGVkX18tb7st0SuQAvh4Yv4xENxOAu8q9XkmOeDVKBNY4FngEwK3xmiKUqaS"
commands: |
echo "SECRET_KEY: $${SECRET_KEY}"

# We must accept the signed job id secret in order to propagate secrets
env:
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ agents:
os: "linux"
steps:
- label: ":unlock: :coverage: Run coverage test"
# We must accept the signed job id secret in order to propagate secrets
env:
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
depends_on:
plugins:
- staticfloat/cryptic:
variables:
Expand Down Expand Up @@ -39,6 +43,3 @@ steps:
./julia .buildkite/pipelines/scheduled/coverage/upload_coverage.jl
timeout_in_minutes: 240 # 240 minutes = 4 hours

# We must accept the signed job id secret in order to propagate secrets
env:
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Salted__bU�,l-!FGw��(�WA�I��r�l��4��q�# R�})(�w��r��=;yEsI�FO}�H$��FEb���
3��uU�f
Salted__��@P=j���R���U(�,~�p @Q������'h7����O MJ���g���t<�A�(�v?ɴ<,:�j���Y'o��ڥσdٛ