Special Characters in Job Secrets (OD-2010)
Muhammed Hussein karimi opened 1 year ago

In our projects we have a step like that

rm -f ./src/Example.Api/appsettings.Production.json

cat <<EOT>> ./src/Example.Api/appsettings.Production.json
@secret:prod-appsettings-example@
EOT

to inject .Net appsettings to projects

but in some cases we have problem with some special characters

For example we have something like $2y$10$ in the secret, but the corresponding line will be y0. and data is trimmed until the next . in the same line ($2y$10$xxxx.aaa/aa will be y0.aaa/aa as an example)

  • Muhammed Hussein karimi changed confidential 1 year ago
    Previous Value Current Value
    true
    false
  • Robin Shen commented 1 year ago

    Just quote EOT like below and dollar sign will be treated as literal character:

    rm -f ./src/Example.Api/appsettings.Production.json
    
    cat <<"EOT">> ./src/Example.Api/appsettings.Production.json
    @secret:prod-appsettings-example@
    EOT
    
  • Muhammed Hussein karimi commented 1 year ago

    Will test it, Thanks

  • Robin Shen changed state to 'Closed' 1 year ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2010
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover