Skip to content
Open
Show file tree
Hide file tree
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
99 changes: 99 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# SPDX-FileCopyrightText: Estonian Information System Authority
# SPDX-License-Identifier: LGPL-2.1-or-later

name: CodeQL
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 3 * * 1" # Weekly

jobs:
swift:
name: CodeQL (swift)
if: contains(github.repository, 'open-eid/nfc-iOS-lib')
runs-on: macos-26
timeout-minutes: 120
permissions:
contents: read
actions: read
security-events: write
concurrency:
group: codeql-swift-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
strategy:
matrix:
xcode:
- 26.6
platform:
- iOS
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup environment
run: |
export LANG=en_US.UTF-8

sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Resolve package dependencies
run: |
cd ${{ github.workspace }}

rm -rf "${{ runner.temp }}/codeql-build"
rm -rf ${{ github.workspace }}/.build

swift package resolve \
--scratch-path "${{ runner.temp }}/codeql-build"
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: swift
build-mode: manual
- name: Build
run: |
cd ${{ github.workspace }}

swift build \
--triple arm64-apple-ios18.0 \
--sdk "$(xcrun --sdk iphoneos --show-sdk-path)" \
--scratch-path "${{ runner.temp }}/codeql-build"
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4
- name: Clean up
if: ${{ always() }}
run: |
rm -rf "${{ runner.temp }}/codeql-build"
rm -rf ${{ github.workspace }}/.build

scripts:
name: CodeQL (${{ matrix.language }})
if: contains(github.repository, 'open-eid/nfc-iOS-lib')
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
actions: read
security-events: write
concurrency:
group: codeql-${{ matrix.language }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
language:
- actions
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
2 changes: 2 additions & 0 deletions .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

name: Copyright headers
on: [push, pull_request]
permissions:
contents: read
jobs:
copyright:
name: Check copyright headers
Expand Down
Loading