From f92219cc43c97a78807d7d127df293922a66bd4f Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Mon, 27 Jul 2026 20:40:40 +0530 Subject: [PATCH] feat(profiles): declare CLOUDFLARE_API_TOKEN as an orun secretBinding on worker deploy profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cloudflare-worker-turbo and cloudflare-workers-assets-turbo deploy profiles talk to the Cloudflare API (wrangler deploy); declare that credential as a composition secretBinding so the orun planner maps it to secret://///CLOUDFLARE_API_TOKEN and the runner resolves + injects it lease-bound at run time (log-redacted), instead of reading an ambient CI secret. Verify/pull-request profiles carry no bindings — those lanes never touch the Cloudflare API and never resolve a credential. Requires orun >= v2.35.0 (resolved secret env delivery to step processes). Co-Authored-By: Claude Fable 5 --- .../profiles/cloudflare-worker-turbo-deploy.yaml | 9 +++++++++ .../profiles/cloudflare-workers-assets-turbo-deploy.yaml | 6 ++++++ stack.yaml | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml b/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml index 493b08a..4b7d9c9 100644 --- a/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml +++ b/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml @@ -9,6 +9,15 @@ spec: requireApproval: true requireCleanGitTree: true + # The deploy step talks to the Cloudflare API (wrangler deploy), so the + # profile declares the credential it needs as an orun secret binding: the + # planner maps it to secret://///CLOUDFLARE_API_TOKEN + # and the runner resolves + injects it at run time (redacted from logs). + # Verify/pull-request profiles deliberately carry no bindings — those lanes + # never touch the Cloudflare API and never resolve a credential. + secretBindings: + CLOUDFLARE_API_TOKEN: { required: true } + jobs: verify-deploy: includeCapabilities: diff --git a/compositions/cloudflare-workers-assets-turbo/profiles/cloudflare-workers-assets-turbo-deploy.yaml b/compositions/cloudflare-workers-assets-turbo/profiles/cloudflare-workers-assets-turbo-deploy.yaml index 4c51a1c..7b9c4a0 100644 --- a/compositions/cloudflare-workers-assets-turbo/profiles/cloudflare-workers-assets-turbo-deploy.yaml +++ b/compositions/cloudflare-workers-assets-turbo/profiles/cloudflare-workers-assets-turbo-deploy.yaml @@ -9,6 +9,12 @@ spec: requireApproval: true requireCleanGitTree: true + # The deploy step talks to the Cloudflare API (wrangler deploy): declare the + # credential as an orun secret binding so the runner resolves + injects it at + # run time. Verify/pull-request profiles carry no bindings. + secretBindings: + CLOUDFLARE_API_TOKEN: { required: true } + jobs: verify-deploy: includeCapabilities: diff --git a/stack.yaml b/stack.yaml index 5be06cc..3da10c0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -3,7 +3,7 @@ kind: Stack metadata: name: stack-tectonic title: Stack Tectonic - version: 0.13.0 + version: 0.14.0 description: Versioned OCI-hosted catalog of Cloudflare, Terraform and monorepo compositions for Sourceplane repositories. owner: sourceplane tags: