Add codeql scanning (#565)

Copied from the TS repo. I hope that the config file supports globs!
This commit is contained in:
Nathan Shively-Sanders
2022-11-10 06:39:15 -08:00
committed by GitHub
parent e65ca14ee8
commit f06c74840c
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
name : CodeQL Configuration
paths:
- './packages/*/src'

34
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
# copied from microsoft/TypeScript; see that file for boilerplate commentary
# (which was certainly copied from somewhere else)
name: "Code scanning - action"
on:
push:
pull_request:
schedule:
- cron: '0 19 * * 0'
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
if: github.repository == 'microsoft/DefinitelyTyped-tools'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql/codeql-configuration.yml
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2