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

chore(config): refactor to go generate; simplify configRules init #1295

Merged
merged 1 commit into from
Nov 22, 2023
Merged

chore(config): refactor to go generate; simplify configRules init #1295

merged 1 commit into from
Nov 22, 2023

Conversation

alexandear
Copy link
Contributor

Description:

This PR refactors the generating of gitleaks.toml by using go generate. It's a familiar way of generating code for any Go developer. It's simpler than cd cmd/generate/config and go run main.go.

Also, configRules slices can be initialized without append.

Checklist:

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

@zricethezav
Copy link
Collaborator

yo @alexandear this is amazing! I'll give this a review sometime today. Thanks for opening this PR. The community will most certainly appreciate this enhancement.

Copy link
Collaborator

@zricethezav zricethezav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect!

@zricethezav zricethezav merged commit 01e60c8 into gitleaks:master Nov 22, 2023
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

2 participants