GitGuardian / ggshield

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

Draft: fix(circleci): fix circle_ci_range method #769

Closed amascia-gg closed 8 months ago

amascia-gg commented 1 year ago

CIRCLECI_RANGE env var was always returning ...COMMIT because the base_revision parameter of the CircleCI cannot be trusted. Therefore the scan was only done on the last commit of the push that could include 2+ commits. This pull request proposes a fix to this.

This PR should be considered with the corresponding PR in the ggshield orb.

codecov-commenter commented 1 year ago

Codecov Report

Merging #769 (a3e0229) into main (e16e0e1) will not change coverage. The diff coverage is n/a.

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

@@           Coverage Diff           @@
##             main     #769   +/-   ##
=======================================
  Coverage   92.50%   92.50%           
=======================================
  Files         154      154           
  Lines        6280     6280           
=======================================
  Hits         5809     5809           
  Misses        471      471           
Flag Coverage Δ
unittests 92.50% <ø> (ø)

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

Files Coverage Δ
ggshield/core/git_hooks/ci/commit_range.py 86.66% <ø> (ø)
amascia-gg commented 8 months ago

closing since Issue comes from CircleCI and we cannot do anything about it for now