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

Adding cli functionality to check strings in an adhoc manner #52

Merged
merged 1 commit into from
Jul 6, 2018

Conversation

domanchi
Copy link
Contributor

@domanchi domanchi commented Jul 5, 2018

This long desired functionality should help usage when playing around with the tool.

Testing

$ detect-secrets scan --string 0123456789a
Base64HighEntropyString: False (3.459)
HexHighEntropyString   : True  (3.459)
PrivateKeyDetector     : False
$
$ echo "some secret, but base64 encoded here" | base64 | detect-secrets scan --string
Base64HighEntropyString: True (4.676)
HexHighEntropyString   : False
PrivateKeyDetector     : False

@domanchi domanchi requested a review from KevinHock July 5, 2018 18:24
Copy link
Collaborator

@KevinHock KevinHock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

plugins = initialize.from_parser_builder(args.plugins)

if args.string:
line = args.string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nit: it's not a line if it is a bool, maybe else:?

:returns: descriptive string that fits the format
<classname>: <returned-value>
"""
# TODO: Handle multiple secrets on single line.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit in general: Maybe github issue instead of todo's in the code.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(To bring attention of short-comings to reviewers, I normally call it out in github PR comment.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#53

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

Successfully merging this pull request may close these issues.

None yet

2 participants