-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
automation & sequence: fix use of default policies and set Sequence as default sequence policy #5897
base: main
Are you sure you want to change the base?
Conversation
5d954f9
to
a4deb50
Compare
I had to rename one of the UnitTest classes so that Eclipse would properly find it and run it as a JUnit test. |
Still needs changelog and help updates I guess |
addOns/automation/src/main/java/org/zaproxy/addon/automation/jobs/PolicyDefinition.java
Outdated
Show resolved
Hide resolved
addOns/automation/src/test/java/org/zaproxy/addon/automation/jobs/ActiveScanJobUnitTest.java
Outdated
Show resolved
Hide resolved
...uence/src/main/java/org/zaproxy/zap/extension/sequence/automation/SequenceActiveScanJob.java
Show resolved
Hide resolved
addOns/automation/src/test/java/org/zaproxy/addon/automation/jobs/ActiveScanJobUnitTest.java
Outdated
Show resolved
Hide resolved
ebd5ac4
to
02430c9
Compare
This comment was marked as resolved.
This comment was marked as resolved.
addOns/automation/src/main/java/org/zaproxy/addon/automation/jobs/PolicyDefinition.java
Outdated
Show resolved
Hide resolved
02430c9
to
9b95891
Compare
addOns/automation/src/main/java/org/zaproxy/addon/automation/jobs/ActiveScanJob.java
Outdated
Show resolved
Hide resolved
...mation/src/main/javahelp/org/zaproxy/addon/automation/resources/help/contents/job-ascan.html
Outdated
Show resolved
Hide resolved
...src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help/contents/automation.html
Show resolved
Hide resolved
9b95891
to
0203cab
Compare
addOns/automation/src/test/java/org/zaproxy/addon/automation/jobs/ActiveScanJobUnitTest.java
Outdated
Show resolved
Hide resolved
0203cab
to
7caef4f
Compare
a14df14
to
d2a97d4
Compare
9850833
to
9f85171
Compare
Okay I think I'm caught up to all the feedback now 😉 |
There are still two cases that don't yet use the default policy, when the I'm fine if this is merged without those two cases but we should fix them before releasing the add-ons. |
c712373
to
0cfd10f
Compare
Handled.
I'm not exactly sure where to handle this. |
Re 2. I think the seq ascan should always default to the Sequence policy we define.
|
Agreed, that's the way we're headed with this. The question for my point 2 above is where/how it should be handled within the code 😀 |
It can be done in |
" defaultStrength: \n" + " defaultThreshold: \n" + " rules: ", | ||
"rules: \n", | ||
"defaultStrength:" |
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.
I'd say in these cases we should use the defaults. The user is specifying something after all (even if not complete).
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.
Done
Call parse from verify? |
Then I believe it's already covered. Both activeScanJob and sequenceActiveScanJob call parse in verifyParameters. |
Signed-off-by: kingthorin <[email protected]>
8734388
to
454ec06
Compare
They need to call it always, currently when not present that method is not called and the null strength is not set. |
Signed-off-by: kingthorin <[email protected]>
454ec06
to
b196075
Compare
Done |
Overview
Modify automation and sequence to properly build and use a policy from policyDefinition if present in the plan. If neither policy nor policyDefinition are defined fall back to
Default Policy
orSequence
respectively.Related Issues
n/a
Checklist
./gradlew spotlessApply
for code formatting