-
-
Notifications
You must be signed in to change notification settings - Fork 282
Retrieve SARIF errors and warnings correctly #4837
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
🦙 MegaLinter status:
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ API | spectral | 1 | 0 | 0 | 1.71s | |
| bash-exec | 6 | 1 | 0 | 0.02s | ||
| ✅ BASH | shellcheck | 6 | 0 | 0 | 0.19s | |
| ✅ BASH | shfmt | 6 | 0 | 0 | 0 | 0.23s |
| ✅ COPYPASTE | jscpd | yes | no | no | 2.97s | |
| ✅ DOCKERFILE | hadolint | 131 | 0 | 0 | 30.77s | |
| ✅ JSON | jsonlint | 20 | 0 | 0 | 0.21s | |
| ✅ JSON | v8r | 22 | 0 | 0 | 11.79s | |
| markdownlint | 269 | 0 | 306 | 0 | 21.42s | |
| ✅ MARKDOWN | markdown-table-formatter | 269 | 0 | 0 | 0 | 142.58s |
| bandit | 222 | 67 | 0 | 5.28s | ||
| ✅ PYTHON | black | 222 | 0 | 0 | 0 | 4.6s |
| ✅ PYTHON | flake8 | 222 | 0 | 0 | 1.99s | |
| ✅ PYTHON | isort | 222 | 0 | 0 | 0 | 0.68s |
| ✅ PYTHON | mypy | 222 | 0 | 0 | 12.75s | |
| ✅ PYTHON | pylint | 222 | 0 | 0 | 32.5s | |
| ✅ PYTHON | ruff | 222 | 0 | 0 | 0 | 0.21s |
| ✅ REPOSITORY | checkov | yes | no | no | 35.42s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.16s | |
| grype | yes | 30 | no | 30.46s | ||
| ✅ REPOSITORY | secretlint | yes | no | no | 8.86s | |
| ✅ REPOSITORY | syft | yes | no | no | 2.35s | |
| ✅ REPOSITORY | trivy | yes | no | no | 11.89s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 19.84s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 7.39s | |
| ✅ SPELL | cspell | 730 | 0 | 0 | 16.58s | |
| lychee | 351 | 36 | 0 | 70.02s | ||
| ✅ XML | xmllint | 3 | 0 | 0 | 0 | 0.65s |
| ✅ YAML | prettier | 160 | 0 | 0 | 0 | 3.8s |
| ✅ YAML | v8r | 103 | 0 | 0 | 14.56s | |
| ✅ YAML | yamllint | 161 | 0 | 0 | 4.74s |
See detailed report in MegaLinter reports
nvuillam
approved these changes
Jun 12, 2025
Member
nvuillam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
To merge one CI is ok :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

With @nvuillam's request I have:
sariftocli_lint_errors_countin json scheme (was implemented in code but not added to schema)sariftocli_lint_warnings_countin json schemeThere are linters that do not fill out the SARIF
levelfield:llaville/sarif-php-converters#1 (Fixed!)
pmd/pmd#5573 (Fixed!!)
anchore/grype#2511 (Fixed!!)
gitleaks/gitleaks#1858
In these cases if they do not fill in the “level” field as I have put in the first message, according to the specification the default value is “warning” so it will be reported as such.
There are other cases Python Bandit that fills levels that we do not show in the reporters like “note” level, in this case I make it to be interpreted as warning that is the closest one.
That is, before this PR everything was interpreted as error, now: