Skip to content

ci: harden deploy.yml against silent-empty + YAML-mangled secrets#11

Merged
AquiGorka merged 2 commits into
mainfrom
chore/harden-deploy-config
May 6, 2026
Merged

ci: harden deploy.yml against silent-empty + YAML-mangled secrets#11
AquiGorka merged 2 commits into
mainfrom
chore/harden-deploy-config

Conversation

@AquiGorka

Copy link
Copy Markdown
Contributor

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.

  • Single-quote every \${{ secrets.X }} substitution so YAML always treats the value as a scalar string (closes the JSON-array → flow-sequence mangling class).
  • Add a "Validate config inputs" step before bundle generation. Fail-fast on:
    • empty COUNCIL_PLATFORM_URL, STELLAR_NETWORK, RPC_URL
    • URLs not starting with https://
    • STELLAR_NETWORK not in {testnet,mainnet}
  • Bundle generation now reads from the same validated job-level env via Deno.env.get(...), so the validate gate actually gates the bake.

Symmetric on testnet + mainnet jobs.

Test plan

  • deno task test — 28/28 pass
  • deno task build green
  • YAML parses cleanly (verified via js-yaml)
  • CI green on this PR
  • After merge + tag: curl -s https://dashboard.moonlightprotocol.io/config.js shows non-empty councilPlatformUrl/rpcUrl (both https://-prefixed) and stellarNetwork: "mainnet"

AquiGorka added 2 commits May 6, 2026 09:52
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.
@AquiGorka AquiGorka force-pushed the chore/harden-deploy-config branch from 85f3761 to 3baa3f1 Compare May 6, 2026 12:55
@AquiGorka AquiGorka merged commit c517f49 into main May 6, 2026
4 checks passed
@AquiGorka AquiGorka deleted the chore/harden-deploy-config branch May 6, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant