You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mkdir tartufo-pre-commit-test
cd tartufo-pre-commit-test/
git init
touch test_file
git status
git add .
git commit
pre-commit install
cat test_file # file is empty
openssl rand -base64 40 > test_file # add some content that tartufo would flag
git commit -am "test" # this should result in tartufo complaining about the content, but with issue shows passing scan
Expected Behavior
Tartufo:pre-commit should scan files not explicitly staged via git add, but added via git commit -am
report issue.
Perhaps additionally, the command should indicate when there are no files being operated on by the command.
Environment
The text was updated successfully, but these errors were encountered:
jwinders-godaddy
changed the title
Tartufo pre-commit command does not scan files committed via git -am command
Tartufo pre-commit command does not scan files committed via git commit -a command
Nov 29, 2022
jwinders-godaddy
changed the title
Tartufo pre-commit command does not scan files committed via git commit -a command
Tartufo pre-commit command does not scan files committed via git commit -am command
Nov 29, 2022
I'll add to this that I tested back to version 3.1.3 and found that the pre-commit check would fail and present tartufo output indicating the offending content. However, as of version 3.1.4 the same test results in the pre-commit check passing.
Looking at v3.1.3...v3.1.4 it looks like #351 introduced a cached=True option into the code.
Pulling down the latest 3.3.1 version and taking out line 962
🐛 Bug Report
To Reproduce
Using tartufo 3.2.1 or 3.3.1
Following steps assume a local .pre-commit-config.yaml file with the following content:
Expected Behavior
Tartufo:pre-commit should scan files not explicitly staged via git add, but added via git commit -am
report issue.
Perhaps additionally, the command should indicate when there are no files being operated on by the command.
Environment
The text was updated successfully, but these errors were encountered: