fix: clarify category gate failure message for inclusive threshold#231
Merged
Conversation
Updated help message for 'fail_on_category' option to clarify threshold behavior.
Refactor Dockerfile scanning to deduplicate file paths and images.
Add tests for deduplication of Dockerfile findings in various scenarios.
Contributor
Author
|
Note for maintainer: This PR contains fixes for two separate issues:
Both were committed to the same branch. Happy to split into separate PRs |
Collaborator
|
@laishettikarthik-tech its fine for now, but please make sure to split into different branches when issues are unrelated. |
Contributor
Author
|
Thanks for the feedback. Apologies for the failing checks. I'm looking into the CI failures and will submit a fix shortly so the tests pass cleanly. |
Correct _scan_dockerfile body indentation, sync with main's pyproject parsing, align docker dedupe tests with unpinned-image detection, and run ruff format on touched files.
Keep data-leakage loopback regression from main alongside Docker dedupe tests from this branch.
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
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.
Closes #209
What this PR does
category_gate_failuresthatshowed "Passed" while exiting with code 1
--fail-on-categoryhelp text to explain inclusive semanticsChanges
src/mcts/report/data.py— clearer failure message with score/limitsrc/mcts/cli/main.py— updated --fail-on-category help texttests/test_category_gates.py— 3 new boundary testsBefore
"Excessive Permissions scored Passed (limit 0)" → exit 1
After
"Excessive Permissions: risk score 0 >= limit 0
(inclusive gate — 'Passed' is category label, not CI result)" → exit 1