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

[FEATURE] Add Env variables to dynamic secret file variables #5834

Closed
alban-stourbe-wmx opened this issue Nov 18, 2024 · 2 comments · Fixed by #5835
Closed

[FEATURE] Add Env variables to dynamic secret file variables #5834

alban-stourbe-wmx opened this issue Nov 18, 2024 · 2 comments · Fixed by #5835
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@alban-stourbe-wmx
Copy link
Contributor

alban-stourbe-wmx commented Nov 18, 2024

Describe your feature request

Today, if we want to pass variables to Dynamic Secret Files, we have to hard-code the secret in the model. This can lead to some secrets being pushed to Github, for example.

A simple feature is to allow env variables to pass the secret to Dynamic Secret Files. Until such time as it is directly possible to retrieve secrets via third-party solutions.

Describe the use case of the feature

Handle env variables in dynamic variables field :
Example:

dynamic: 
  - template: path/login.yaml
    input: "https://foorbar.com/login"
    variables:
      - key: username 
        value: $FOO_BAR_USERNAME
      - key: password
        value: $FOO_BAR_PASSWORD
    type: bearertoken
    domains:
      - ".*"
    token: "{{jwt_bearer}}"

Describe alternatives you've considered

No response

Additional context

I made a very simple PR for this feature. #5835

@alban-stourbe-wmx alban-stourbe-wmx added the Type: Enhancement Most issues will probably ask for additions or changes. label Nov 18, 2024
@dwisiswant0
Copy link
Member

A secret file is meant to stay "secret". This means it should be written directly in the file and make sure it doesn't end up in your commits - just throw it in .gitignore. It is your responsibility to handle and protect it.

I'd prefer if the secret file could work with encrypted values, like using sops.

@alban-stourbe-wmx
Copy link
Contributor Author

A secret file is meant to stay "secret". This means it should be written directly in the file and make sure it doesn't end up in your commits - just throw it in .gitignore. It is your responsibility to handle and protect it.

I'd prefer if the secret file could work with encrypted values, like using sops.

Okay i see thanks.
Do you know when we will be able to handle secret with AWS Secret Manager ?
According to the documentation : https://docs.projectdiscovery.io/tools/nuclei/authenticated-scans, is it available ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants