pscanrules: Improve version detection in Server Header Info Leak rule (10036)#6946
pscanrules: Improve version detection in Server Header Info Leak rule (10036)#6946LakshmiSHR wants to merge 3 commits intozaproxy:mainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
i have read the CLA Document and I hereby sign the CLA |
kingthorin
left a comment
There was a problem hiding this comment.
The CHANGELOG.md should also be updated. Add a bullet under the "Unreleased" header, you can check older entries for inspiration.
It might also be worth adding/updating unit tests.
...anrules/src/main/java/org/zaproxy/zap/extension/pscanrules/ServerHeaderInfoLeakScanRule.java
Show resolved
Hide resolved
...anrules/src/main/java/org/zaproxy/zap/extension/pscanrules/ServerHeaderInfoLeakScanRule.java
Show resolved
Hide resolved
|
Fixed Issues (1)Great job! The following issues were fixed in this Pull Request
Use @Checkmarx to reach out to us for assistance. Just send a PR comment with Examples: |
|
@Checkmarx These scan issues are related to workflow configuration files (codeql.yml), |
|
You can ignore the Checkmarx report. Thanks for your diligence though. |
Signed-off-by: LakshmiSHR <lakshmishree2126@gmail.com>
|
The build is failing and it's missing a unit test for the change done. |
|
@LakshmiSHR do you still plan to work on this? |


Enhancement: Improve detection of version information in HTTP Server header
This PR is related to Issue zaproxy/zaproxy#9160 by enhancing the version-detection logic in
ServerHeaderInfoLeakScanRule.Key Improvements:
.*\d.*) with stricter regex:\d+\.\d+(?:\.\d+)?2.4,1.8.0,2.4.49)matches()tofind()to correctly identify versions inside strings such as:Apache/2.4.49 (Unix)nginx/1.21.6ServerheaderLet me know if further expansion is needed (e.g., detecting more header types or enhancing severity levels).
Thank you!