-
-
Notifications
You must be signed in to change notification settings - Fork 750
pscanrules: Charset Mismatch add example alerts #6544
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
Conversation
|
Fixed Issues (3)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: |
...nrules/src/main/resources/org/zaproxy/zap/extension/pscanrules/resources/Messages.properties
Outdated
Show resolved
Hide resolved
f78f727 to
74a1df3
Compare
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.
Pull Request Overview
This PR enhances the Charset Mismatch scan rule by adding example alert functionality for documentation generation and improving alert handling. The changes include adding example alerts for all mismatch types, implementing alert references, and removing a previously flagged variant about META content-type missing that affected older clients.
Key changes:
- Added example alert functionality and alert references to the scan rule
- Removed the "META Content-Type Charset Missing" alert variant and related functionality
- Refactored test structure to use parameterized tests and simplified test setup
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| CharsetMismatchScanRule.java | Added example alerts, alert references, refactored MismatchType enum, and removed deprecated alert variant |
| CharsetMismatchScanRuleUnitTest.java | Updated tests to verify example alerts, converted to parameterized tests, and removed tests for deprecated functionality |
| Messages.properties | Removed message keys for deprecated META content-type missing alert variant |
| pscanrules.html | Removed documentation for deprecated META content-type missing alert |
| CHANGELOG.md | Added changelog entries documenting the additions and removals |
Comments suppressed due to low confidence (1)
addOns/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRule.java:56
- The string literal is missing the closing '\n' character. It should be 'Content-Type: text/html;charset=UTF-8\r\n'.
Map<String, String> alertTags = new HashMap<>();
74a1df3 to
0208fb4
Compare
|
Deconflicted |
0208fb4 to
06bff07
Compare
...s/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRule.java
Outdated
Show resolved
Hide resolved
...s/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRule.java
Outdated
Show resolved
Hide resolved
...s/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRule.java
Outdated
Show resolved
Hide resolved
...s/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRule.java
Outdated
Show resolved
Hide resolved
...s/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRule.java
Outdated
Show resolved
Hide resolved
...s/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRule.java
Outdated
Show resolved
Hide resolved
...ules/src/test/java/org/zaproxy/zap/extension/pscanrules/CharsetMismatchScanRuleUnitTest.java
Outdated
Show resolved
Hide resolved
|
The commit message has conflict leftovers. |
1e62f81 to
eab8204
Compare
|
Got all those (I think) |
|
The Windows CI failure is unrelated |
1cb590a to
5e91ffa
Compare
|
Done & done |
- CHANGELOG > Add note. - CharsetMismatchScanRule > Add example alerts, adjust handling, some minor related clean code changes. Drop alert related to "older clients". - CharsetMismatchScanRuleUnitTest > Add test to assert the example details, use parameterized case where practical. - Messages.properties > Clarify one of the descriptions. - Help > Drop details related to "older clients" alert. Signed-off-by: kingthorin <[email protected]>
5e91ffa to
4b6cfd8
Compare
|
Thank you! |



Overview
Related Issues