CircleCI

Prerequisites

Instructions for SCA scans

    Create a folder called .circleci in your git project with a file called config.yml.
    Copy the following and use it in the above build step by replacing
      lang - java | python | node | PHP | go | rust | dotnet
      api-key - your API key
      project-name - your project name
Linux
1
version: 2.1
2
​
3
orbs:
4
python: circleci/[email protected]
5
​
6
jobs:
7
build-and-scan:
8
executor: python/default
9
steps:
10
- checkout
11
- python/load-cache
12
- python/install-deps
13
- python/save-cache
14
- run:
15
command: pip install -r requirements.txt
16
name: Install Requirements
17
- run:
18
command: curl https://raw.githubusercontent.com/CloudDefenseAI/cd/master/latest/cd-latest-linux-x64.tar.gz > /tmp/cd-latest-linux-x64.tar.gz
19
name: Install CLI Tool
20
- run: tar -C /tmp -xzf /tmp/cd-latest-linux-x64.tar.gz
21
- run: chmod +x /tmp/cdefense
22
- run:
23
command: /tmp/cdefense scan --lang=python --project-name=python-sample-circleci-pipeline --api-key=<API_KEY> --path=requirements.txt
24
name: Run Scan
25
​
26
workflows:
27
main:
28
jobs:
29
- build-and-scan
Copied!
Failed Build:
Successful Build:
​
Last modified 1mo ago