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

Update stripe rule to not alert on publishable keys #1320

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

brownierin
Copy link
Contributor

@brownierin brownierin commented Jan 3, 2024

Description:

Stripe does a weird thing with their secrets: they have publishable keys (PK) and secret keys (SK). These abbreviations are used as the prefix for the key material, e.g., pk_blahblahblah and sk_blahblahblah. The publishable key is deliberately not secret, and it's used to identify the client to their API. Confusingly named if you're in tech; usually pk means private key.

This rule checks for both sk and pk, and it should only check for sk. I've updated it to reflect only sk values, which are actually secret.

Checklist:

  • Does your PR pass tests?
  • Have you written new tests for your changes?
  • Have you lint your code locally prior to submission?

@brownierin
Copy link
Contributor Author

Looks like this test is supposed to fail when modifying rules.

@zricethezav
Copy link
Collaborator

Thanks for the PR @brownierin. The reason the test is failing is because when updating the config you have to run go generate ./... as documented in the contributing guidelines https://github.com/gitleaks/gitleaks/blob/master/CONTRIBUTING.md

@zricethezav zricethezav merged commit afe046b into gitleaks:master Jan 31, 2024
1 check passed
quotengrote pushed a commit to quotengrote/miniflux-filter that referenced this pull request Feb 1, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [zricethezav/gitleaks](https://github.com/gitleaks/gitleaks) | patch | `v8.18.1` -> `v8.18.2` |

---

> ⚠ **Warning**
>
> Some dependencies could not be looked up. Check the warning logs for more information.

---

### Release Notes

<details>
<summary>gitleaks/gitleaks (zricethezav/gitleaks)</summary>

### [`v8.18.2`](https://github.com/gitleaks/gitleaks/releases/tag/v8.18.2)

[Compare Source](gitleaks/gitleaks@v8.18.1...v8.18.2)

#### Changelog

-   [`ac4b514`](gitleaks/gitleaks@ac4b514) removed gitleaks user from Dockerfile ([#&#8203;1313](gitleaks/gitleaks#1313))
-   [`76c9e31`](gitleaks/gitleaks@76c9e31) Remove IAM identifiers for non-credential resources in the aws-access-token rule ([#&#8203;1307](gitleaks/gitleaks#1307))
-   [`afe046b`](gitleaks/gitleaks@afe046b) Update stripe rule to not alert on publishable keys ([#&#8203;1320](gitleaks/gitleaks#1320))
-   [`8b8920d`](gitleaks/gitleaks@8b8920d) --max-target-megabytes flag now supported for --no-git flag as well ([#&#8203;1330](gitleaks/gitleaks#1330))
-   [`a59289c`](gitleaks/gitleaks@a59289c) add pre-commit hook gitleaks-system ([#&#8203;1225](gitleaks/gitleaks#1225))
-   [`870194b`](gitleaks/gitleaks@870194b) fix errors when using protect and an external git diff tool ([#&#8203;1318](gitleaks/gitleaks#1318))
-   [`179c607`](gitleaks/gitleaks@179c607) rename filesystem to directory ([#&#8203;1317](gitleaks/gitleaks#1317))
-   [`8de8938`](gitleaks/gitleaks@8de8938) Enhance Secret Descriptions  ([#&#8203;1300](gitleaks/gitleaks#1300))
-   [`ca7aa14`](gitleaks/gitleaks@ca7aa14) Small refactor `detect` and `sources` ([#&#8203;1297](gitleaks/gitleaks#1297))
-   [`01e60c8`](gitleaks/gitleaks@01e60c8) chore(config): refactor to go generate; simplify configRules init ([#&#8203;1295](gitleaks/gitleaks#1295))
-   [`54f5f04`](gitleaks/gitleaks@54f5f04) forgot symlinks
-   [`221d5c4`](gitleaks/gitleaks@221d5c4) pretty apparent 'protect' and 'detect' should be merged into one command ([#&#8203;1294](gitleaks/gitleaks#1294))
-   [`128b50f`](gitleaks/gitleaks@128b50f) style: sort the stopwords ([#&#8203;1289](gitleaks/gitleaks#1289))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNjUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE2NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Reviewed-on: https://git.mgrote.net/container-images/miniflux-filter/pulls/17
Co-authored-by: Renovate Bot <renovate@mgrote.net>
Co-committed-by: Renovate Bot <renovate@mgrote.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants