-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
75 lines (68 loc) · 2.13 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
74
75
# Node
trigger:
- master
pool:
vmImage: ubuntu-latest
variables:
veracodeAppProfile: AzDevOps.$(Build.DefinitionName)
caminhoPacote: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
steps:
- task: CmdLine@2
inputs:
script: 'npm install'
displayName: 'NPM'
- 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
displayName: 'Veracode PipelineScan'
continueOnError: true
- 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
displayName: 'Veracode SCA'
continueOnError: true
- task: Veracode@3
inputs:
ConnectionDetailsSelection: 'Credentials'
apiId: '$(APIID)'
apiKey: '$(APIKEY)'
veracodeAppProfile: '$(veracodeAppProfile)'
version: '$(build.buildNumber)'
filepath: '$(caminhoPacote)'
createSandBox: false
createProfile: true
failTheBuildIfVeracodeScanDidNotInitiate: false
scanStatusCheckInterval: '60'
importResults: true
failBuildOnPolicyFail: false
displayName: 'Veracode SAST'
- task: Veracode Flaw Importer@3
inputs:
ConnectionDetailsSelection: 'Credentials'
apiId: '$(APIID)'
apiKey: '$(APIKEY)'
veracodeAppProfile: '$(veracodeAppProfile)'
sandboxName:
importType: 'All Flaws'
workItemType: 'Issue'
area: '$(system.teamProject)'
addCustomTag: '$(build.buildNumber)'
flawImportLimit: '1000'
displayName: 'Veracode importando falhas'