You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unpack this zip file, it contains a git repository with this content:
biggerpython_server copie 11.py: a file with spaces in its name. Contains a secret.
startscan.sh: a script to reproduce the bug. It calls ggshield secret scan pre-receive with the right stdin content.
Run startscan.sh
The output looks like this:
$ ./startscan.sh
Scanning Commits [####################################] 100%
commit 9e0b342414884fc68e8939504545c479524c38dd
Author: Aurelien Gateau <aurelien.gateau@gitguardian.com>
Date: Wed Jun 22 14:52:35 2022 +0200
🛡️ ⚔️ 🛡️ 1 incident has been found in file pie
(...)
As you can see the file name is wrong.
Expected behavior
File name should be printed correctly, like ggshield secret scan path 'biggerpython_server copie 11.py' does:
secrets-engine-version: 2.69.0
🛡️ ⚔️ 🛡️ 1 incident has been found in file /home/agateau/tmp/prereceive-filename-bug-example/biggerpython_server copie 11.py
(...)
The text was updated successfully, but these errors were encountered:
…273)
This bug caused crashes in `scan pre-receive` and `scan repo`.
Refactors the parser to use a stricter way to extract the filename. As a
result, test data in test_scannable.py had to be adjusted because their
diff files were wrong.
Fixes#273
GitGuardian Shield Version
Command executed
ggshield secret scan pre-receive
Describe the bug
biggerpython_server copie 11.py
: a file with spaces in its name. Contains a secret.startscan.sh
: a script to reproduce the bug. It callsggshield secret scan pre-receive
with the right stdin content.startscan.sh
The output looks like this:
As you can see the file name is wrong.
Expected behavior
File name should be printed correctly, like
ggshield secret scan path 'biggerpython_server copie 11.py'
does:The text was updated successfully, but these errors were encountered: