Skip to content

Commit

Permalink
Enable CodeQL in this repo (#538)
Browse files Browse the repository at this point in the history
Cherry-pick 6404c3b.
  • Loading branch information
damonbarry authored Jul 17, 2023
1 parent 67fa660 commit cfdbac7
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "CodeQL"

on:
push:
branches: [ "main", "release/1.*" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main", "release/1.*" ]
schedule:
- cron: '34 19 * * 4'

jobs:
analyze:
name: Analyze
runs-on: 'ubuntu-latest'
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- run: |
sudo ARCH=amd64 bash -c '. ci/install-build-deps.sh'
rm -r third-party/tpm2-tss
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
File renamed without changes.
2 changes: 1 addition & 1 deletion ci/e2e-tests/helper-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ setupCustomAllocationPolicy() {
func new --name "$dps_allocation_function_name" --template "HTTP trigger" --authlevel "anonymous" --language C# --force

# Copy source code into function app project
cp "$GITHUB_WORKSPACE/ci/e2e-tests/DpsCustomAllocation.cs" .
cp "$GITHUB_WORKSPACE/ci/e2e-tests/DpsCustomAllocation.csfunc" ./DpsCustomAllocation.cs

# Add build deps
dotnet add package Microsoft.Azure.Devices.Provisioning.Service -v 1.16.3
Expand Down

0 comments on commit cfdbac7

Please sign in to comment.