Skip to content

Commit

Permalink
ci(security): Set up code scanning (#1882)
Browse files Browse the repository at this point in the history
* Set up code scanning

This sets up CodeQL to automatically detect possible security problems.

* Add more queries
  • Loading branch information
AaronDewes committed Nov 12, 2023
1 parent 0251f68 commit 4100b25
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yml
@@ -0,0 +1,40 @@
name: "CodeQL"

on:
push:
branches: [ "master", "*.x", "beta", "next" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master", "beta" ]
schedule:
- cron: '24 7 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

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

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: security-and-quality

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

0 comments on commit 4100b25

Please sign in to comment.