Immutable solution version
Secret scan path fail on known matches
Complete solution
Covers this GitGuardian problem: Secret scan path fail on known matches. ggshield 1.39 failed with 'Scanning failed' when running ggshield secret scan path on a file whose only matches were already ignored/known.
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.Evidence
In gh:GitGuardian/ggshield#1097 (GitGuardian), the issue reported was: 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.'],... The verified resolution from the thread: 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. Source: mount the host path https at container path //github.com/GitGuardian/ggshield/issues/1097By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_R1TPoRPiAA_yPFX7CNcIaA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Secret scan path fail on known matches <span>— Vectle</span></a>