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

CustomRegex detector does not include repository in Metadata > Git #2990

Open
gsilvapt opened this issue Jun 19, 2024 · 1 comment
Open

CustomRegex detector does not include repository in Metadata > Git #2990

gsilvapt opened this issue Jun 19, 2024 · 1 comment
Labels

Comments

@gsilvapt
Copy link

gsilvapt commented Jun 19, 2024

I apologise in advance if I'm breaking any rules by opening this ticket.

TruffleHog Version

3.69.0

Trace Output

Unfortunately, cannot share a output due to the sensitive data I have in hands. I wanted to nevertheless report the bug or maybe get help in figuring out why this is happening.

Expected Behavior

As with any other entry in the JSON output, the composition of the JSON looks like this:

{
  "SourceMetadata": {
    "Git": {
      "..."
      "Repository": "<link to repository>"
      ...
}

The output composition should be the the same for all detectors.

Actual Behavior

Seems the repository property is missing in the resulting JSON TruffleHog generates when custom regexes are configured. Cannot understand why exactly, if this is a known bug or something else, but since it seems to work for other detectors, then I must assume this is some sort of bug?

Steps to Reproduce

  1. Set up custom regexes to run TruffleHog with.
  2. Observe the detected secrets for CustomRegex do not contain the repository property in the Metadata key.
  3. Observe all other detections do provide this data.

Environment

  • Running TruffleHog on MacOS M1 Sonoma 14.5
  • Using containers to run TruffleHog version 3.69.0.

Additional Context

N/A

References

N/A

@gsilvapt gsilvapt added the bug label Jun 19, 2024
@k-sau
Copy link

k-sau commented Sep 4, 2024

It is not returning file and line number also. Repository is returning though
Screenshot 2024-09-04 at 4 53 40 PM

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

No branches or pull requests

2 participants