|
@@ -1,27 +1,48 @@
|
|
|
-# Starter pipeline
|
|
|
-# Start with a minimal pipeline that you can customize to build and deploy your code.
|
|
|
-# Add steps that build, run tests, deploy, and more:
|
|
|
-# https://aka.ms/yaml
|
|
|
+name: "Code scanning - action"
|
|
|
|
|
|
-trigger:
|
|
|
-- master
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ branches:
|
|
|
+ - master
|
|
|
+
|
|
|
|
|
|
-pool:
|
|
|
- vmImage: windows-latest
|
|
|
+jobs:
|
|
|
+ CodeQL-Build:
|
|
|
|
|
|
-steps:
|
|
|
-- task: AdvancedSecurity-Codeql-Init@1
|
|
|
- inputs:
|
|
|
- languages: 'csharp'
|
|
|
+ runs-on: windows-latest
|
|
|
|
|
|
-- task: AdvancedSecurity-Codeql-Autobuild@1
|
|
|
-- script: echo Hello, world!
|
|
|
- displayName: 'Run a one-line script'
|
|
|
+ permissions:
|
|
|
+ contents: read
|
|
|
+ security-events: write
|
|
|
+ pull-requests: read
|
|
|
|
|
|
-- script: |
|
|
|
- echo Add other tasks to build, test, and deploy your project.
|
|
|
- echo See https://aka.ms/yaml
|
|
|
- displayName: 'Run a multi-line script'
|
|
|
+ steps:
|
|
|
+ - name: Setup dotnet
|
|
|
+ uses: actions/setup-dotnet@v3
|
|
|
+ with:
|
|
|
+ dotnet-version: 4.7.1
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ # Initializes the CodeQL tools for scanning.
|
|
|
+ - name: Initialize CodeQL
|
|
|
+ uses: AdvancedSecurity-Codeql-Init@1
|
|
|
+ # Override language selection by uncommenting this and choosing your languages
|
|
|
+ inputs:
|
|
|
+ languages: 'csharp'
|
|
|
+
|
|
|
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
|
+ # If this step fails, then you should remove it and run the build manually (see below)
|
|
|
+ name: Autobuild
|
|
|
+ uses: AdvancedSecurity-Codeql-Autobuild@1
|
|
|
+
|
|
|
+ # ℹ️ Command-line programs to run using the OS shell.
|
|
|
+ # 📚 https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
|
+
|
|
|
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
|
+ # and modify them (or add more) to build your code if your project
|
|
|
+ # uses a compiled language
|
|
|
+
|
|
|
+
|
|
|
- task: AdvancedSecurity-Dependency-Scanning@1
|
|
|
- task: AdvancedSecurity-Codeql-Analyze@1
|