GitGuardian / ggshield

Find and fix 400+ types of hardcoded secrets and 70+ types of infrastructure-as-code misconfigurations.
https://gitguardian.com
MIT License
1.59k stars 139 forks source link

feat(honeytokens): add honeytoken create-with_context command #849

Closed gg-cedric closed 5 months ago

gg-cedric commented 5 months ago

This PR adds the command create-with-context in honeytoken group to create a honeytoken and insert it in a file.

codecov-commenter commented 5 months ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (f598b5b) 91.91% compared to head (9f05de5) 91.76%. Report is 18 commits behind head on main.

Files Patch % Lines
ggshield/cmd/honeytoken/create_with_context.py 86.95% 6 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #849 +/- ## ========================================== - Coverage 91.91% 91.76% -0.15% ========================================== Files 168 170 +2 Lines 6991 7058 +67 ========================================== + Hits 6426 6477 +51 - Misses 565 581 +16 ``` | [Flag](https://app.codecov.io/gh/GitGuardian/ggshield/pull/849/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GitGuardian) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/GitGuardian/ggshield/pull/849/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GitGuardian) | `91.76% <89.28%> (-0.15%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GitGuardian#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

agateau-gg commented 5 months ago

The CI failures are caused by the PR coming from a fork. The code can be merged as is.