9 permissions: # least privileges, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
18 actions: read # for github/codeql-action/init to get workflow details
19 contents: read # for actions/checkout to fetch code
20 security-events: write # for github/codeql-action/analyze to upload SARIF results
25 # Override automatic language detection by changing the below list
26 # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
30 # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
33 - uses: PowerDNS/pdns/set-ubuntu-mirror@meta
34 - name: Checkout repository
35 uses: actions/checkout@v3.1.0
37 # We must fetch at least the immediate parents so that if this is
38 # a pull request then we can checkout the head.
41 # Python is required for building the Authoritative server
42 - uses: actions/setup-python@v4
46 # Initializes the CodeQL tools for scanning.
47 - name: Initialize CodeQL
48 uses: github/codeql-action/init@v2
50 languages: ${{ matrix.language }}
51 queries: +security-and-quality
52 # TODO: go through +security-and-quality (400 alerts) once, then see if we can upgrade to it
54 # If you wish to specify custom queries, you can do so here or in a config file.
55 # By default, queries listed here will override any specified in a config file.
56 # Prefix the list here with "+" to use these queries and those in the config file.
57 # queries: ./path/to/local/query, your-org/your-repo/queries@main
59 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
60 # If this step fails, then you should remove it and run the build manually (see below)
62 # uses: github/codeql-action/autobuild@v2
64 # âšī¸ Command-line programs to run using the OS shell.
65 # đ https://git.io/JvXDl
67 # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
68 # and modify them (or add more) to build your code if your project
69 # uses a compiled language
71 - name: Update repository metadata
74 - name: Install dependencies
76 sudo apt-get -qq -y --no-install-recommends --allow-downgrades install \
78 default-libmysqlclient-dev \
83 libcurl4-openssl-dev \
109 if: matrix.product == 'auth'
112 ./configure --with-modules='bind geoip gmysql godbc gpgsql gsqlite3 ldap lmdb lua2 pipe remote tinydns' --enable-tools --enable-ixfrdist --enable-dns-over-tls --enable-experimental-pkcs11 --with-libsodium --enable-lua-records CFLAGS='-O0' CXXFLAGS='-O0'
117 - name: Build dnsdist
118 if: matrix.product == 'dnsdist'
122 ./configure --enable-unit-tests --enable-dnstap --enable-dnscrypt --enable-dns-over-tls --enable-dns-over-https LIBS=-lwslay CFLAGS='-O0' CXXFLAGS='-O0'
123 make -j8 -C ext/ipcrypt
124 make -j8 -C ext/yahttp
127 - name: Build recursor
128 if: matrix.product == 'rec'
132 ./configure --enable-unit-tests --enable-nod --enable-dnstap CFLAGS='-O0' CXXFLAGS='-O0'
135 make -j4 pdns_recursor rec_control
137 - name: Perform CodeQL Analysis
138 uses: github/codeql-action/analyze@v2