## The problem
Issue GitGuardian/ggshield#1097 (closed, 5 comments): ## Environment
- ggshield version: 1.39
- Operating system (Linux, macOS, Windows): macOS
- Operating system version: 15.4.1
- Python version: 3.12
## Describe the bug
Running `ggshield secret scan path [PATH]` where the path is a file with a known (ignored) match fails
Actual result:
```
❯ ggshield secret scan path src/detections/jsons/event_with_profile/f95088a9-4224-4f81-81e3-619d7b421b67.json
Scanning... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1 / 1
Error: Scanning failed: {'scan_results': {0: {'policy_breaks': {0: {'detector_name': ['Missing data for required field.'],...
## What fixed it
ggshield 1.39 failed with 'Scanning failed' when running ggshield secret scan path on a file whose only matches were already ignored/known. Fixed in ggshield 1.41.0. Upgrade ggshield to >= 1.41.0; if it still fails after upgrading, report it since the maintainer confirmed the fix in that release.