Skip to content

Commit 96a2da9

Browse files
committed
Adding DAST to the description
1 parent 9735600 commit 96a2da9

File tree

5 files changed

+120
-30
lines changed

5 files changed

+120
-30
lines changed

README.md

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,91 @@
1-
# action-full-scan
2-
A GitHub Action for running the OWASP ZAP Full scan
1+
# ZAP Action Full Scan
2+
3+
A GitHub Action for running the OWASP ZAP [Full Scan](https://www.zaproxy.org/docs/docker/full-scan/) to perform
4+
Dynamic Application Security Testing (DAST).
5+
6+
The ZAP full scan action runs the ZAP spider against the specified target (by default with no time limit) followed by an
7+
optional ajax spider scan and then a full active scan before reporting the results. The alerts will be maintained as a
8+
GitHub issue in the corresponding repository.
9+
10+
## Inputs
11+
12+
### `target`
13+
14+
**Required** The URL of the web application to be scanned. This can be either a publicly available web application or a locally
15+
accessible URL.
16+
17+
### `docker_name`
18+
19+
**Optional** The name of the docker file to be executed. By default the action runs the stable version of ZAP. But you can
20+
configure the parameter to use the weekly builds.
21+
22+
### `rules_file_name`
23+
24+
**Optional** You can also specify a relative path to the rules file to ignore any alerts from the ZAP scan. Make sure to create
25+
the rules file inside the relevant repository. The following shows a sample rules file configuration.
26+
Make sure to checkout the repository (actions/checkout@v2) to provide the ZAP rules to the scan action.
27+
28+
```tsv
29+
10011 IGNORE (Cookie Without Secure Flag)
30+
10015 IGNORE (Incomplete or No Cache-control and Pragma HTTP Header Set)
31+
```
32+
33+
### `cmd_options`
34+
35+
**Optional** Additional command lines options for the full scan script
36+
37+
### `issue_title`
38+
39+
**Optional** The title for the GitHub issue to be created.
40+
41+
### `token`
42+
43+
**Optional** ZAP action uses the default action token provided by GitHub to create and update the issue for the full scan.
44+
You do not have to create a dedicated token. Make sure to use the GitHub's default action token when running the action(`secrets.GIT_TOKEN`).
45+
46+
## Example usage
47+
48+
** Basic **
49+
```
50+
steps:
51+
- name: ZAP Scan
52+
uses: zaproxy/action-full-scan@v0.1.0
53+
with:
54+
target: 'https://www.zaproxy.org/'
55+
```
56+
57+
** Advanced **
58+
59+
```
60+
on: [push]
61+
62+
jobs:
63+
zap_scan:
64+
runs-on: ubuntu-latest
65+
name: Scan the webapplication
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v2
69+
with:
70+
ref: master
71+
- name: ZAP Scan
72+
uses: zaproxy/action-full-scan@v0.1.0
73+
with:
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
docker_name: 'owasp/zap2docker-stable'
76+
target: 'https://www.zaproxy.org/'
77+
rules_file_name: '.zap/rules.tsv'
78+
cmd_options: '-a'
79+
```
80+
81+
## Localised Alert Details
82+
83+
ZAP is internationalised and alert information is available in many languages.
84+
85+
You can change the language used by this action by changing the locale via the `cmd_options` e.g.: `-z "-config view.locale=fr_FR"`
86+
87+
This is currently only available with the `owasp/zap2docker-weekly` or `owasp/zap2docker-live` Docker images.
88+
89+
See [https://github.com/zaproxy/zaproxy/tree/develop/zap/src/main/dist/lang](https://github.com/zaproxy/zaproxy/tree/develop/zap/src/main/dist/lang) for the full set of locales currently supported.
90+
91+
You can help improve ZAP translations via [https://crowdin.com/project/owasp-zap](https://crowdin.com/project/owasp-zap).

action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: 'OWASP ZAP Full Scan'
2-
description: 'Scans the web application with the OWASP ZAP Baseline Scan'
2+
description: 'Scans the web application with the OWASP ZAP Full Scan'
33
branding:
44
icon: 'zap'
55
color: 'blue'
66
inputs:
77
token:
88
description: 'GitHub Token to create issues in the repository'
9-
required: true
9+
required: false
10+
default: ${{ github.token }}
1011
target:
1112
description: 'Target URL'
1213
required: true
@@ -21,9 +22,9 @@ inputs:
2122
description: 'Additional command line options'
2223
required: false
2324
issue_title:
24-
description: 'The title for the GitHub issue that is created'
25+
description: 'The title for the GitHub issue to be created'
2526
required: false
26-
default: 'ZAP Scan Baseline Report'
27+
default: 'ZAP Full Scan Report'
2728
runs:
2829
using: 'node12'
2930
main: 'dist/index.js'

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const core = require('@actions/core');
22
const exec = require('@actions/exec');
3-
const common = require('actions-common-scans');
3+
const common = require('@zaproxy/actions-common-scans');
44
const _ = require('lodash');
55

66
// Default file names
@@ -39,7 +39,7 @@ async function run() {
3939
try {
4040
await exec.exec(command);
4141
} catch (err) {
42-
core.setFailed('The ZAP Baseline scan has failed, starting to analyze the alerts. err: ' + err.toString());
42+
core.setFailed('The ZAP full scan has failed, starting to analyze the alerts. err: ' + err.toString());
4343
}
4444
await common.main.processReport(token, workspace, plugins, currentRunnerID, issueTitle, repoName);
4545
} catch (error) {

package-lock.json

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "action-baseline-scan",
2+
"name": "action-full-scan",
33
"version": "1.0.0",
4-
"description": "ZAP baseline scan action",
4+
"description": "ZAP full scan action",
55
"main": "index.js",
66
"scripts": {
77
"lint": "eslint index.js",
@@ -10,7 +10,7 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/zaproxy/action-baseline.git"
13+
"url": "git+https://github.com/zaproxy/action-full-scan.git"
1414
},
1515
"keywords": [
1616
"GitHub",
@@ -20,7 +20,7 @@
2020
],
2121
"author": "ZAP Team",
2222
"bugs": {
23-
"url": "https://github.com/zaproxy/action-baseline/issues"
23+
"url": "https://github.com/zaproxy/action-full-scan/issues"
2424
},
2525
"dependencies": {
2626
"@actions/artifact": "^0.2.0",

0 commit comments

Comments
 (0)