Skip to content

Commit

Permalink
Improve gitleaks setup
Browse files Browse the repository at this point in the history
This accomplishes a few things:
1. Removes some entries in .gitleaksignore which were incorrect (the
   commit hash did not match the commit that introduced the change)
2. Moves our handling of the debug google services file to a gitleaks
   config file. That means that no matter where that secret shows up, it
   will be allowed (as opposed to handling it in the gitleaksignore file
   which required specifying every location/commit where the secret was
   introduced).
3. Adds the old IntentUtilTest example api key to the list of ignored
   secrets so that it does not get flagged up when running `gitleaks detect`.
  • Loading branch information
mchowning committed Oct 3, 2023
1 parent cb124e7 commit fed547e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[extend]
useDefault = true

[allowlist]
description = "global allow list"
regexes = [
"AIzaSyBguqVfwriVWjnSqRg50XPfZZH5r1VumNM",
]
9 changes: 4 additions & 5 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
e1cea16b77b1e331bfa8c5a8135dcdf24f32cf6f:app/google-services.json_debug-only:gcp-api-key:23
e306375a06498977fa176519a0c4a5d463bb47bf:app/src/debugProd/google-services.json:gcp-api-key:23
e306375a06498977fa176519a0c4a5d463bb47bf:app/src/debugProd/google-services.json:gcp-api-key:23
e1cea16b77b1e331bfa8c5a8135dcdf24f32cf6f:automotive/google-services.json_debug-only:gcp-api-key:23
28aab01a878ce90aa6202af6124e120524e3bfc8:wear/google-services.json_debug-only:gcp-api-key:23
d1502d9bf89fec3e19098f3ec78bc41e1473b447:app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/views/helper/IntentUtilTest.kt:generic-api-key:29
d1502d9bf89fec3e19098f3ec78bc41e1473b447:app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/views/helper/IntentUtilTest.kt:generic-api-key:33
d1502d9bf89fec3e19098f3ec78bc41e1473b447:app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/views/helper/IntentUtilTest.kt:generic-api-key:49
d1502d9bf89fec3e19098f3ec78bc41e1473b447:app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/views/helper/IntentUtilTest.kt:generic-api-key:53

0 comments on commit fed547e

Please sign in to comment.