Add gitleaks to default config or move it to a plugin
- Dominant language
- TypeScript
- Stars
- 249
- Forks
- 176
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 20
Description
**Is your feature request related to a problem? Please describe.**
The Git leaks configuration should either be added to the default config, or the gitleaks processor moved out to a plugin. If moved to a plugin, we need to think about where plugins are configured - it sporobably shouldn't be via the main configuration elements (such `apis`) as at present.
Original comment thread: https://github.com/finos/git-proxy/pull/1243#discussion_r2427968717
[@jescalada](https://github.com/jescalada)
> Should gitLeaks from the api be present with a default value instead? 🤔
[@kriswest](https://github.com/kriswest)
> I'm wondering that too. I don't see a default value for the `configPath` variable in the defaults in the code:
> https://github.com/finos/git-proxy/blob/84d25631e26efdff41443b8b02e9fb8feb0eac0f/src/proxy/processors/push-action/gitleaks.ts#L42-L47
>
> and you can't set an `undefined` value in JSON so I guess it would be:
>
> ```JSON
> {
> "enabled": false,
> "ignoreGitleaksAllow": true,
> "noColor": false,
> }
> ```
>
> However, I also note the comment:
>
> ```
> // adding gitleaks into main git-proxy for now as default off
> // in the future will likely be moved to a plugin where it'll be default on
> ```
>
> Are we going to move it to a plugin or keep it where it is? That should probably decide if and where it goes into the schema.
>
> If it goes into a plugin, are thre thoughts on configuring plugins? `plugins` is just an array of strings at present - should we be creating something new or is there an existing pattern I missed @coopernetes?
**Describe the solution you'd like**
The default gitleaks settings appear in the default config file OR in a defined area of the configuration for plugins.
Contributor guide
Assessment
This issue has not been assessed yet.