[INFRA-373]: enforce non-empty RUNNER_HMAC_SECRET_KEY for runner#228
[INFRA-373]: enforce non-empty RUNNER_HMAC_SECRET_KEY for runner#228sriramveeraghanta wants to merge 1 commit into
Conversation
Use Helm's `required` function on env.runner_envs.hmac_secret_key so the chart fails fast at render time instead of emitting an empty HMAC secret when the runner is enabled without an external secret. Addresses CodeRabbit review comment on #225.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR modifies the runner environment secrets template to require explicit configuration of the HMAC secret key. Instead of defaulting to an empty string, the template now enforces that ChangesRunner Configuration Validation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
Description
Follow-up to #225. Addresses the CodeRabbit review comment that the runner-env Secret was rendering an empty
RUNNER_HMAC_SECRET_KEYwheneverservices.runner.enabled=trueand no external secret was provided, which is an unsafe default and silently breaks HMAC auth/signature guarantees.This change replaces the
default ""with Helm'srequiredfunction on.Values.env.runner_envs.hmac_secret_key, sohelm template/helm installfails fast with a clear message when the value is missing — and only when the internal secret is actually being rendered (therequiredis gated by the existingif and .Values.services.runner.enabled (empty .Values.external_secrets.runner_env_existingSecret)block).Type of Change
Test Scenarios
Verified via
helm template charts/plane-enterprise:hmac_secret_keynot set, no external secret — fails fast with:Error: execution error at (.../runner-env.yaml:9:29): env.runner_envs.hmac_secret_key must be set when services.runner.enabled=true and external_secrets.runner_env_existingSecret is emptyhmac_secret_keyset — Secret renders with the provided value.external_secrets.runner_env_existingSecretset — internal Secret is skipped (norequiredtriggered); Deployment references the external secret as before.References
Summary by CodeRabbit