-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
73 lines (62 loc) · 1.89 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- none
pr:
- none
pool:
vmImage: ubuntu-latest
variables:
syft_version: 'v0.83.1'
steps:
- task: CmdLine@2
displayName: 'download scaresolver'
inputs:
script: |
wget https://sca-downloads.s3.amazonaws.com/cli/latest/ScaResolver-linux64.tar.gz
tar -xzvf ScaResolver-linux64.tar.gz
rm -rf ScaResolver-linux64.tar.gz
- task: CmdLine@2
displayName: 'echo path'
inputs:
script: |
echo $PATH
- task: CmdLine@2
displayName: 'install syft'
inputs:
script: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b . $(syft_version)
- task: CmdLine@2
displayName: 'list all files'
inputs:
script: |
ls -al
- task: CmdLine@2
displayName: 'show syft & ScaResolver version'
inputs:
script: |
./syft version
./ScaResolver --version
- task: CmdLine@2
displayName: 'use bash show syft version'
inputs:
script: |
bash -c './syft version'
- task: CmdLine@2
displayName: 'set path'
inputs:
script: |
echo "##vso[task.setvariable variable=PATH]${PATH}:$(System.DefaultWorkingDirectory)"
- task: Checkmarx AST@2
inputs:
CheckmarxService: 'CxOne'
projectName: '$(Build.Repository.Name)'
branchName: '$(Build.SourceBranchName)'
tenantName: 'dp_wp_account'
additionalParams: '--debug --report-format summaryHTML --scan-types sca --sca-resolver ./ScaResolver --sca-resolver-params "--ignore-dev-dependencies true --scan-containers --images manuelbcd/vulnapp:latest,debian:10 --log-level Debug --containers-result-path .cxsca-container-results.json"'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '.cxsca-container-results.json'
artifactName: Container_results