-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVeracode-PipeValidacao.yml
63 lines (56 loc) · 1.78 KB
/
Veracode-PipeValidacao.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
# Node
trigger:
- master
pool:
vmImage: ubuntu-latest
variables:
- group: Veracode
stages:
- stage: SAST
displayName: SAST
jobs:
- job: PipelineScan
steps:
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Agent.BuildDirectory)'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(caminhoPacote)'
replaceExistingArchive: true
displayName: 'Criando pacote para analise'
- script: |
curl -O -L https://downloads.veracode.com/securityscan/pipeline-scan-LATEST.zip
displayName: 'Download Pipeline Scanner'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'pipeline-scan-LATEST.zip'
destinationFolder: '$(Build.ArtifactStagingDirectory)'
cleanDestinationFolder: false
- script: |
java -jar $(Build.ArtifactStagingDirectory)/pipeline-scan.jar -vid $(APIID) -vkey $(APIKEY) --file '$(caminhoPacote)' --issue_details true --summary_output true --summary_output_file "SAST-results.txt"
displayName: 'Veracode PipelineScan'
continueOnError: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'SAST-results.txt'
ArtifactName: 'Veracode'
publishLocation: 'Container'
- stage: SCA
displayName: SCA
dependsOn:
jobs:
- job: AgentBased
steps:
- task: CmdLine@2
inputs:
script: |
export SRCCLR_SCM_NAME=$(veracodeAppProfile)
curl -sSL https://download.sourceclear.com/ci.sh | bash -s – scan --update-advisor --allow-dirty >> SCA-results.txt
displayName: 'Veracode SCA'
continueOnError: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'SCA-results.txt'
ArtifactName: 'Veracode'
publishLocation: 'Container'