Skip to content

Merge pull request #285 from marcransome/update-codeql-workflow #690

Merge pull request #285 from marcransome/update-codeql-workflow

Merge pull request #285 from marcransome/update-codeql-workflow #690

name: CodeQL analysis
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '00 18 * * 1'
workflow_dispatch:
permissions: read-all
jobs:
analyze:
name: CodeQL analysis
runs-on: macos-latest
permissions:
security-events: write
steps:
- name: Harden runner
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies
run: brew install popt
- name: Initialize CodeQL
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
with:
languages: cpp
queries: security-and-quality
source-root: src
- name: Build sources
run: |
cmake -S . -B build -D CMAKE_OSX_ARCHITECTURES=arm64
cmake --build build
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
analyze-actions:
name: CodeQL GitHub Actions analysis
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Harden runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize CodeQL
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
with:
languages: actions
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
with:
category: "/language:actions"