-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Trufflehog action looks tremendous. Does it protect us from instances such as the following?
forgot-to-gitignore.ts
export const ALICE_PUBLIC = "d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d";
export const ALICE_SECRET = "e5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a";
My hope is that––when PRed––this would result in a failing check, and a swift force push to the fork/branch could eliminate the secret from its history.
Sidenote: it'd be nice to have a git hook that does the same check locally pre-commit.
Sidenote: it'd be nice to scan the entire repo history as well.
In cases where we do want to commit/expose the secret (Alice is a commonly-known pair, after all), we could somehow allow it / explicitly pass validation.
It's unclear whether Trufflehog addresses this precaution (perhaps it does). Also, it's unclear whether this precaution can be appropriately addressed in the first place; after all, how does a program distinguish between a keypair secret vs. a scale-encoded hex, vs. some other string?.
Regardless of the answers to these questions, I think this PR is generally positive! Worse comes to worse, we can adjust the description of / back-log #36 (in which case, let's not prefix this PR body with the resolution cue).
Updates :
|
* Create secretscheck.yml * add missing word * Update .github/workflows/secretscheck.yml Co-authored-by: T6 <[email protected]> Co-authored-by: T6 <[email protected]>
Resolves #36
In order to check for accidentally leaked secrets/api keys/passwords, I checked out some existing solutions which we could integrate in our repo:
Considering the number of stars, frequency of update and ease of integration, I have integrated trufflehog for now. However, we can discuss more and I can update the PR accordingly.