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

Updating baseline fails with version 0.14.0 #316

Closed
shaikmanu797 opened this issue Jul 11, 2020 · 7 comments
Closed

Updating baseline fails with version 0.14.0 #316

shaikmanu797 opened this issue Jul 11, 2020 · 7 comments

Comments

@shaikmanu797
Copy link

$ detect-secrets scan --update .secrets.baseline                
Traceback (most recent call last):
  File "/opt/miniconda3/envs/tests/bin/detect-secrets", line 8, in <module>
    sys.exit(main())
  File "/opt/miniconda3/envs/tests/lib/python3.7/site-packages/detect_secrets/main.py", line 56, in main
    word_list_hash,
  File "/opt/miniconda3/envs/tests/lib/python3.7/site-packages/detect_secrets/main.py", line 141, in _perform_scan
    _get_plugins_from_baseline(old_baseline),
  File "/opt/miniconda3/envs/tests/lib/python3.7/site-packages/detect_secrets/main.py", line 101, in _get_plugins_from_baseline
    secrets_collection = SecretsCollection.load_baseline_from_dict(old_baseline)
  File "/opt/miniconda3/envs/tests/lib/python3.7/site-packages/detect_secrets/core/secrets_collection.py", line 131, in load_baseline_from_dict
    **plugin
  File "/opt/miniconda3/envs/tests/lib/python3.7/site-packages/detect_secrets/plugins/common/initialize.py", line 178, in from_plugin_classname
    klass = import_plugins(custom_plugin_paths)[plugin_classname]
TypeError: unhashable type: 'list'
@KevinHock
Copy link
Collaborator

Thanks for making this! I’ll have a look 👀

@schosterbarak
Copy link

schosterbarak commented Jul 11, 2020

I'm also experiencing the same issue.

@KevinHock
Copy link
Collaborator

KevinHock commented Jul 11, 2020

I missed a tuple() wrap at

# In v0.13.2 the `--custom-plugins` option got added
result.custom_plugin_paths = data.get('custom_plugin_paths', ())

I will make a PR to fix, but feel free to pip install -e ., and add a tuple() call in the meantime.

@KevinHock
Copy link
Collaborator

Oh wow you maintain checkov @schosterbarak! A great tool.

KevinHock added a commit to KevinHock/detect-secrets that referenced this issue Jul 11, 2020
That raised a `TypeError` when using `scan --update`

Also correct mentions of v0.13.2, which was the wrongly anticipated version, to v0.14.0
Fixes issue Yelp#316
@schosterbarak
Copy link

Thanks @KevinHock ! Are you using it today? Would appreciate any feedback :) trying to learn how ppl are using it (CI/ pre-commit) and how to improve

@KevinHock
Copy link
Collaborator

I have used it before @schosterbarak, but not yet in the CI/pre-commit phase, (mostly ran it then did Counter(results).most_common() to perform a one-time assessment). (I'm still in the requirements gather phase, looking at things like https://summitroute.github.io/aws_research/security_tool_comparison.html for example.)

Will definitely message you with feedback when I can be more helpful 👍

@KevinHock
Copy link
Collaborator

This issue can be closed now @shaikmanu797 👍 A new version was released today.

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

No branches or pull requests

3 participants