Skip to content

Commit cf4f377

Browse files
authored
Enable credscan and bandit static analysis tool (microsoft#13082)
* Adding some static analysis * Adjust version for scanning * Pull static analysis into its own pipelines file * Add Cred scan support. * Add bandit to scan pythonFiles
1 parent 63a659d commit cf4f377

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

build/ci/vscode-python-ci-static-analysis.yaml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CI build (PR merge)
22

3-
name: '$(Year:yyyy).$(Month).0.$(BuildID)-ci-static-analysis'
3+
name: 'VSCode-Python-ci-static-analysis'
44

55
# Notes: Only trigger a commit for master and release, and skip build/rebuild
66
# on changes in the news and .vscode folders.
@@ -19,15 +19,6 @@ jobs:
1919
vmImage: 'windows-latest'
2020

2121
steps:
22-
- task: APIScan@2
23-
inputs:
24-
softwareFolder: '$(Build.SourcesDirectory)/src'
25-
softwareName: 'ms-python.python'
26-
softwareVersionNum: '$(Build.SourceBranchName)'
27-
softwareBuildNum: '$(Build.BuildId)'
28-
symbolsFolder: 'SRV*http://symweb'
29-
continueOnError: true
30-
3122
- task: PoliCheck@1
3223
inputs:
3324
inputType: 'Basic'
@@ -76,3 +67,20 @@ jobs:
7667
timeout: '1800'
7768
ram: '16384'
7869
addProjectDirToScanningExclusionList: true
70+
71+
- task: CredScan@3
72+
inputs:
73+
outputFormat: 'csv'
74+
75+
- task: UsePythonVersion@0
76+
inputs:
77+
versionSpec: '3.x'
78+
addToPath: true
79+
architecture: 'x64'
80+
81+
- task: CmdLine@2
82+
inputs:
83+
script: |
84+
python -m pip install -U pip
85+
python -m pip install bandit
86+
python -m bandit -r "$(Build.SourcesDirectory)\pythonFiles"

0 commit comments

Comments
 (0)