Run the following command line by setting your parameters.
vsp_defense scan --lang=php --api-key=<YOUR_API_KEY> --path=/d/temp/php-helloworld-app --project-name="my-php-project"
image: "php:7.3"
before_script:
# Install composer
- apt-get update
- apt-get install zip unzip
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php composer-setup.php
- php -r "unlink('composer-setup.php');"
- php composer.phar install
stages:
- Test
run_scan:
stage: Test
script:
- composer install
- curl https://raw.githubusercontent.com/CloudDefenseAI/cd/master/latest/cd-latest-linux-x64.tar.gz > /tmp/cd-latest-linux-x64.tar.gz && tar -C /usr/local/bin -xzf /tmp/cd-latest-linux-x64.tar.gz && chmod +x /usr/local/bin/cdefense
- vsp_defense scan --lang=php --project-name=php-sample-project --api-key= <YOUR_API_KEY> --path=. --verbose
- echo $?