Skip to content

Commit

Permalink
Add a pipeline for compliance (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn authored Aug 6, 2021
1 parent e869741 commit 2b723b0
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gdn/.gdntsa
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"codebaseName": "onnxruntime_inference_examples_main"}
50 changes: 50 additions & 0 deletions ci_build/azure_pipelines/compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
jobs:

- job: compliance
pool:
vmImage: "windows-2019"
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.8.x'
inputs:
versionSpec: 3.8.x

- powershell: |
python -m pip --disable-pip-version-check install -r $(Build.SourcesDirectory)\mobile\examples\speech_recognition\model\requirements.txt
displayName: 'Install python packages'
- task: PoliCheck@2
displayName: 'Run Global Readiness Check tool'
inputs:
targetType: F
result: PoliCheck.xml
optionsUEPATH: '$(Build.SourcesDirectory)\ci_build\policheck_exclusions.xml'


- task: Semmle@1
displayName: 'Run CodeQL (Semmle) (python)'
inputs:
language: python

- task: SdtReport@2
displayName: 'Create Security Analysis Report'
inputs:
GdnExportAllTools: false
GdnExportGdnToolPoliCheck: true
GdnExportGdnToolSemmle: true

- task: PublishSecurityAnalysisLogs@3
displayName: 'Publish Guardian Artifacts'

- task: PostAnalysis@2
displayName: 'Guardian Break'
inputs:
GdnBreakGdnToolSDLNativeRulesSeverity: Warning

- task: TSAUpload@2
displayName: 'TSA upload'
condition: and (succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
GdnPublishTsaOnboard: false
GdnPublishTsaConfigFile: '$(Build.SourcesDirectory)\.gdn\.gdntsa'
4 changes: 4 additions & 0 deletions ci_build/policheck_exclusions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<PoliCheckExclusions>
<Exclusion Type="FileName">LABEL.CS|SYNSET.TXT</Exclusion>
</PoliCheckExclusions>

0 comments on commit 2b723b0

Please sign in to comment.