Skip to content

quickstart: Add Scan Policy option to Automated Scan panel#7300

Open
Adarshkumar0509 wants to merge 12 commits intozaproxy:mainfrom
Adarshkumar0509:main
Open

quickstart: Add Scan Policy option to Automated Scan panel#7300
Adarshkumar0509 wants to merge 12 commits intozaproxy:mainfrom
Adarshkumar0509:main

Conversation

@Adarshkumar0509
Copy link
Copy Markdown

@Adarshkumar0509 Adarshkumar0509 commented Apr 21, 2026

Fixes zaproxy/zaproxy#9291

Added a Scan Policy dropdown to the Quick Start Automated Scan panel.

Changes:

  • AttackPanel.java: Added policy JComboBox populated from PolicyManager
  • AttackThread.java: Added scanPolicyName field and passes selected policy to active scanner
  • ExtensionQuickStart.java: Passes selected policy from panel to attack thread
  • Messages.properties: Added quickstart.label.policy label

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Adarshkumar0509
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 21, 2026

Changelog will have to be updated.

@thc202 thc202 changed the title Add Scan Policy option to Quick Start Automated Scan panel quickstart: Add Scan Policy option to Automated Scan panel Apr 21, 2026
@psiinon
Copy link
Copy Markdown
Member

psiinon commented Apr 21, 2026

Logo
Checkmarx One – Scan Summary & Detailsac1f5546-5496-4454-9ad3-33b0beb36e24

Great job! No new security vulnerabilities introduced in this pull request


Use @Checkmarx to interact with Checkmarx PR Assistant.
Examples:
@Checkmarx how are you able to help me?
@Checkmarx rescan this PR

@Adarshkumar0509
Copy link
Copy Markdown
Author

@Checkmarx rescan this PR.

@Adarshkumar0509
Copy link
Copy Markdown
Author

Adarshkumar0509 commented Apr 21, 2026

hii @thc202 and @psiinon , please take a look whenever you have time.

kingthorin
kingthorin previously approved these changes Apr 21, 2026
@kingthorin kingthorin dismissed their stale review April 21, 2026 20:29

Accidental approval

@Adarshkumar0509
Copy link
Copy Markdown
Author

@Checkmarx rescan this PR.

@Adarshkumar0509
Copy link
Copy Markdown
Author

hii @kingthorin sir can you have a look at this.

@kingthorin
Copy link
Copy Markdown
Member

@Checkmarx rescan this PR.

You don't need to worry about this, thanks for trying to be diligent 😉

@Adarshkumar0509
Copy link
Copy Markdown
Author

hii @kingthorin and @thc202 , please take a look whenever you have time. since this was my first contribution i want to contribute and learn more can you guide me some issues.

@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 22, 2026

It's not necessary to ping, we get notifications of comments/pushes.

Copy link
Copy Markdown
Member

@psiinon psiinon left a comment

Choose a reason for hiding this comment

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

It works, which is always a good start 😁
A couple of chances would be good:

  • Initially default to "Dev Standard" (if present)
  • Save the last chosen policy in the options, and use that as the new default
  • Update the help

@Adarshkumar0509
Copy link
Copy Markdown
Author

i have made the changes , Take a look whenever you have time.

}
if (savedPolicy != null && !savedPolicy.isEmpty()) {
policyField.setSelectedItem(savedPolicy);
} else if (defaultPolicy != null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use policyExists(…) again.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Preferable to inline in the if than declare variables upfront that might not be even used.


The scan policy to use when performing the active scan.
The last chosen policy will be used by default.
<br><br>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe this is still outstanding

@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 22, 2026

Be good to add some tests to cover the new behaviour.

@Adarshkumar0509
Copy link
Copy Markdown
Author

can you take a look at this.

attackThread.setURL(url);
attackThread.setTraditionalSpider(traditionalSpider);
attackThread.setPlugableSpider(plugableSpider);
attackThread.setScanPolicyName(getQuickStartPanel().getAttackPanel().getSelectedPolicy());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will break in headless mode, see HeadlessQuickAttacker usage. Better add a package method which accepts a policy than access view classes directly.

@Adarshkumar0509
Copy link
Copy Markdown
Author

please take a look at this.

@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 24, 2026

Still pending review comments.

Comment thread gradle.properties Outdated
Comment on lines +2 to +3
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2g
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be reverted.

@Adarshkumar0509
Copy link
Copy Markdown
Author

working on it.

@Adarshkumar0509
Copy link
Copy Markdown
Author

just take a look at this

Comment thread gradle.properties
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There should be no changes to this file

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

For gradle.properties: reply i Reverted in latest commit.


The scan policy to use when performing the active scan.
The last chosen policy will be used by default.
<br><br>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe this is still outstanding

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.

Add Scan policy option to Quick Start scan

4 participants