Skip to content

coderabbit: Fix printf and quoting correctness issues #2408

@marcusquinn

Description

@marcusquinn

Finding #4: printf and quoting correctness

Evidence:

  • SC2059 "printf with variable as format" in document-creation-helper.sh (multiple lines) and in tests
  • SC2086 "Double quote to prevent globbing and word splitting" in wp-helper.sh:303 and localdev-helper.sh:1055

Risk:
Potential security issues with variable expansion; unexpected behavior with filenames containing spaces or special characters.

Recommended Action:
Replace patterns:

# Instead of: printf "$format" "$value"
printf '%s' "$value"

# Instead of: somecmd $UNQUOTED
somecmd "$UNQUOTED"

Source: #2386

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-dispatchAuto-created from TODO.md tagcoderabbit-pulseDaily CodeRabbit pulse review trackingstatus:doneTask is complete

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions