feat: add min_level input to filter ZAP scan alerts by severity#118
Open
Yash7256 wants to merge 1 commit intozaproxy:masterfrom
Open
feat: add min_level input to filter ZAP scan alerts by severity#118Yash7256 wants to merge 1 commit intozaproxy:masterfrom
Yash7256 wants to merge 1 commit intozaproxy:masterfrom
Conversation
Member
|
Great job! No new security vulnerabilities introduced in this pull requestUse @Checkmarx to interact with Checkmarx PR Assistant. |
Member
|
See #9 (comment). You can also pass all the flags you need through |
Author
|
Thanks for the pointer! Understood, I missed that cmdOptions already covers this. |
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.

Summary
Adds a new
min_levelinput that allows users to filter ZAP scan alertsby minimum severity level, reducing noise in GitHub issues created by the action.
Problem
#9
Currently the action reports ALL alert levels including INFO and LOW findings.
This floods issue trackers with low-priority noise and makes it harder to focus
on critical vulnerabilities. Users have no way to say "only report WARN and above."
Solution
The underlying
zap-full-scan.pyalready supports a-lflag for minimum alertlevel. This PR exposes that flag as a new optional
min_levelinput and wiresit through to the ZAP Docker command.
Changes
action.yml— addedmin_levelinput (optional, defaults to'')index.js— reads input, validates against allowed levels, builds-lflagdist/index.js— rebuilt bundleUsage
Valid values
PASS,IGNORE,INFO,WARN,FAILInvalid values are ignored with a warning and the scan runs without the
-lflag,preserving existing behaviour.
Testing
Validation logic tested locally:
WARN→-l WARNappended to commandfail→-l FAIL(uppercased correctly)HIGH→ warning logged, flag ignoredinvalid→ warning logged, flag ignored''→ no flag added, existing behaviour preserved