ggshield icon indicating copy to clipboard operation
ggshield copied to clipboard

Do not create ggshield cache when running `secret scan pre-receive`

Open agateau-gg opened this issue 2 years ago • 0 comments

GitGuardian Shield Version

  • 1.12.0

Command executed

ggshield secret scan pre-receive

Describe the bug

When ggshield is used in pre-receive mode, ggshield cache should be skipped as it's not actionable after. This can also avoid trying to save on a read-only file-system.

Expected behavior

ggshield secret scan pre-receive should not save its cache.

Technical details

This is already done in secret/scan/ci.py by using a ReadOnlyCache. This ReadOnlyCache could be moved to Cache and reused in the pre-receive code.

agateau-gg avatar Jul 20 '22 10:07 agateau-gg