JFrog GitHub
Following is a sample code segment that can be configured in your configuration file to perform a SAST scan.
Note: Make sure to update the parameters in the sample code according to your environment before using it.
name: sast on: push: branches: - main jobs: run-container: runs-on:ubuntu-latest steps: -name:Checkout code uses:actions/checkout@v2 -name:Setup JFrog CLI uses:jfrog/setup-jfrog-cli@v3 env: JF_UR:${{ secrets.JF_URL }} JF_ACCESS_TOKEN:${{ secrets.JF_ACCESS_TOKEN }} -name: Run Docker Container run:| env_file=`mktemp` env | grep -E "JFROG_CLI_BUILD_NUMBER" > $env_file docker run --pull always --rm --mount type=bind,source="$(pwd)",target=/scan registry.fortidevsec.forticloud.com/fdevsec_sast:latest rm $env_file
Following is a sample code segment that can be configured in configuration file to perform a DAST scan.
name: dast on: push: branches: - main jobs: run-container: runs-on:ubuntu-latest steps: -name:Checkout code uses:actions/checkout@v2 -name:Setup JFrog CLI uses:jfrog/setup-jfrog-cli@v3 env: JF_UR:${{ secrets.JF_URL }} JF_ACCESS_TOKEN:${{ secrets.JF_ACCESS_TOKEN }} -name: Run Docker Container run:| env_file=`mktemp` env | grep -E "JFROG_CLI_BUILD_NUMBER" > $env_file docker run --pull always --rm --mount type=bind,source="$(pwd)",target=/scan registry.fortidevsec.forticloud.com/fdevsec_dast:latest rm $env_file