Skip to content

Merge pull request #147 from marcransome/harden-workflow-runners #317

Merge pull request #147 from marcransome/harden-workflow-runners

Merge pull request #147 from marcransome/harden-workflow-runners #317

name: CodeQL analysis
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '00 18 * * 1'
workflow_dispatch:
permissions: read-all
jobs:
analyze:
name: Analyze
runs-on: macos-latest
permissions:
security-events: write
steps:
- name: Harden runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Install dependencies
run: brew install popt
- name: Initialize CodeQL
uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
languages: cpp
queries: security-and-quality
source-root: src
- name: Build sources
run: |
cmake -S . -B build
cmake --build build
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9