Skip to content
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

Secrets as environment variables similar to normal variables #3901

Open
1 task
lambrospetrou opened this issue Mar 23, 2025 · 1 comment
Open
1 task

Secrets as environment variables similar to normal variables #3901

lambrospetrou opened this issue Mar 23, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@lambrospetrou
Copy link

Problem to solve

I want to programmatically provide secrets as environment variables instead of the --secret argument.

It makes things easier in some cases, and it's more suitable for some uses like platforms (like Skybear.NET).

Proposal

Similar to how any environment variables can set Hurl variables, like HURL_abc=xyz setting the abc variable with value xyz, it would be great if we could have HURLSECRET_abc=xyz and this is the same as --secret abc=xyz.

Decide if it will be HURLSECRET_key=value or HURL_SECRET_key=value (although this might complicate existing variable logic).

Additional context and resources

In Skybear.NET, the users can set Hurl variables at the account level. Since Hurl 6.1.0 introduced secrets I want to transparently make any specified variable that seems sensitive to be a secret automatically without the user doing anything.

My only option right now is to use the --secret CLI argument, but that is more dangerous since a user could exploit that and break the actual command execution (I have some protections, but at some point someone could workaround it).

Having the ability to do it with environment variables that only Hurl will parse seems a much better approach, and is how I automatically provide the Hurl variables right now.

Tasks to complete

  • ...
@lambrospetrou lambrospetrou added the enhancement New feature or request label Mar 23, 2025
@fabricereix
Copy link
Collaborator

Hello, I have done exactly the same. Adding a --secret access_token=$HURL_access_token at the command-line to make my env variable HURL_access_token a secret.
But It could indeed bring other security issues.

I like the HURLSECRET_key=value solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants