feat: config variable initialization only#49
Conversation
Added new input for initializing config variables and updated related logic in the action.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe action now recognizes ChangesConfig init handling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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)
Comment |
Added CONFIG_VARS_INIT to the unset command and environment variables.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
action.yaml (1)
204-219: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winUnset
config-env-vars-initvalues before running the command.The new init list is used to read secret/env-backed values in
Defang Config Set, but the command step only unsetsCONFIG_ENV_VARSandCONFIG_VARS_INIT_RANDOM. WireCONFIG_ENV_VARS_INITinto this step and unset its named variables too, otherwise those config values remain visible to the laterdefang $COMMANDprocess and can still trigger the warning this cleanup is meant to avoid.Proposed cleanup fix
- unset $CONFIG_VARS_INIT_RANDOM $CONFIG_ENV_VARS dont_complain_on_empty + unset $CONFIG_VARS_INIT_RANDOM $CONFIG_ENV_VARS $CONFIG_ENV_VARS_INIT dont_complain_on_empty @@ CONFIG_ENV_VARS: ${{ inputs['config-env-vars'] }} + CONFIG_ENV_VARS_INIT: ${{ inputs['config-env-vars-init'] }} CONFIG_VARS_INIT_RANDOM: ${{ inputs['config-vars-init-random'] }}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@action.yaml` around lines 204 - 219, The command step only clears CONFIG_ENV_VARS and CONFIG_VARS_INIT_RANDOM, so config-env-vars-init values can still leak into the later defang invocation. Update this step to accept CONFIG_ENV_VARS_INIT from inputs/env and unset each named variable from that init list alongside the existing cleanup before running defang $COMMAND, keeping the change localized to this shell block and its env wiring.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@action.yaml`:
- Line 18: The init input description in the action metadata is unclear because
it says variables are initialized “with if they are not already set” without
stating where values come from. Update the description in the action definition
to explicitly say the listed config variables are initialized from environment
variable values when they are not already set, keeping the existing format
example intact.
---
Outside diff comments:
In `@action.yaml`:
- Around line 204-219: The command step only clears CONFIG_ENV_VARS and
CONFIG_VARS_INIT_RANDOM, so config-env-vars-init values can still leak into the
later defang invocation. Update this step to accept CONFIG_ENV_VARS_INIT from
inputs/env and unset each named variable from that init list alongside the
existing cleanup before running defang $COMMAND, keeping the change localized to
this shell block and its env wiring.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Added new input
config-env-vars-initfor initializing config variables and updated related logic in the action.Summary by CodeRabbit
New Features
Bug Fixes