Skip to content

Commit 9eef653

Browse files
Pigbibicodex
andcommitted
fix: prefer control-plane runtime target variable
Co-Authored-By: Codex <noreply@openai.com>
1 parent a8e0668 commit 9eef653

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- name: Reject public runtime configuration bindings
2020
run: |
2121
set -euo pipefail
22-
if rg -n '\$\{\{[[:space:]]*vars\.(CLOUD_RUN_SERVICE_TARGETS_JSON|RUNTIME_TARGET_JSON|GLOBAL_TELEGRAM_CHAT_ID|CLOUD_RUN_SERVICES|CLOUD_RUN_SERVICE|RUNTIME_HEARTBEAT_REQUIRED_SERVICES|RUNTIME_GUARD_SCHEDULER_JOB_PATTERN)' .github/workflows; then
23-
echo "Operational runtime configuration must use GitHub Secrets, not GitHub Variables." >&2
22+
if rg -n '\$\{\{[[:space:]]*vars\.(CLOUD_RUN_SERVICE_TARGETS_JSON|GLOBAL_TELEGRAM_CHAT_ID|CLOUD_RUN_SERVICES|CLOUD_RUN_SERVICE|RUNTIME_HEARTBEAT_REQUIRED_SERVICES|RUNTIME_GUARD_SCHEDULER_JOB_PATTERN)' .github/workflows; then
23+
echo "Sensitive operational runtime configuration must use GitHub Secrets, not GitHub Variables." >&2
2424
exit 1
2525
fi
2626

.github/workflows/execution-report-heartbeat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
RUNTIME_HEARTBEAT_SCHEDULER_AWARE: ${{ vars.RUNTIME_HEARTBEAT_SCHEDULER_AWARE || 'true' }}
5151
RUNTIME_HEARTBEAT_SCHEDULER_LOCATION: ${{ vars.RUNTIME_HEARTBEAT_SCHEDULER_LOCATION || vars.CLOUD_RUN_REGION || 'us-central1' }}
5252
RUNTIME_TARGET_ENABLED: ${{ vars.RUNTIME_TARGET_ENABLED }}
53-
RUNTIME_TARGET_JSON: ${{ secrets.RUNTIME_TARGET_JSON }}
53+
RUNTIME_TARGET_JSON: ${{ vars.RUNTIME_TARGET_JSON || secrets.RUNTIME_TARGET_JSON }}
5454
CLOUD_RUN_REGION: ${{ vars.CLOUD_RUN_REGION }}
5555
CLOUD_RUN_SERVICE: ${{ secrets.CLOUD_RUN_SERVICE }}
5656
CLOUD_RUN_SERVICES: ${{ secrets.CLOUD_RUN_SERVICES }}

.github/workflows/runtime-target-lifecycle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id-token: write
2525
env:
2626
RUNTIME_TARGET_ENABLED: ${{ vars.RUNTIME_TARGET_ENABLED }}
27-
RUNTIME_TARGET_JSON: ${{ secrets.RUNTIME_TARGET_JSON }}
27+
RUNTIME_TARGET_JSON: ${{ vars.RUNTIME_TARGET_JSON || secrets.RUNTIME_TARGET_JSON }}
2828
FIRSTRADE_DRY_RUN_ONLY: ${{ vars.FIRSTRADE_DRY_RUN_ONLY }}
2929
CLOUD_RUN_REGION: ${{ vars.CLOUD_RUN_REGION }}
3030
CLOUD_RUN_SERVICE: ${{ secrets.CLOUD_RUN_SERVICE }}

.github/workflows/sync-cloud-run-env.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ jobs:
5252
FIRSTRADE_MFA_EMAIL_SECRET_NAME: ${{ vars.FIRSTRADE_MFA_EMAIL_SECRET_NAME }}
5353
FIRSTRADE_MFA_PHONE_SECRET_NAME: ${{ vars.FIRSTRADE_MFA_PHONE_SECRET_NAME }}
5454
FIRSTRADE_MFA_CODE_SECRET_NAME: ${{ vars.FIRSTRADE_MFA_CODE_SECRET_NAME }}
55-
RUNTIME_TARGET_JSON: ${{ secrets.RUNTIME_TARGET_JSON }}
55+
# This is validated deployment intent, not credential material. Prefer the
56+
# control-plane variable while retaining a legacy-secret fallback during migration.
57+
RUNTIME_TARGET_JSON: ${{ vars.RUNTIME_TARGET_JSON || secrets.RUNTIME_TARGET_JSON }}
5658
ACCOUNT_PREFIX: ${{ vars.ACCOUNT_PREFIX }}
5759
ACCOUNT_REGION: ${{ vars.ACCOUNT_REGION }}
5860
FIRSTRADE_ACCOUNT: ${{ vars.FIRSTRADE_ACCOUNT }}

0 commit comments

Comments
 (0)