thoughtworks / talisman

Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious — such as tokens, passwords, and private keys.
https://thoughtworks.github.io/talisman/
MIT License
1.89k stars 241 forks source link

Adding checksums to .talismanrc are not being reflected in subsequence talisman scans #357

Closed sariza369 closed 2 years ago

sariza369 commented 2 years ago

Describe the bug I am running Talisman through a husky pre-commit hook and its collecting some errors in the scan for package-lock.json. This is fine for me so i am adding the checksum to the .talismanrc file. However after adding the checksum to the file it still generates the same checksum and prevents me from committing my changes. I am also running this in isolation through this script $TALISMAN_HOME/talisman_hook_script pre-commit and its yielding the same problems

To Reproduce Steps to reproduce the behavior:

  1. Execute git commit -m "message" or $TALISMAN_HOME/talisman_hook_script pre-commit
  2. Notice a checksum generated with errors
  3. Create .talismanrc and add the generated checksum to the ignore list
  4. Execute Step 1 again
  5. See the same generated checksum with errors

Expected behavior I expect to not see the same generated checksum. if i run git commit -m "message" i expect the commit to be created. If i run $TALISMAN_HOME/talisman_hook_script pre-commit i should see no errors or checksum generated

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Version: Talisman v1.23.0