Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CodeQL Scanning #22

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "CodeQL Scan"

on:
workflow_dispatch:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
branches:
- main
- features/automatic-update
push:
branches:
- main
- features/automatic-update
#Twice a month at 5:00 AM too.
schedule:
- cron: '0 5 1,15 * *'

jobs:
analyze:
name: Analyze
runs-on: [ 'macos-latest' ]
timeout-minutes: 120
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'swift'
queries: security-extended,security-and-quality

#Building manually, since Autobuild can't figure this one out...
- name: Create Xcode project
run: swift package generate-xcodeproj

- name: Build Xcode project
run: xcodebuild -sdk iphonesimulator

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