Skip to content

Commit

Permalink
Added documentation on pre-commit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
itoltz committed Jun 4, 2024
1 parent 9542b73 commit 6b525df
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ secureli update --latest
## Configuration
seCureLI is configurable via a .secureli.yaml file present in the root of your local repository.
### .secureli.yaml
seCureLI is configurable via a `.secureli.yaml` file present in the root of your local repository.
#### top level
| Key | Description |
Expand Down Expand Up @@ -166,6 +166,40 @@ seCureLI is configurable via a .secureli.yaml file present in the root of your l
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_url` | The url endpoint to post telemetry logs to. This value is an alternative to setting the url as an environment variable. Note: The environment variable will precede this setting value |
### pre-commit
[pre-commit](https://pre-commit.com/) is used for configuring pre-commit hooks. The configuration file is `.secureli/.pre-commit-config.yaml`, relative to the root of your repo. For details on modifying this file, see the pre-commit documentation on [configuring hooks](https://pre-commit.com/#pre-commit-configyaml---hooks).
#### Passing arguments to pre-commit hooks
Special care needs to be taken when passing arguments to pre-commit hooks in `.pre-commit-config.yaml`. In particular, if you're passing parameters which themselves take arguments, you must ensure that both the parameter and its arguments are separate items in the array.
Examples:
**BAD**
```yaml
- args:
- --exclude files *.md
```
This is an array with a single element, `["--exclude files *.md"]`. This probably won't work as you're expecting.
**GOOD**
```yaml
- args:
- --exclude files
- *.md
```
This is an array where the parameter and its argument are separate items; `["--exclude files", "*.md"]`
**ALSO GOOD**
```yaml
- args: ["--exclude-files", "*.md"]
```
### Using Observability Platform to Show Secret Detection Statistics
seCureLI can send secret detection events to an observability platform, such as New Relic. Other platforms may also work, but have not been tested.
Expand Down

0 comments on commit 6b525df

Please sign in to comment.