• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

zaproxy/action-api-scan: A GitHub Action for running the OWASP ZAP API scan

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

zaproxy/action-api-scan

开源软件地址:

https://github.com/zaproxy/action-api-scan

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Action API Scan

A GitHub Action for running the OWASP ZAP API scan to perform Dynamic Application Security Testing (DAST).

WARNING this action will perform attacks on the target API. You should only scan targets that you have permission to test. You should also check with your hosting company and any other services such as CDNs that may be affected before running this action.

Inputs

target

Required target API definition, OpenAPI or SOAP, local file or URL, e.g. https://www.example.com/openapi.json or target endpoint URL, GraphQL, e.g. https://www.example.com/graphql

format

Optional The format of the defintion, openapi, soap, or graphql. Default is openapi.

docker_name

Optional The name of the Docker image to be executed. By default the action runs the stable version of ZAP. But you can configure the parameter to use the weekly builds.

rules_file_name

Optional You can also specify a relative path to the rules file to ignore any alerts from the ZAP scan. Make sure to create the rules file inside the relevant repository. The following shows a sample rules file configuration. Make sure to checkout the repository (actions/checkout@v2) to provide the ZAP rules to the scan action.

10011	IGNORE	(Cookie Without Secure Flag)
10015	IGNORE	(Incomplete or No Cache-control and Pragma HTTP Header Set)

cmd_options

Optional Additional command lines options for the scan script

allow_issue_writing

Optional By default the action will file the report to the GitHub issue using the issue_title input. Set this to false if you don't want the issue to be created or updated.

issue_title

Optional The title for the GitHub issue to be created.

token

Optional ZAP action uses the default action token provided by GitHub to create and update the issue for the api scan. You do not have to create a dedicated token. Make sure to use the GitHub's default action token when running the action(secrets.GITHUB_TOKEN).

fail_action

Optional By default ZAP Docker container will fail with an exit code, if it identifies any alerts. Set this option to true if you want to fail the status of the GitHub Scan if ZAP identifies any alerts during the scan.

Example usage

** Basic **

steps:
  - name: ZAP Scan
    uses: zaproxy/[email protected]
    with:
      target: 'https://www.zaproxy.org/'

** Advanced **

on: [push]

jobs:
  zap_scan:
    runs-on: ubuntu-latest
    name: Scan the webapplication
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: master

      - name: ZAP Scan
        uses: zaproxy/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          docker_name: 'owasp/zap2docker-stable'
          format: openapi
          target: 'https://www.zaproxy.org/'
          rules_file_name: '.zap/rules.tsv'
          cmd_options: '-a'



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Sponsor @pszklarska on GitHub Sponsors · GitHub发布时间:2022-06-11
下一篇:
pszklarska/flutter_github: A sample Flutter project using GitHub API发布时间:2022-06-11
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap