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

Pre-commit hook: High entropy strings not detected in new files by 3.0.0 #331

Closed
prajasekaran-godaddy opened this issue Mar 18, 2022 · 1 comment · Fixed by #352
Closed
Labels
bug Something isn't working

Comments

@prajasekaran-godaddy
Copy link

🐛 Bug Report

Tartufo 3.0.0 does not detect high entropy strings in files that are getting added to the index by the commit that is being evaluated.

To Reproduce

  1. Add/update pre-commit config file to use tartufo 3.0.0
repos:
  - repo: https://github.com/godaddy/tartufo
    rev: v3.0.0
    hooks:
      - id: tartufo
        name: tartufo
        entry: tartufo
        args: [ pre-commit ]
        language: python
        pass_filenames: false
  1. Install the pre-commit configuration
pre-commit install
  1. Create a new file with high entropy string
  2. Stage the file and commit it. Commit suceeeds
date | shasum > new_file.txt
git add new_file.txt
git commit -m "committing a high entropy string"

Expected Behavior

Commit should not succeed, and return failure. (2.10.0 rejects the commit as expected)

Code Example

Environment

  1. Macintosh
  2. Installed pre-commit through pip (2.17.0)
@prajasekaran-godaddy prajasekaran-godaddy added the bug Something isn't working label Mar 18, 2022
@jwilbur-godaddy
Copy link
Contributor

Did you ever find a solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants