Removing a scan rule

22 views
Skip to first unread message

Venkata Subrahmanyam

unread,
Mar 31, 2022, 2:13:19 PM3/31/22
to zaproxy...@googlegroups.com
Hey folks, 

I am trying to remove all of the informational scan rules from initiatingt using Python. Do I remove them by ID one by one or can I remove them by severity? Tried few options zap.ascan.remove_scan and zap.ascan.disable_scanners(ids="10096") but not working 

Also, how do I list all the scan rules currently enabled? Unable to find the right API hook.

Venkat

This mail is governed by the Disclaimer Terms of  SIU which may be viewed at http://siu.edu.in/disclaimer.php

kingthorin+owaspzap

unread,
Mar 31, 2022, 3:59:26 PM3/31/22
to OWASP ZAP Developer Group
You can't do it by severity.
Your best bet is likely to create the active scan policy you want via ZAP desktop then save it, and import/use it in your automation.

Venkata Subrahmanyam

unread,
Apr 1, 2022, 1:54:04 AM4/1/22
to zaproxy...@googlegroups.com
Can I remove individual rules one by one using the above api hook? 

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-devel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/zaproxy-develop/8c2a5b27-cdd6-4cd8-9243-9215b9847a5en%40googlegroups.com.

Venkata Subrahmanyam

unread,
Apr 1, 2022, 11:52:46 AM4/1/22
to zaproxy...@googlegroups.com
Also, if I want disable timestamp disclosure specifically, how do I go about doing that? I am currently setting policy threshold as below:

Zap.ascan.set_policy_alert_threshold(id=10096, scanpolicyname=default policy, alertthreshold = OFF)

Is this the right api hook to use for disabling one alert alone? 

On Fri, 1 Apr, 2022, 01:29 kingthorin+owaspzap, <kingt...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "OWASP ZAP Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-devel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/zaproxy-develop/8c2a5b27-cdd6-4cd8-9243-9215b9847a5en%40googlegroups.com.

thc...@gmail.com

unread,
Apr 4, 2022, 10:25:16 AM4/4/22
to zaproxy...@googlegroups.com
That's a passive scan rule: https://www.zaproxy.org/docs/alerts/10096/

You'll have to use the pscan component to disable it.

Best regards.

On 01/04/2022 16:52, Venkata Subrahmanyam wrote:
> Also, if I want disable timestamp disclosure specifically, how do I go
> about doing that? I am currently setting policy threshold as below:
>
> Zap.ascan.set_policy_alert_threshold(id=10096, scanpolicyname=default
> policy, alertthreshold = OFF)
>
> Is this the right api hook to use for disabling one alert alone?
>
> On Fri, 1 Apr, 2022, 01:29 kingthorin+owaspzap, <kingt...@gmail.com>
> wrote:
>
>> You can't do it by severity.
>> Your best bet is likely to create the active scan policy you want via ZAP
>> desktop then save it, and import/use it in your automation.
>>
>> On Thursday, March 31, 2022 at 2:13:19 PM UTC-4
>> venkata.su...@associates.scit.edu wrote:
>>
>>> Hey folks,
>>>
>>> I am trying to remove all of the informational scan rules from
>>> initiatingt using Python. Do I remove them by ID one by one or can I remove
>>> them by severity? Tried few options zap.ascan.remove_scan and
>>> zap.ascan.disable_scanners(ids="10096") but not working
>>>
>>> Also, how do I list all the scan rules currently enabled? Unable to find
>>> the right API hook.
>>>
>>> Venkat
>>>
>>> *This mail is** governed by the Disclaimer Terms of SIU which may be
>>> viewed at* http://siu.edu.in/disclaimer.php
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "OWASP ZAP Developer Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to zaproxy-devel...@googlegroups.com.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/zaproxy-develop/8c2a5b27-cdd6-4cd8-9243-9215b9847a5en%40googlegroups.com
>> <https://groups.google.com/d/msgid/zaproxy-develop/8c2a5b27-cdd6-4cd8-9243-9215b9847a5en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
Reply all
Reply to author
Forward
0 new messages