Skip to content

Merge pull request #1967 from SMI/dependabot/maven/src/common/com.smi… #1793

Merge pull request #1967 from SMI/dependabot/maven/src/common/com.smi…

Merge pull request #1967 from SMI/dependabot/maven/src/common/com.smi… #1793

Workflow file for this run

---
name: "CodeQL"
on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "0 5 * * *"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["csharp", "java", "python"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Build Python
if: ${{ matrix.language == 'python' }}
uses: github/codeql-action/autobuild@v3
- name: Build .Net
if: ${{ matrix.language == 'csharp' }}
run: dotnet build -c Release
- name: Build java
if: ${{ matrix.language == 'java' }}
# NOTE(rkm 2023-03-21) Ensure test code is detected but don't actually run anything
run: ./bin/ctp/test.py --install-libs -DskipTests
- name: SecurityCodescan
if: ${{ matrix.language == 'csharp' }}
run: |
dotnet tool install --global security-scan
mkdir -p sarif-results
security-scan SmiServices.sln -n -x sarif-results/scs.sarif
sed -i 's/"language": ""/"language": "en-US"/' sarif-results/scs.sarif
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
upload: False
output: sarif-results
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results