ci: harden deploy.yml against silent-empty + YAML-mangled secrets#11
Merged
Conversation
Same hardening as council-console / moonlight-pay / provider-console
PRs:
- Single-quote every ${{ secrets.X }} substitution so YAML always
treats the value as a scalar string.
- Add a "Validate config inputs" step before bundle generation that
fail-fasts on empty values, non-https:// URLs, and STELLAR_NETWORK
not in {testnet,mainnet}.
The previous inline deno-eval already had non-empty checks but
duplicated them across both jobs and lacked shape validation. The
new structure separates validation (one bash step) from rendering
(deno-eval reads validated env vars) and adds URL-prefix shape checks.
Symmetric on testnet + mainnet jobs.
85f3761 to
3baa3f1
Compare
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.
Summary
Same hardening as the cc / mp / pc PRs. nd already had inline non-empty deno-eval assertions but they duplicated between the two jobs and lacked shape validation; this PR factors validation into a separate bash step, single-quotes the GHA substitutions, and adds URL-prefix and stellarNetwork shape checks.
\${{ secrets.X }}substitution so YAML always treats the value as a scalar string (closes the JSON-array → flow-sequence mangling class).COUNCIL_PLATFORM_URL,STELLAR_NETWORK,RPC_URLhttps://STELLAR_NETWORKnot in {testnet,mainnet}Deno.env.get(...), so the validate gate actually gates the bake.Symmetric on testnet + mainnet jobs.
Test plan
deno task test— 28/28 passdeno task buildgreencurl -s https://dashboard.moonlightprotocol.io/config.jsshows non-emptycouncilPlatformUrl/rpcUrl(bothhttps://-prefixed) andstellarNetwork: "mainnet"