CI/CD Tools
FortiDAST Proxy server supports scanning in the Jenkins, GitLab, and GitHub Actions CI/CD tools.
Jenkins
Paste this code segment in Jenkins > (Your App) > Configure > Add build step > Execute Shell.
export EMAIL=account_email LICENSE_SERIAL=your_serial_number ASSET_TOKEN=your_asset_token SCANURL=target_asset_url SCANTYPE=1 ASSET=asset_UUID
env | grep -E "EMAIL|LICENSE_SERIAL|ASSET_TOKEN|SCANURL|SCANTYPE|ASSET" > /tmp/env
docker pull registry.fortidast.forticloud.com/dastdevopsproxy:latest
docker run --rm --env-file /tmp/env --network=host registry.fortidast.forticloud.com/dastdevopsproxy:latest
GitLab CI
Paste this code segment in the gitlab-ci.yml file.
tags:
- fptproxyserver
variables:
EMAIL: "account_email"
LICENSE_SERIAL: "your_serial_number"
ASSET_TOKEN: "your_asset_token"
SCANURL: "target_asset_url"
SCANTYPE: "1"
ASSET: "asset_UUID"
image: registry.fortidast.forticloud.com/dastdevopsproxy:latest
script:
- cd /home/fortinet/
- python3 proxyScan.py
GitHub Actions
Paste this code segment in the main.yml file.
name: FortiDAST Proxy Server
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: FPT_PROXY_SERVER
run: |
export EMAIL=account_email LICENSE_SERIAL=your_serial_number ASSET_TOKEN=your_asset_token SCANURL=target_asset_url SCANTYPE=1 ASSET=asset_UUID
env | grep -E "EMAIL|LICENSE_SERIAL|ASSET_TOKEN|SCANURL|SCANTYPE|ASSET" > /tmp/env
docker pull registry.fortidast.forticloud.com/dastdevopsproxy:latest
docker run --rm --env-file /tmp/env --network=host registry.fortidast.forticloud.com/dastdevopsproxy:latest