-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add DA_SIGNING_ADDRESSES support in configuration and scripts #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,6 +186,11 @@ if [ -n "${DA_DATA_NAMESPACE:-}" ]; then | |
| log "DEBUG" "Added DA data namespace flag: $DA_DATA_NAMESPACE" | ||
| fi | ||
|
|
||
| if [ -n "${DA_SIGNING_ADDRESSES:-}" ]; then | ||
| default_flags="$default_flags --rollkit.da.signing_addresses $DA_SIGNING_ADDRESSES" | ||
| log "DEBUG" "Added DA signing addresses flag: $DA_SIGNING_ADDRESSES" | ||
| fi | ||
|
Comment on lines
+189
to
+192
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block of code, and similar blocks in this script, are vulnerable to command injection. The The entire flag-building mechanism should be refactored to avoid using Here is an example of how to safely add a variable: if [ -n "${DA_SIGNING_ADDRESSES:-}" ]; then
val_escaped=$(printf '%s' "$DA_SIGNING_ADDRESSES" | sed "s/'/'\\''/g")
default_flags="$default_flags --rollkit.da.signing_addresses '$val_escaped'"
log "DEBUG" "Added DA signing addresses flag: $DA_SIGNING_ADDRESSES"
fiThis pattern should be applied to all environment variables used to build flags in this script to mitigate the vulnerability. |
||
|
|
||
| default_flags="${default_flags} --home=${CONFIG_HOME}" | ||
|
|
||
| log "SUCCESS" "Configuration flags prepared successfully" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic to update
TxWorkerAccountshas been changed to operate on the entire configuration file, instead of being scoped to the[State]section. This is inconsistent with the logic that adds the key if it's missing (lines 95-102), which correctly places it under[State]. IfTxWorkerAccountswere to exist in another section, this script could incorrectly modify it. The update logic should be scoped to the[State]section to maintain correctness and consistency. The previous implementation handled this correctly.