Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1aca467

Browse files
Enable CodeQL static scanner (#197)
Co-authored-by: Yunze Xu <[email protected]>
1 parent 48be179 commit 1aca467

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
name: "CodeQL"
21+
22+
on:
23+
push:
24+
branches: [ "main" ]
25+
pull_request:
26+
branches: [ "main" ]
27+
schedule:
28+
- cron: '27 21 * * 6'
29+
30+
jobs:
31+
analyze:
32+
name: Analyze
33+
runs-on: 'ubuntu-latest'
34+
timeout-minutes: 360
35+
permissions:
36+
# required for all workflows
37+
security-events: write
38+
39+
# only required for workflows in private repositories
40+
actions: read
41+
contents: read
42+
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
language: [ 'c-cpp', 'python' ]
47+
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v4
51+
52+
# Initializes the CodeQL tools for scanning.
53+
- name: Initialize CodeQL
54+
uses: github/codeql-action/init@v3
55+
with:
56+
languages: ${{ matrix.language }}
57+
# If you wish to specify custom queries, you can do so here or in a config file.
58+
# By default, queries listed here will override any specified in a config file.
59+
# Prefix the list here with "+" to use these queries and those in the config file.
60+
61+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
62+
# queries: security-extended,security-and-quality
63+
64+
- uses: actions/setup-python@v5
65+
with:
66+
python-version: "3.12"
67+
68+
- name: Install Pulsar C++ client
69+
run: build-support/install-dependencies.sh
70+
71+
- name: CMake
72+
run: cmake .
73+
74+
- name: Build
75+
run: make -j8
76+
77+
- name: Perform CodeQL Analysis
78+
uses: github/codeql-action/analyze@v3
79+
with:
80+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)