Skip to content

Commit

Permalink
ci: Add CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Dec 5, 2022
1 parent ee0d826 commit 0045c11
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/actions/do-codeql/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
inputs:
language:
description: Language to scan
required: true
description: Do a CodeQL scan
name: CodeQL
runs:
using: composite
steps:
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ inputs.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ inputs.language }}"
38 changes: 38 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CodeQL

on:
push:
branches:
- master
pull_request:
branches:
- master
paths:
- ".github/workflows/codeql.yml"
- "**.ts"
- "**.js"
- "**.mts"
- "**.mjs"
- "**.tsx"
- "**.jsx"
- "**.json"
schedule:
- cron: "2 11 * * 0"

jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

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

- name: Run
uses: ./.github/actions/do-codeql
with:
language: javascript

0 comments on commit 0045c11

Please sign in to comment.