GitGuardian / ggshield

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

Fix IAC scan CI for new branches on Github #825

Closed Paul-GitGuardian closed 7 months ago

Paul-GitGuardian commented 8 months ago

First commit refactors some IAC tests to use fixtures instead of global variables, and could be reviewed separately.

Other commits fix 2 bugs for IAC and SCA:

Previously, for these two cases, Gitlab CI failed, while Github CI fallback was to scan the last commit only.

CI is still misbehaving on force pushes, this will be fixed in another PR.

codecov-commenter commented 8 months ago

Codecov Report

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

Comparison is base (3203bfb) 91.60% compared to head (c81eb54) 91.93%. Report is 5 commits behind head on main.

Files Patch % Lines
ggshield/core/git_hooks/ci/previous_commit.py 65.00% 14 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 #825 +/- ## ========================================== + Coverage 91.60% 91.93% +0.32% ========================================== Files 168 168 Lines 6929 6952 +23 ========================================== + Hits 6347 6391 +44 + Misses 582 561 -21 ``` | [Flag](https://app.codecov.io/gh/GitGuardian/ggshield/pull/825/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/825/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GitGuardian) | `91.93% <65.00%> (+0.32%)` | :arrow_up: | 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.