# Copyright (C) Daniel Stenberg, , et al. # # SPDX-License-Identifier: curl name: 'CodeQL' 'on': push: branches: - master - '*/ci' paths-ignore: - '**/*.md' - '.circleci/**' - 'appveyor.*' - 'docs/**' - 'packages/**' - 'plan9/**' - 'projects/**' - 'tests/data/**' - 'winbuild/**' pull_request: branches: - master paths-ignore: - '**/*.md' - '.circleci/**' - 'appveyor.*' - 'docs/**' - 'packages/**' - 'plan9/**' - 'projects/**' - 'tests/data/**' - 'winbuild/**' schedule: - cron: '0 0 * * 4' concurrency: group: ${{ github.workflow }} permissions: {} jobs: gha_python: name: 'GHA and Python' runs-on: ubuntu-latest permissions: security-events: write # To create/update security events steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 with: persist-credentials: false - name: 'initialize' uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3 with: languages: actions, python queries: security-extended - name: 'perform analysis' uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3 c: name: 'C' runs-on: ${{ matrix.platform == 'Linux' && 'ubuntu-latest' || 'windows-2022' }} permissions: security-events: write # To create/update security events strategy: fail-fast: false matrix: platform: [Linux, Windows] env: MATRIX_PLATFORM: '${{ matrix.platform }}' steps: - name: 'install prereqs' if: ${{ matrix.platform == 'Linux' }} timeout-minutes: 5 run: | sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get -o Dpkg::Use-Pty=0 update sudo rm -f /var/lib/man-db/auto-update sudo apt-get -o Dpkg::Use-Pty=0 install libpsl-dev libbrotli-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 with: persist-credentials: false - name: 'initialize' uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3 with: languages: cpp build-mode: manual - name: 'build' timeout-minutes: 10 shell: bash run: | if [ "${MATRIX_PLATFORM}" = 'Windows' ]; then cmake -B . -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_VS_GLOBALS=TrackFileAccess=false \ -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF -DUSE_WIN32_IDN=ON cmake --build . --verbose src/Debug/curl.exe --disable --version else cmake -B . -G Ninja cmake --build . --verbose src/curl --disable --version fi - name: 'perform analysis' uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3