1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-31 23:30:25 +03:00

ci/GHA: add CodeQL jobs for GHA and C

Closes #1655
This commit is contained in:
Viktor Szakats
2025-09-13 22:54:34 +02:00
parent c3e6dbd469
commit 1ec4e27f85

67
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,67 @@
# Copyright (C) The libssh2 project and its contributors.
#
# SPDX-License-Identifier: BSD-3-Clause
name: 'CodeQL'
'on':
push:
branches:
- master
- '*/ci'
pull_request:
branches:
- master
- '*/ci'
schedule:
- cron: '0 0 * * 4'
concurrency:
group: ${{ github.workflow }}
permissions: {}
jobs:
codeql:
name: 'GHA'
runs-on: ubuntu-latest
permissions:
security-events: write # To create/update security events
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: 'initialize'
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3
with:
languages: actions
queries: security-extended
- name: 'perform analysis'
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3
c:
name: 'C'
runs-on: ubuntu-latest
permissions:
security-events: write # To create/update security events
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: 'initialize'
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3
with:
languages: cpp
build-mode: manual
- name: 'build'
timeout-minutes: 5
run: |
cmake -B . -G Ninja
cmake --build . --verbose
- name: 'perform analysis'
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3