Skip to content

Conversation

@taherkk
Copy link
Collaborator

@taherkk taherkk commented Aug 29, 2025

No description provided.


for ((i=0; i<length; i++)); do
# Extract ith object
obj=$($JQ_BIN ".[$i]" <<<"$json_data")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make sure to wrap all $() across script into "". This will prevent potential word splitting.

@hllvc
Copy link

hllvc commented Aug 29, 2025

@taherkk Let's also make sure that all variables and sub-shell executions ($()) are quoted to prevent potential word-splitting. Avoid quoting only if you must and expect to split on space or some special characters.

@taherkk taherkk force-pushed the transform_terraform_hcl_var branch 2 times, most recently from baef30e to cc0177d Compare September 1, 2025 08:02
@taherkk taherkk force-pushed the transform_terraform_hcl_var branch from cc0177d to ef0bdaa Compare September 1, 2025 08:02
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.

4 participants