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

[request] Add PyMySQL connection object detector #833

Open
bugbaba opened this issue Oct 3, 2022 · 4 comments
Open

[request] Add PyMySQL connection object detector #833

bugbaba opened this issue Oct 3, 2022 · 4 comments

Comments

@bugbaba
Copy link

bugbaba commented Oct 3, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Hello Team :)

Currently the truffleHog is not having any detector for PyMySQL connection object. Its a famouse python library to connect with mysql database.

Problem to be Addressed

PyMySQL connection objection not detected by trufflehog.

Description of the Preferred Solution

Add a detector to detect PyMySQL connection object in the code. We should look for pymysql.connect(.*) in th code and then parse the host, username, password to verify the credentials.

Additional Context

Basic regex which can be used for detection part : https://regex101.com/r/nMcIUK/1

References

Official PyMySQL documentation: https://pymysql.readthedocs.io/en/latest/index.html

--
Regards,
@bugbaba

@Fenrisfulsur
Copy link

Hi, I would like to contribute to this issue, is it still open / possible ?

@bugbaba
Copy link
Author

bugbaba commented Feb 1, 2023

@Fenrisfulsur yes its still open.

@Fenrisfulsur
Copy link

Ok, I will start to work on it then.

@Fenrisfulsur
Copy link

Hi, I have a question regarding the test case i have to provided with the detector, I've read the Adding_Detectors_external.md, is it mandatory to provide a working test that can verify the secret ? because in my case it would require setting up a mysql database. Can i provided only "found, unverified" test case ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants