Skip to content

[Bug] Handling of secrets with escape characters #73

@blaggacao

Description

@blaggacao

Reproducer

mkdir test && cd test

cat <<'EOF' > secretspec.toml
[project]
name = "test"
revision = "1.0"
[profiles.default]
TEST = { description = "Test string with escape-worthy chars", required = true }
EOF

cat <<'EOF' > .env
TEST="foo:$2a$10$TWoviNHS27HJMw1PKe4tBeIMlms6tWdYS9hKoHANKCQhluDlEt/gu,bar:$2a$10$labXlt9fBRMjJu.gOUabjebLVBKGB/xZOFpEn/esCln56USXHMHQW"
EOF

# validate
cat .env

secretspec run --provider dotenv --profile default -- bash -lc 'echo $TEST'
secretspec run --provider dotenv --profile default -- bash -lc 'printf "$TEST"'
secretspec run --provider dotenv --profile default -- bash -lc 'printenv TEST'

Expected

foo:$2a$10$TWoviNHS27HJMw1PKe4tBeIMlms6tWdYS9hKoHANKCQhluDlEt/gu,bar:$2a$10$labXlt9fBRMjJu.gOUabjebLVBKGB/xZOFpEn/esCln56USXHMHQW

Actual

foo:a0/gu,bar:a0.gOUabjebLVBKGB/xZOFpEn/esCln56USXHMHQW

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions