Skip to content

Commit

Permalink
CONFIG: Add CodeQL scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
adamayoung committed Jan 22, 2024
1 parent 4fab393 commit 87871a7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
paths:
- Sources
- Tests
44 changes: 44 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "CodeQL"

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# Every Sunday at 12am
- cron: '0 0 * * 0'
workflow_dispatch:

concurrency:
group: "codeql-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: swift
config-file: ./.github/codeql/codeql-config.yml

- name: Build
run: swift build --arch arm64 --build-tests

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:swift"

0 comments on commit 87871a7

Please sign in to comment.