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

Add String Implementation - StatisticsAggregator #678

Merged
merged 3 commits into from
Mar 29, 2023

Conversation

jpdakran
Copy link
Member

@jpdakran jpdakran commented Mar 29, 2023

  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added
  • Docs have been added / updated
  • All CI checks are green
  • What kind of change does this PR introduce?
    Bug Fix

  • What is the current behavior?
    NotImplementedError when calling str on StatisticsAggregator #662
    When calling detect-secrets audit .secrets. baseline --stats we get an error since there is no implementation for the StatisticsAggregator __str__ method.

  • What is the new behavior (if this is a feature change)?
    Return a string representation of the statistics. See below for an example

  • Does this PR introduce a breaking change?
    No

  • Other information:

Plugin: PrivateKeyDetector
Statistics: True Positives: 0, False Positives: 0, Unknown: 8, Precision: 0.0, Recall: 0.0

Plugin: TwilioKeyDetector
Statistics: True Positives: 0, False Positives: 0, Unknown: 1, Precision: 0.0, Recall: 0.0

Plugin: HexHighEntropyString
Statistics: True Positives: 0, False Positives: 0, Unknown: 2, Precision: 0.0, Recall: 0.0

Plugin: KeywordDetector
Statistics: True Positives: 0, False Positives: 0, Unknown: 3, Precision: 0.0, Recall: 0.0

Plugin: JwtTokenDetector
Statistics: True Positives: 0, False Positives: 0, Unknown: 1, Precision: 0.0, Recall: 0.0

Plugin: Base64HighEntropyString
Statistics: True Positives: 0, False Positives: 0, Unknown: 1, Precision: 0.0, Recall: 0.0

@jpdakran jpdakran merged commit 8d3b21f into master Mar 29, 2023
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.

NotImplementedError when calling str on StatisticsAggregator
2 participants