Fortinet white logo
Fortinet white logo

Travis CI

Travis CI

Following is a sample code segment that can be configured in travis.yml file to perform a SAST scan.

Note: Make sure to update the parameters in the sample code according to your environment before using it.

language: python
python:
    - "3.6"
service:
    - docker
jobs:
    include:
        - stage: SAST
        before_install: docker pull registry.fortidevsec.forticloud.com/fdevsec_sast:latest
        script:
            env | grep -E "TRAVIS|TRAVIS_BUILD_ID|TRAVIS_BRANCH|TRAVIS_COMMIT" > /tmp/env
            docker run --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_sast:latest

Following is a sample code segment that can be configured in travis.yml file to perform a DAST scan.

language: python
python:
    - "3.6"
service:
    - docker
jobs:
    include:
        - stage: DAST
        before_install: docker pull registry.fortidevsec.forticloud.com/fdevsec_dast:latest
        script:
            env | grep -E "TRAVIS|TRAVIS_BUILD_ID|TRAVIS_BRANCH|TRAVIS_COMMIT" > /tmp/env
            docker run --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_dast:latest

Travis CI

Travis CI

Following is a sample code segment that can be configured in travis.yml file to perform a SAST scan.

Note: Make sure to update the parameters in the sample code according to your environment before using it.

language: python
python:
    - "3.6"
service:
    - docker
jobs:
    include:
        - stage: SAST
        before_install: docker pull registry.fortidevsec.forticloud.com/fdevsec_sast:latest
        script:
            env | grep -E "TRAVIS|TRAVIS_BUILD_ID|TRAVIS_BRANCH|TRAVIS_COMMIT" > /tmp/env
            docker run --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_sast:latest

Following is a sample code segment that can be configured in travis.yml file to perform a DAST scan.

language: python
python:
    - "3.6"
service:
    - docker
jobs:
    include:
        - stage: DAST
        before_install: docker pull registry.fortidevsec.forticloud.com/fdevsec_dast:latest
        script:
            env | grep -E "TRAVIS|TRAVIS_BUILD_ID|TRAVIS_BRANCH|TRAVIS_COMMIT" > /tmp/env
            docker run --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_dast:latest