Skip to content

Commit

Permalink
Count number of errors in Grype (#3906)
Browse files Browse the repository at this point in the history
* [automation] Auto-update linters version, help and documentation

* [MegaLinter] Apply linters fixes

* Count number of errors in Grype

* Doc

* fix

---------

Co-authored-by: nvuillam <nvuillam@users.noreply.github.com>
  • Loading branch information
nvuillam and nvuillam authored Aug 19, 2024
1 parent d133868 commit d8cbb09
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l

- Linters enhancements
- [bandit](https://megalinter.io/latest/descriptors/python_bandit/) Call bandit with quiet mode to generate less logs
- [grype](https://megalinter.io/latest/descriptors/repository_grype/) Count number of errors returned by Grype
- [yamllint](https://megalinter.io/latest/descriptors/yaml_yamllint) Fix yamllint default format to avoid special characters or GitHub sections in text logs

- Reporters
Expand Down
11 changes: 11 additions & 0 deletions docs/reporters/ApiReporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,17 @@ _Example with GitHub Workflow:_

![](../assets/images/grafana-config-13bis.jpg)

```yaml
API_REPORTER: true
API_REPORTER_URL: ${{ secrets.API_REPORTER_URL }}
API_REPORTER_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_BASIC_AUTH_USERNAME }}
API_REPORTER_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_BASIC_AUTH_PASSWORD }}
API_REPORTER_METRICS_URL: ${{ secrets.API_REPORTER_METRICS_URL }}
API_REPORTER_METRICS_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_USERNAME }}
API_REPORTER_METRICS_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_PASSWORD }}
API_REPORTER_DEBUG: false
```
### Download MegaLinter dashboards
Download all MegaLinter Dashboard JSON files from [this MegaLinter repo folder](https://github.com/oxsecurity/megalinter/tree/main/docs/grafana)
Expand Down
2 changes: 2 additions & 0 deletions megalinter/descriptors/repository.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ linters:
- --output
- sarif
cli_version_arg_name: version
cli_lint_errors_count: regex_count
cli_lint_errors_regex: "(Low|Medium|High|Critical)"
examples:
- "grype dir:."
downgraded_version: true
Expand Down

0 comments on commit d8cbb09

Please sign in to comment.