Fortinet white logo
Fortinet white logo

CircleCI

CircleCI

Following is a sample code segment that can be configured in circleci/config.yml file to perform a SAST scan. Refer to the Orb Registry page to use the latest version.

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

version: 2.1
jobs:
    SAST:
        machine: yes
        steps:
          - checkout
          - run: |
               env | grep -E "CIRCLECI|CIRCLE_BUILD_NUM|CIRCLE_BRANCH|CIRCLE_SHA1" > /tmp/env
               docker run --pull always --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_sast:latest
workflows:
    Scans:
        jobs:
          - SAST

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

version: 2.1
jobs:
    DAST:
        machine: yes
        steps:
          - checkout
          - run: |
               env | grep -E "CIRCLECI|CIRCLE_BUILD_NUM|CIRCLE_BRANCH|CIRCLE_SHA1" > /tmp/env
               docker run --pull always --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_dast:latest
workflows:
    Scans:
        jobs:
          - DAST

CircleCI

CircleCI

Following is a sample code segment that can be configured in circleci/config.yml file to perform a SAST scan. Refer to the Orb Registry page to use the latest version.

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

version: 2.1
jobs:
    SAST:
        machine: yes
        steps:
          - checkout
          - run: |
               env | grep -E "CIRCLECI|CIRCLE_BUILD_NUM|CIRCLE_BRANCH|CIRCLE_SHA1" > /tmp/env
               docker run --pull always --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_sast:latest
workflows:
    Scans:
        jobs:
          - SAST

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

version: 2.1
jobs:
    DAST:
        machine: yes
        steps:
          - checkout
          - run: |
               env | grep -E "CIRCLECI|CIRCLE_BUILD_NUM|CIRCLE_BRANCH|CIRCLE_SHA1" > /tmp/env
               docker run --pull always --rm --env-file /tmp/env --mount type=bind,source=$PWD,target=/scan registry.fortidevsec.forticloud.com/fdevsec_dast:latest
workflows:
    Scans:
        jobs:
          - DAST