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

--all-files argument do not work in new version (0.12.7) #249

Closed
SolalVall opened this issue Oct 7, 2019 · 2 comments
Closed

--all-files argument do not work in new version (0.12.7) #249

SolalVall opened this issue Oct 7, 2019 · 2 comments
Labels
question The issue is a technical question related to the project.

Comments

@SolalVall
Copy link

Hello,

Maybe I missed something but I updated recently detect-secrets package from 0.12.2 -> 0.12.7 and it seems that detect-secrets scan --all-files don't work anymore:

Reproduce step:

$ mkdir ~/foo && echo "password='123'" > ~/foo/bar

Output in v0.12.2:

$ detect-secrets -v scan --all-files ~/foo
[secrets_collection]    INFO    Checking file: /home/my_user/foo/bar
{
  "exclude": {
    "files": null,
    "lines": null
  },
  "generated_at": "2019-10-07T20:34:45Z",
  "plugins_used": [
        .....
  ],
  "results": {
    "/home/my_user/foo/bar": [
      {
        "hashed_secret": "40bd001563085fc35165329ea1ff5c5ecbdbbeef",
        "line_number": 1,
        "type": "Secret Keyword"
      }
    ]
  },
  "version": "0.12.2"
}

Output in v0.12.7:

$ detect-secrets -v scan --all-files ~/foo
[secrets_collection]    INFO    Checking file: /home/my_user/foo/bar
{
  "exclude": {
    "files": null,
    "lines": null
  },
  "generated_at": "2019-10-07T20:35:05Z",
  "plugins_used": [
        .....
  ],
  "results": {},
  "version": "0.12.7",
  "word_list": {
    "file": null,
    "hash": null,
  }
}

We can observe that no results were found in the directory for the newest version. Maybe the issue is due to the new option --word_list that was recently added ?

Thanks in advance

KevinHock referenced this issue Oct 7, 2019
- Add `pyahocorasick` as an optional dependency

See issue #240 for more information.
@KevinHock KevinHock added the question The issue is a technical question related to the project. label Oct 7, 2019
@KevinHock
Copy link
Collaborator

Hi @SolalVall, currently I believe what causes keyword detector to skip this is that I added an is_false_positive call in keyword.py in the above commit, which aside from the wordlist filtering (only happens if a wordlist is passed), skips over any sequential strings.

# Capturing any number sequences
string.digits * 2,

In other words, it's b/c the RHS value is 123, if you change it to e.g. 1sweetgreen it'll trigger.

@KevinHock
Copy link
Collaborator

Happy to talk more about this if I’m mistaken above, but for now I’ll close this issue 👍

killuazhu pushed a commit to IBM/detect-secrets that referenced this issue May 28, 2020
* Support build for tag

* Fix docker image naming

* Publish for master and dss

* YAML format

* Update docker tag in doc

* Reword based on comment
killuazhu pushed a commit to IBM/detect-secrets that referenced this issue Jul 9, 2020
* Support build for tag

* Fix docker image naming

* Publish for master and dss

* YAML format

* Update docker tag in doc

* Reword based on comment
killuazhu pushed a commit to IBM/detect-secrets that referenced this issue Sep 17, 2020
use correct docker setting (Yelp#246)

Use escape sequence to replace clear (Yelp#247)

Build docker images for DSS client (Yelp#248)

Build on tag push (Yelp#249)

Publish to Artifactory (Yelp#250)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a technical question related to the project.
Projects
None yet
Development

No branches or pull requests

2 participants