-
Notifications
You must be signed in to change notification settings - Fork 46
/
azure-pipelines.yml
36 lines (34 loc) · 1.18 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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'compile'
- script: |
docker run -e "WORKSPACE=https://github.com/ShiftLeftSecurity/tarpit-java/blob/$(Build.SourceVersion)" \
-e "REPOSITORY_URL=$(Build.Repository.Uri)" \
-e "COMMIT_SHA=$(Build.SourceVersion)" \
-e "GITHUB_TOKEN=$(GITHUB_TOKEN)" \
-e "BRANCH=$(Build.SourceBranch)" \
-v $(Build.SourcesDirectory):/app \
-v $(Build.ArtifactStagingDirectory):/reports \
shiftleft/sast-scan scan --src /app \
--out_dir /reports/CodeAnalysisLogs
displayName: "Perform ShiftLeft scan"
continueOnError: "true"
# To integrate with the ShiftLeft Scan Extension it is necessary to publish the CodeAnalysisLogs folder
# as an artifact with the same name
- task: PublishBuildArtifacts@1
displayName: "Publish analysis logs"
inputs:
PathtoPublish: "$(Build.ArtifactStagingDirectory)/CodeAnalysisLogs"
ArtifactName: "CodeAnalysisLogs"
publishLocation: "Container"