forked from Ettercap/ettercap
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Ettercap#1203 from pwntester/pwntester/add-codeql-…
…workflow Add CodeQL workflow
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ 'master' ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ 'master' ] | ||
schedule: | ||
- cron: '51 12 * * 0' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'cpp' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y bison check cmake debhelper flex groff libbsd-dev libcurl4-openssl-dev libgeoip-dev libgtk-3-dev libgtk2.0-dev libidn11-dev libltdl-dev libluajit-5.1-dev libncurses5-dev libnet1-dev libpcap-dev libpcre3-dev librtmp-dev libssl-dev | ||
- run: | | ||
git clone https://github.com/richq/cmake-lint.git | ||
cd cmake-lint | ||
python setup.py install --user | ||
cd - | ||
./misc/cmakelint.sh | ||
mkdir build | ||
cd build | ||
cmake -DENABLE_TESTS=Off $BUILD_ARGS .. | ||
make | ||
env: | ||
CC: 'gcc' | ||
BUILD_ARGS: '' | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |