Skip to content

Commit eece240

Browse files
authored
Merge pull request #3254 from thc202/auto-pcsan-jobs
2 parents ddacda1 + fa2e9ab commit eece240

File tree

2 files changed

+4
-64
lines changed

2 files changed

+4
-64
lines changed
Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,5 @@
11
---
2-
# This page was generated from the add-on.
32
title: Automation Framework - passiveScan-config Job
4-
type: userguide
5-
weight: 6
3+
layout: redirect
4+
redirect: /docs/desktop/addons/passive-scanner/job-pscanconf/
65
---
7-
8-
# Automation Framework - passiveScan-config Job
9-
10-
This job allows you to manage the passive scan configuration.
11-
12-
It is covered in the video: [ZAP Chat 08 Automation Framework Part 2 - Environment](https://youtu.be/1fcpU54N-mA).
13-
14-
The passive scanner runs against all requests and responses that are generated by ZAP or are proxied through it.
15-
If you want to configure the passive scan configuration then you should typically do so before running any other jobs.
16-
However you can run this job later, or multiple times, if you want different jobs to use different passive scan configurations.
17-
18-
## YAML
19-
20-
```
21-
- type: passiveScan-config # Passive scan configuration
22-
parameters:
23-
maxAlertsPerRule: 10 # Int: Maximum number of alerts to raise per rule
24-
scanOnlyInScope: true # Bool: Only scan URLs in scope (recommended)
25-
maxBodySizeInBytesToScan: # Int: Maximum body size to scan, default: 0 - will scan all messages
26-
enableTags: false # Bool: Enable passive scan tags, default: false - enabling them can impact performance
27-
disableAllRules: false # Bool: If true then will disable all rules before applying the settings in the rules section
28-
rules: # A list of one or more passive scan rules and associated settings which override the defaults
29-
- id: # Int: The rule id as per https://www.zaproxy.org/docs/alerts/
30-
name: # String: The name of the rule for documentation purposes - this is not required or actually used
31-
threshold: # String: The Alert Threshold for this rule, one of Off, Low, Medium, High, default: Medium
32-
```
33-
34-
The job saves the current passive scan configuration when a plan starts and resets it when the plan ends. This is primarily to ensure the scanOnlyInScope setting is not changed - the default is 'true' for the job but 'false' in the GUI.
35-
36-
Note that if you set `disableAllRules` to `true` then they will stay disabled when the plan has finished.
37-
Automatically re-enabling them when the plan finishes could result in the rules becoming enabled while the passive scan
38-
queue is being processed, for example if the [passiveScan-wait](/docs/desktop/addons/automation-framework/job-pscanwait/) job is not used,
39-
or if it is used but with the maxDuration option is set.
40-
41-
In versions up to and including 0.16.0 running this job with the default settings would change scanOnlyInScope to 'true' in the GUI.
42-
This has proved confusing as many users use the GUI without setting a scope - when scanOnlyInScope is set to 'true'
43-
and no scope is defined then no passive scan alerts are raised.
Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
---
2-
# This page was generated from the add-on.
32
title: Automation Framework - passiveScan-wait Job
4-
type: userguide
5-
weight: 7
3+
layout: redirect
4+
redirect: /docs/desktop/addons/passive-scanner/job-pscanwait/
65
---
7-
8-
# Automation Framework - passiveScan-wait Job
9-
10-
This job waits for the passive scanner to finishing scanning the requests and responses in the current queue. You should typically run this job after the jobs that explore you application, such as the spider jobs or those that import API definitions. If any more requests are sent by ZAP or proxied through ZAP after this job has run then they will be processed by the passive scanner. You can run this job as many times as you need to.
11-
12-
It is covered in the video: [ZAP Chat 12 Automation Framework Part 6 - Delays and Active Scan](https://youtu.be/hcftgjz_Vgc).
13-
14-
## YAML
15-
16-
```
17-
- type: passiveScan-wait # Passive scan wait for the passive scanner to finish
18-
parameters:
19-
maxDuration: 5 # Int: The max time to wait for the passive scanner, default: 0 unlimited
20-
```
21-
22-
## Job Data
23-
24-
The following class will be made available to add-ons that provide access to the Job Data such as the Reporting add-on. Note that in this case the data is from the currently enabled Passive Scan rules, regardless of whether they have been used as a result of the Automation Framework, the UI, or the API.
25-
26-
* Key: `passiveScanData`
27-
* Class: [PassiveScanJobResultData](https://github.com/zaproxy/zap-extensions/blob/main/addOns/automation/src/main/java/org/zaproxy/addon/automation/jobs/PassiveScanJobResultData.java)

0 commit comments

Comments
 (0)