Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Everything about using this workflow is in
Docs/infra-secret-write.md, added in this PR. Whatfollows is only what a reviewer needs and that page does not carry.
The diff
.github/workflows/infra-secret-write.yml.github/actions/infra/secrets/preflight/action.yml.github/actions/infra/secrets/write/action.yml.../secrets/write/scripts/manual_secrets.shDocs/infra-secret-write.mdREADME.mdThe Scaleway credential, an accepted risk
Both Scaleway jobs use the caller's repo-level
SCALEWAY_ACCESS_KEY, the Terraform credential. Ascoped one was considered and not built: it would not be an access control, since a branch that
deletes
needs: approvalcan reference the same key directly. What it buys is blast radius, and thisjob needs "create one secret version" while holding a key that can destroy the estate. Worth deciding
now that this is shared rather than sandbox code.
Why there is an approval gate
The workflow exists so a developer can write a secret without holding a Scaleway credential. That
delegation is the point and also the risk: without a gate, anyone who can dispatch writes any value
into any environment, production included. The gate puts a second person on the decision and leaves a
record of who asked and who agreed.
trstringer/manual-approvalreports a transient API error as a human denial and leaves its issueopen, which is why the job carries two compensating steps rather than one. Polling is 90 seconds
because its pending loop skips its own sleep; fix submitted upstream as
trstringer/manual-approval#236.
Known limitations
workflow_dispatchinput, so it sits in$GITHUB_EVENT_PATHfor the life of the job, readable by every step including third-party actionson moving tags. Masking is a display control, not access control. The only real close is the
plaintext never being an input; the
jq -nin the write action is the seam for that.approversis a required input with no default, andexclude-workflow-initiator-as-approverisfalse, so a caller listing only itself self-approves.Enabling that flag needs the list widened first, or it removes the only approver and the job
reports a timeout. This PR needs an answer: who is on that list for real environments?
key names, so a
foo-baradded by hand in the console is storable.envFromskips such a key andthe pod never sees it, so the script carries it through and says so rather than blocking a write it
did not cause. A key the caller is adding is still refused.