|
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). |
0 commit comments