ggshield
ggshield copied to clipboard
Do not create ggshield cache when running `secret scan pre-receive`
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.