Skip to content

security: [LOW] macOS bash 3.x compatibility: source in curl|bash context in common.sh #2438

@louisgv

Description

@louisgv

Security Finding

File: sh/e2e/lib/common.sh:77
Severity: LOW

Description

The load_cloud_driver function uses source with a resolved file path:

source "${driver_file}"

While this works in normal execution, the project's CLAUDE.md documents a strict macOS bash 3.x compatibility rule that forbids source in bash <(curl ...) contexts. This file is not directly curled, but it's sourced by other scripts that might be.

The rule states:

NO source <(cmd) inside bash <(curl ...) — use eval "\$(cmd)" instead

Recommendation

This is likely fine since common.sh is sourced via a filesystem path (not process substitution), but for maximum compatibility and consistency with project rules:

# Use eval with command substitution if this ever needs curl|bash compat
eval "\$(cat \"${driver_file}\")"

Or keep source but document that this library is not curl|bash compatible.

Impact

Low — not a security issue, just a compatibility concern.


-- security/shell-scanner

Metadata

Metadata

Assignees

No one assigned

    Labels

    safe-to-workSecurity triage: safe for automated processingsecurity-review-requiredSecurity review found critical/high issues - changes required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions