Skip to content

Commit

Permalink
Add CodeQL (#1143)
Browse files Browse the repository at this point in the history
* Add CodeQL
- Add a workflow to run CodeQL.
- Add setup-node to build.
  • Loading branch information
martincostello committed Jul 21, 2024
1 parent 51b19f5 commit 4a130b8
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Build, Test and Publish
shell: pwsh
run: ./build.ps1
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/code-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: code-scan

on:
push:
branches: [ main ]
pull_request:
branches:
- main
- dotnet-vnext
- dotnet-nightly
schedule:
- cron: '0 6 * * 1'

permissions:
actions: read
contents: read

jobs:
code-ql:

runs-on: ubuntu-latest

permissions:
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp', 'javascript' ]

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

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality
config: |
name: 'dotnet-minimal-api-integration-testing CodeQL configuration'
paths-ignore:
- 'src/TodoApp/wwwroot/swagger-ui'
- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{ matrix.language }}'

0 comments on commit 4a130b8

Please sign in to comment.