Skip to content

Enable TruffleHog in pre-commit#439

Merged
davidberenstein1957 merged 5 commits intoPrunaAI:mainfrom
ParagEkbote:improve-precommit
Dec 9, 2025
Merged

Enable TruffleHog in pre-commit#439
davidberenstein1957 merged 5 commits intoPrunaAI:mainfrom
ParagEkbote:improve-precommit

Conversation

@ParagEkbote
Copy link
Copy Markdown
Contributor

@ParagEkbote ParagEkbote commented Nov 13, 2025

Description

This is a follow up PR which includes files like .py or .md for scanning and have not linted any files as advised. Currently, the pre-commit hook for trufflehog fails with a package not installed warning. Since it is a golang package, I have adjusted the configuration for it to work. It currently scans src, tests and .github/workflows in order for the checks to be completed in a reasonable amount of time.

Could you please review?

cc: @davidberenstein1957

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment @cursor review or bugbot run to trigger another review on this PR

@ParagEkbote
Copy link
Copy Markdown
Contributor Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


Comment @cursor review or bugbot run to trigger another review on this PR

@ParagEkbote
Copy link
Copy Markdown
Contributor Author

Gentle ping @davidberenstein1957

Could you please review?

- id: trufflehog
name: TruffleHog Secrets Scanner
entry: trufflehog
language: golang
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we setting this to golang?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since trufflehog is a package written in golang, we have to specify the language for the hook to run.

name: TruffleHog Secrets Scanner
entry: trufflehog
language: golang
types_or: [python, yaml, json, text]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this specific config?

Copy link
Copy Markdown
Contributor Author

@ParagEkbote ParagEkbote Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In types_or we define the types of program files for scanning using trufflehog. Do you think we need to define additional file types?

Copy link
Copy Markdown
Member

@davidberenstein1957 davidberenstein1957 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR :) I had 2 minor remarks.

@ParagEkbote
Copy link
Copy Markdown
Contributor Author

Could you please review?

cc: @minettekaum

Copy link
Copy Markdown
Contributor

@minettekaum minettekaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. And sorry for the slow turnaround, appreciate your patience 😄

@ParagEkbote
Copy link
Copy Markdown
Contributor Author

Are there any pending changes for this PR?

cc: @davidberenstein1957

@davidberenstein1957 davidberenstein1957 merged commit 997e57f into PrunaAI:main Dec 9, 2025
3 checks passed
@ParagEkbote ParagEkbote deleted the improve-precommit branch December 9, 2025 10:55
Marius-Graml pushed a commit that referenced this pull request Dec 22, 2025
* update pre-commit

* rm redudant filters.

* fix nits and whitespacing issues.

* Update versions
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.

3 participants