44#
55# The following task parameter must be defined
66# - ReleaseId
7+ #
8+ # The following pipeline variables must be defined:
9+ # - FOD_URL
10+ # - FOD_CLIENT_ID
11+ # - FOD_CLIENT_SECRET
12+ # - FOD_RELEASE
13+ # - FOD_PARENT_RELEASE
14+ # - FOD_DEFAULT_OWNER
715
816trigger :
917- main
1220 vmImage : ubuntu-latest
1321
1422steps :
23+ - checkout : self
24+ persistCredentials : " true"
25+ clean : " true"
1526- task : Maven@3
1627 inputs :
1728 mavenPomFile : ' pom.xml'
@@ -24,16 +35,51 @@ steps:
2435 mavenAuthenticateFeed : false
2536 effectivePomSkip : false
2637 sonarQubeRunAnalysis : false
27- - task : FortifyOnDemandStatic@8
38+ # - task: FortifyOnDemandStatic@8
39+ # inputs:
40+ # FortifyProjects: '$(Build.Repository.LocalPath)'
41+ # FodConnection: 'FoD_AMS' # create Azure DevOps Service connection with name FoD_AMS
42+ # ReleaseOptions: '0'
43+ # ReleaseId: 00000 # update FoD RELEASE ID
44+ # EntitlementSelection: '1'
45+ # EntitlementPreference: '2'
46+ # OverrideScanSettings: '2'
47+ # InProgressScanActionType: '0'
48+ # RemediationScanPreference: '2'
49+ # BuildType: 'mvn'
50+ # PolicyFailAction: '0'
51+ - task : Bash@3
52+ displayName : ' Install Fortify CLI via @fortify/setup'
53+ inputs :
54+ targetType : ' inline'
55+ script : |
56+ npx @fortify/setup bootstrap-config
57+ npx @fortify/setup env init --tools=fcli:auto,sc-client:auto
58+ npx @fortify/setup env ado
59+ - task : Bash@3
60+ displayName : ' Run FoD CI Scan'
2861 inputs :
29- FortifyProjects : ' $(Build.Repository.LocalPath)'
30- FodConnection : ' FoD_AMS' # create Azure DevOps Service connection with name FoD_AMS
31- ReleaseOptions : ' 0'
32- ReleaseId : 00000 # update FoD RELEASE ID
33- EntitlementSelection : ' 1'
34- EntitlementPreference : ' 2'
35- OverrideScanSettings : ' 2'
36- InProgressScanActionType : ' 0'
37- RemediationScanPreference : ' 2'
38- BuildType : ' mvn'
39- PolicyFailAction : ' 0'
62+ targetType : ' inline'
63+ script : |
64+ set -euo pipefail
65+ echo "Running FoD CI Scan for release: ${FOD_RELEASE:-}"
66+ fcli action run ci
67+ env :
68+ FOD_URL : $(FOD_URL)
69+ FOD_CLIENT_ID : $(FOD_CLIENT_ID)
70+ FOD_CLIENT_SECRET : $(FOD_CLIENT_SECRET)
71+ FOD_RELEASE : " $(FOD_RELEASE)"
72+ COPY_FROM_RELEASE : " $(FOD_PARENT_RELEASE)"
73+ SAST_ASSESSMENT_TYPE : " Static Assessment"
74+ SETUP_EXTRA_OPTS : ' --sdlc-status Development --app-owner "$(FOD_DEFAULT_OWNER)"'
75+ # PACKAGE_EXTRA_OPTS: ""
76+ DO_SETUP : true
77+ DO_SAST_SCAN : true
78+ DO_AVIATOR_AUDIT : true
79+ DO_SCA_SCAN : true
80+ DO_WAIT : true
81+ SAST_WAIT_EXTRA_OPTS : --timeout 2h
82+ DO_POLICY_CHECK : true
83+ DO_JOB_SUMMARY : true
84+ DO_PR_COMMENT : true
85+ DO_EXPORT : true
0 commit comments