Skip to content
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

ascanrules: add SqlInjectionScanRule unit tests for boolean based #5797

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FiveOFive
Copy link
Contributor

Overview

Briefly describe the purpose, goals, and changes or improvements made in this pull request.

Related Issues

Specify any related issues or pull requests by linking to them. zaproxy/zaproxy#8652

Checklist

  • Update help
  • Update changelog
  • Run ./gradlew spotlessApply for code formatting
  • Write tests
  • Check code coverage
  • Sign-off commits
  • Squash commits
  • Use a descriptive title

For more details, please refer to the developer rules and guidelines.

@thc202 thc202 changed the title SqlInjectionScanRule unit tests for boolean based ascanrules: add SqlInjectionScanRule unit tests for boolean based Oct 8, 2024
Comment on lines 10 to 12
### Added
- Sql injection rule unit tests for boolean based attacks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only changes affecting the user should be mentioned in the changelog, tests themselves not worth it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -403,7 +403,7 @@ private static List<String> asList(String... strings) {
* *not* in the last where clause in a SQL query so as a result, the rest of the query needs to
* be closed off with the comment.
*/
private static final String[] SQL_LOGIC_AND_TRUE = {
public static final String[] SQL_LOGIC_AND_TRUE = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package accessible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

@@ -93,287 +101,640 @@ void shouldReturnExpectedMappings() {
is(equalTo(CommonAlertTag.WSTG_V42_INPV_05_SQLI.getValue())));
}

@Test
void shouldTargetDbTech() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have been better if this was done in a separate commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I'll keep code reorganization separate from code changes going forward.

@FiveOFive FiveOFive force-pushed the sqli-boolean-based-unit-tests branch from be5fde3 to 8fcb9d6 Compare October 13, 2024 18:36
Signed-off-by: FiveOFive <FiveOFive@users.noreply.github.com>
@FiveOFive FiveOFive force-pushed the sqli-boolean-based-unit-tests branch from 8fcb9d6 to ff7eae4 Compare October 16, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants