Skip to content

ci: harden workflows (#9) #24

ci: harden workflows (#9)

ci: harden workflows (#9) #24

Workflow file for this run

name: CodeQL
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '14 4 * * 2'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
security-events: write
actions: read
contents: read
strategy:
fail-fast: false
matrix:
language:
- c-cpp
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
azure.archive.ubuntu.com:80
esm.ubuntu.com:443
github.com:443
motd.ubuntu.com:443
objects.githubusercontent.com:443
packages.microsoft.com:443
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Initialize CodeQL
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
languages: ${{ matrix.language }}
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Build
run: |
cmake -B build
cmake --build build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
category: "/language:${{ matrix.language }}"