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

chore: make ignore reason human readable in text output #1031

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

gg-mmill
Copy link
Contributor

@gg-mmill gg-mmill commented Dec 10, 2024

Context

Following #1024 ,

  • small fix to make ignore reasons human readable.
  • add ignore reason to json output schema

Validation

Perform scans with ignored secrets (either from config or backend), with the --all-secrets options.

Ensure the output contains ignore info (both for text and json output)

PR check list

  • As much as possible, the changes include tests (unit and/or functional)
  • If the changes affect the end user (new feature, behavior change, bug fix) then the PR has a changelog entry (see doc/dev/getting-started.md). If the changes do not affect the end user, then the skip-changelog label has been added to the PR.

Note: skipping changelog as it was included in previous MR.

@gg-mmill gg-mmill requested a review from a team as a code owner December 10, 2024 17:44
@gg-mmill gg-mmill marked this pull request as draft December 11, 2024 08:01
@gg-mmill gg-mmill force-pushed the mmillet/-/fix_displayed_ignore_reason branch from 948cf80 to aa8b108 Compare December 11, 2024 08:21
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 99.26471% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.09%. Comparing base (6d0d8b8) to head (521885c).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
ggshield/verticals/secret/extended_match.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1031      +/-   ##
==========================================
+ Coverage   92.05%   92.09%   +0.03%     
==========================================
  Files         181      181              
  Lines        7726     7752      +26     
==========================================
+ Hits         7112     7139      +27     
+ Misses        614      613       -1     
Flag Coverage Δ
unittests 92.09% <99.26%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gg-mmill gg-mmill marked this pull request as ready for review December 11, 2024 08:24
agateau-gg

This comment was marked as outdated.

@gg-mmill gg-mmill force-pushed the mmillet/-/fix_displayed_ignore_reason branch from c5c4888 to 0d74fc3 Compare December 17, 2024 08:10
@gg-mmill gg-mmill force-pushed the mmillet/-/fix_displayed_ignore_reason branch from 0d74fc3 to 5e23fe8 Compare December 17, 2024 08:30
Introduces new models:
- IgnoreReason
- Secret, which is meant to extend the PolicyBreak model from
  pygitguardian
@gg-mmill gg-mmill force-pushed the mmillet/-/fix_displayed_ignore_reason branch from 5e23fe8 to 075334c Compare December 17, 2024 08:43
ggshield/verticals/secret/secret_scan_collection.py Outdated Show resolved Hide resolved
ggshield/verticals/secret/secret_scan_collection.py Outdated Show resolved Hide resolved
ggshield/verticals/secret/output/schemas.py Outdated Show resolved Hide resolved
@gg-mmill gg-mmill marked this pull request as draft December 20, 2024 08:03
@gg-mmill gg-mmill marked this pull request as ready for review December 20, 2024 13:52
@gg-mmill gg-mmill force-pushed the mmillet/-/fix_displayed_ignore_reason branch from ac0865c to 9ba60b0 Compare December 20, 2024 13:57
@gg-mmill gg-mmill requested a review from agateau-gg December 20, 2024 14:21
Copy link
Collaborator

@agateau-gg agateau-gg left a comment

Choose a reason for hiding this comment

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

Looks good! Love the stroke "small" word in the PR description 😅.

Thanks for this work. I think the code-base is less confusing thanks to these renamings.

@gg-mmill gg-mmill merged commit dc51abd into main Dec 20, 2024
28 of 29 checks passed
@gg-mmill gg-mmill deleted the mmillet/-/fix_displayed_ignore_reason branch December 20, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants