1*128bace5SEd Maste# Copyright (c) 2022 Yubico AB. All rights reserved.
2*128bace5SEd Maste# Use of this source code is governed by a BSD-style
3*128bace5SEd Maste# license that can be found in the LICENSE file.
4*128bace5SEd Maste# SPDX-License-Identifier: BSD-2-Clause
5*128bace5SEd Maste
6*128bace5SEd Mastename: "codeql"
7*128bace5SEd Maste
8*128bace5SEd Masteon:
9*128bace5SEd Maste  pull_request:
10*128bace5SEd Maste    branches:
11*128bace5SEd Maste    - main
12*128bace5SEd Maste  push:
13*128bace5SEd Maste    branches:
14*128bace5SEd Maste    - main
15*128bace5SEd Maste    - '*-ci'
16*128bace5SEd Maste  schedule:
17*128bace5SEd Maste    - cron: '0 0 * * 0'
18*128bace5SEd Maste
19*128bace5SEd Mastepermissions:
20*128bace5SEd Maste  security-events: write
21*128bace5SEd Maste
22*128bace5SEd Mastejobs:
23*128bace5SEd Maste  codeql-build:
24*128bace5SEd Maste    if: github.repository == 'Yubico/libfido2'
25*128bace5SEd Maste    runs-on: ubuntu-22.04
26*128bace5SEd Maste    steps:
27*128bace5SEd Maste    - name: checkout
28*128bace5SEd Maste      uses: actions/checkout@v4
29*128bace5SEd Maste      with:
30*128bace5SEd Maste        fetch-depth: 2
31*128bace5SEd Maste    - name: init codeql
32*128bace5SEd Maste      uses: github/codeql-action/init@v2
33*128bace5SEd Maste    - name: build
34*128bace5SEd Maste      env:
35*128bace5SEd Maste        CC: gcc
36*128bace5SEd Maste      run: |
37*128bace5SEd Maste        sudo apt -q update
38*128bace5SEd Maste        sudo apt install -q -y libcbor-dev libudev-dev libz-dev original-awk \
39*128bace5SEd Maste         libpcsclite-dev
40*128bace5SEd Maste        ./.actions/build-linux-gcc
41*128bace5SEd Maste    - name: perform codeql analysis
42*128bace5SEd Maste      uses: github/codeql-action/analyze@v2
43