<< PREVIOUS NEXT >>

 

 

PYTHON

 

PREREQUISITES

  1. Install CLI

  2. Python version 3.5 or higher

  3. pip installed

  4. All project dependencies installed

    1. pip install -r requirements.txt

       

       

COMMAND-LINE

 

Run the following from the command line. Recommended to provide project-name else it will be picked up from your maven project's pom.xml.

 

vsp_defense scan --lang=python --api-key=<YOUR_API_KEY>  --path=/d/temp/vulpy --project-name="my-python-project"

 

 

 

GITLAB INTEGRATION

 

 

image: "python:3.7"

 

before_script:

- python --version

- pip install -r requirements.txt

stages:

  - Test

pytest:

  stage: Test

  script:

  - 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 --lang=python --project-name=python-sample-project --api-key=<YOUR_API_KEY> --path=requirements.txt

    - echo $?

 

 

 

 

 

 

 

 

 

 

 

 

<< PREVIOUS NEXT >>