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

Secret followed by type hint are not detected #780

Open
1 of 2 tasks
mosc9575 opened this issue Jan 2, 2024 · 0 comments
Open
1 of 2 tasks

Secret followed by type hint are not detected #780

mosc9575 opened this issue Jan 2, 2024 · 0 comments
Labels
enhancement The issue is related to improving a certain aspect of the project. help wanted Indicates that we would like someone that’s not a maintainer to work on the issue. triaged The issue has been reviewed but has not been solved yet.

Comments

@mosc9575
Copy link

mosc9575 commented Jan 2, 2024

  • I'm submitting a ...

    • bug report
    • feature request
  • What is the current behavior?

The current algorithm is not able to detect secrets with type hint. E.g. my_password: str = "bar"
is not detected.

  • What is the expected behavior?
    I expect that detect_secrets warns if someone tries to set a secret as a default value.
def my_very_secret_function(my_password: str = "bar"):
    pass
  • Technical information

Detect secrets version: 1.4.0
Python version : 3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:07:37) [GCC 12.3.0]
IPython version : 8.14.0
Tornado version : 6.3.3
Operating system : Linux-4.19.0-21-amd64-x86_64-with-glibc2.35

@mosc9575 mosc9575 changed the title Secrets followed by type hint are not detected Secret followed by type hint are not detected Jan 2, 2024
@lorenzodb1 lorenzodb1 added help wanted Indicates that we would like someone that’s not a maintainer to work on the issue. triaged The issue has been reviewed but has not been solved yet. enhancement The issue is related to improving a certain aspect of the project. labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is related to improving a certain aspect of the project. help wanted Indicates that we would like someone that’s not a maintainer to work on the issue. triaged The issue has been reviewed but has not been solved yet.
Projects
None yet
Development

No branches or pull requests

2 participants