Skip to content

Commit

Permalink
Add PoliCheck to build definition (#1625)
Browse files Browse the repository at this point in the history
* Add PoliCheck to build definition

Same as microsoft/vscode-azurefunctions#2240

* Update Notice.html
  • Loading branch information
ejizba authored Jul 13, 2020
1 parent ea08973 commit a9aa79b
Show file tree
Hide file tree
Showing 4 changed files with 5,219 additions and 18,539 deletions.
10 changes: 10 additions & 0 deletions .azure-pipelines/compliance/PoliCheckExclusions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<PoliCheckExclusions>
<!--Each of these exclusions is a folder name -if \[name]\exists in the file path, it will be skipped -->
<Exclusion Type="FolderPathFull">NODE_MODULES</Exclusion>
<!--Each of these exclusions is a folder name -if any folder or file starts with "\[name]", it will be skipped -->
<!--<Exclusion Type="FolderPathStart">ABC|XYZ</Exclusion>-->
<!--Each of these file types will be completely skipped for the entire scan -->
<!--<Exclusion Type="FileType">.ABC|.XYZ</Exclusion>-->
<!--The specified file names will be skipped during the scan regardless which folder they are in -->
<!--<Exclusion Type="FileName">ABC.TXT|XYZ.CS</Exclusion>-->
</PoliCheckExclusions>
18 changes: 18 additions & 0 deletions .azure-pipelines/compliance/compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
displayName: 'Run PoliCheck'
inputs:
targetType: F # search files and folders
optionsUEPATH: '$(Build.SourcesDirectory)/.azure-pipelines/compliance/PoliCheckExclusions.xml'
continueOnError: true
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')

- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs'
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
displayName: 'Post Analysis'
inputs:
AllTools: true
condition: eq(variables['ENABLE_COMPLIANCE'], 'true')
2 changes: 2 additions & 0 deletions .azure-pipelines/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variables:
${{ if eq(variables['Build.Reason'], 'Schedule') }}:
ENABLE_LONG_RUNNING_TESTS: true
ENABLE_COMPLIANCE: true

jobs:
- job: Windows
Expand All @@ -9,6 +10,7 @@ jobs:
steps:
- template: common/build.yml
- template: common/lint.yml
- template: compliance/compliance.yml # Only works on Windows
- template: common/test.yml

- job: Linux
Expand Down
Loading

0 comments on commit a9aa79b

Please sign in to comment.