aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/codeql-analysis.yml
blob: c16fd732c263bed8009e8ec1b532da1d94f2e173 (plain) (blame)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CodeQL

on:
  push:
    paths:
      - 'm4/**'
      - 'src/**.c'
      - 'src/**.h'
      - 'src/**.mk'
      - 'src/**Makefile'
      - .github/workflows/codeql-analysis.yml
      - Makefile
      - ci/printenv.sh
      - config.mk.in
      - config.sh.in
      - configure
      - configure.ac
  pull_request:
    paths:
      - 'm4/**'
      - 'src/**.c'
      - 'src/**.h'
      - 'src/**.mk'
      - 'src/**Makefile'
      - .github/workflows/codeql-analysis.yml
      - Makefile
      - ci/printenv.sh
      - config.mk.in
      - config.sh.in
      - configure
      - configure.ac
  schedule:
    - cron: '0 7 * * 2'

permissions:  # added using https://github.com/step-security/secure-workflows
  contents: read

jobs:
  analyze:
    permissions:
      actions: read
      contents: read
      security-events: write
    name: Analyze
    runs-on: ubuntu-latest

    steps:
    - name: Harden Runner
      uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
      with:
        disable-sudo: true
        egress-policy: block
        allowed-endpoints: >
          api.github.com:443
          github.com:443
          objects.githubusercontent.com:443
          uploads.github.com:443

    - name: Checkout repository
      uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

    - name: print env
      run: ./ci/printenv.sh

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@5b6282e01c62d02e720b81eb8a51204f527c3624
      with:
        languages: cpp

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    - name: Autobuild
      uses: github/codeql-action/autobuild@5b6282e01c62d02e720b81eb8a51204f527c3624

    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 https://git.io/JvXDl

    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
    #    and modify them (or add more) to build your code if your project
    #    uses a compiled language

    #- run: |
    #   make bootstrap
    #   make release

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