Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a feature to scan binary files content using their printable strings #396

Open
gg-mhacks opened this issue Oct 20, 2022 · 0 comments
Open
Labels
type:feature Feature request

Comments

@gg-mhacks
Copy link

Is your feature request related to a problem? Please describe.

As a user, I would like to be able to scan the content of a binary file, it might be possible through its printable strings by using string.printable python method

Here is my test using strings unix utility

$ ggshield secret scan path ./cppcreds
Scanning Path... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1 files scanned out of 1 0:00:00

No secrets have been found

$ strings ./cppcreds > strings_cppcreds
$ ggshield secret scan path strings_cppcreds
Scanning Path... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1 files scanned out of 1 0:00:00

secrets-engine-version: 2.77.0

🛡️  ⚔️  🛡️  1 incident has been found in file /home/*/__tmp/strings_cppcreds

>>> Incident 1(Secrets detection): AWS Keys (Validity: Invalid)  (Ignore with SHA: e019aff773f5746c91c7eb8660c4542029e44144bdbc80cb607130d431a2664d) (1 occurrence)
 45 | PTE1
 46 | u+UH
 47 | AKIA************5F67
      |_____client_id____|
 48 | Z7MB/eU**************************ZOcphH2
      |_____________client_secret____________|
 49 | aws_access_key_id: 
 50 |   aws_secret_access_key:

Describe the solution you'd like

There should be a way to scan strings contained in binaries.

Describe alternatives you've considered

Currently, we need to extract printable strings into a file and then launch a scan over it to achieve this goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature request
Projects
None yet
Development

No branches or pull requests

1 participant