Skip to content

Conversation

salome-voltz
Copy link
Collaborator

@salome-voltz salome-voltz commented Oct 20, 2025

Context

Ggshield crashes on scanning non-seekable files, to reproduce (only on linux):

> cd test_folder/
> ln -s /proc/self/mounts ./mtab
> ls -l mtab #verify if the symbolic link is correctly set up
> ggshield secret scan path ./mtab

Should return:

Scanning... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0 / 1

Error: [Errno 22] Invalid argument

Explicitly skip them with a message:
image

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

❌ Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.90%. Comparing base (f92b323) to head (92cc9f1).

Files with missing lines Patch % Lines
ggshield/verticals/secret/secret_scanner.py 25.00% 3 Missing ⚠️
ggshield/core/scan/scannable.py 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1133      +/-   ##
==========================================
- Coverage   91.96%   91.90%   -0.07%     
==========================================
  Files         144      144              
  Lines        6174     6189      +15     
==========================================
+ Hits         5678     5688      +10     
- Misses        496      501       +5     
Flag Coverage Δ
unittests 91.90% <77.27%> (-0.07%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@salome-voltz salome-voltz force-pushed the salomevoltz/scrt-5971-ggshield-runs-into-oserror-errno-22-invalid-argument-when branch from b85664e to 92cc9f1 Compare October 20, 2025 16:12
@salome-voltz salome-voltz self-assigned this Oct 21, 2025
@salome-voltz salome-voltz marked this pull request as ready for review October 21, 2025 12:19
@salome-voltz salome-voltz requested a review from a team as a code owner October 21, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant