File: codeql-analysis.yaml

package info (click to toggle)
ccache 4.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,188 kB
  • sloc: cpp: 47,282; asm: 28,570; sh: 8,674; ansic: 5,357; python: 685; perl: 68; makefile: 23
file content (57 lines) | stat: -rw-r--r-- 1,527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# More info:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning

name: "CodeQL"

on:
  push:
    branches: ["*"]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: ["*"]
    paths-ignore:
      - '**/*.adoc'
      - '**/*.bash'
      - '**/*.md'
  schedule:
    # Full scan once a week
    - cron: '0 14 * * 3'

permissions:
  contents: read

jobs:
  analyze:
    permissions:
      actions: read  # for github/codeql-action/init to get workflow details
      contents: read  # for actions/checkout to fetch code
      security-events: write  # for github/codeql-action/analyze to upload SARIF results
    name: Analyze
    runs-on: ubuntu-22.04

    steps:
    - name: Checkout repository
      uses: actions/checkout@v3
      with:
        # We must fetch at least the immediate parents so that if this is
        # a pull request then we can checkout the head.
        fetch-depth: 2

    - name: Install dependencies
      run: sudo apt-get update && sudo apt-get install ninja-build elfutils libzstd-dev pkg-config libhiredis-dev

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      with:
        languages: cpp
        queries: +security-and-quality

    - name: Build
      run: ci/build
      env:
        RUN_TESTS: none
        CMAKE_GENERATOR: Ninja
        EXTRA_CMAKE_BUILD_FLAGS: --target ccache

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3