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

Call bandit with quiet mode to generate less logs #3892

Merged
merged 4 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- [MegaLinter](https://blog.stephane-robert.info/docs/developper/autres-outils/linters/megalinter/), by [Stéphane Robert](https://www.linkedin.com/in/stephanerobert1/), from [3DS OutScale](https://fr.outscale.com/)

- Linters enhancements
- [bandit](https://megalinter.io/latest/descriptors/python_bandit/) Call bandit with quiet mode to generate less logs

- Reporters
- New [**ApiReporter**](https://megalinter.io/beta/reporters/ApiReporter/) (can be used to build Grafana dashboards)
Expand Down
2 changes: 2 additions & 0 deletions megalinter/descriptors/python.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ linters:
linter_rules_inline_disable_url: https://bandit.readthedocs.io/en/latest/config.html#suppressing-individual-lines
cli_lint_mode: list_of_files
config_file_name: ".bandit.yml"
cli_lint_extra_args:
- --quiet
cli_sarif_args:
- --format
- sarif
Expand Down
4 changes: 3 additions & 1 deletion megalinter/reporters/ApiReporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def manage_activation(self):
self.is_active = True
else:
self.is_active = False
logging.error("API_REPORTER_URL must have a correct value to use ApiReporter")
logging.error(
"API_REPORTER_URL must have a correct value to use ApiReporter"
)
else:
self.is_active = False
logging.error("You need to define API_REPORTER_URL to use ApiReporter")
Expand Down