summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-12-08 13:02:53 -0500
committerGitHub <noreply@github.com>2022-12-08 13:02:53 -0500
commit031ebed0e5f59ed8c2404a7162732808db4af047 (patch)
tree37b3ec1060be4e908a9a4e14bace2496a659ea33 /.github/workflows
parent87d0f8988c9452428d5a250644ac4cb2acaf43bb (diff)
parentc4d2f79e74a684f40f0c3d2b670133494395c9ee (diff)
downloadbfs-031ebed0e5f59ed8c2404a7162732808db4af047.tar.xz
Merge pull request #98 from lgtm-migrator/codeql
Add CodeQL workflow for GitHub code scanning
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/codeql.yml55
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..e1a99f2
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,55 @@
+name: CodeQL
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+ schedule:
+ - cron: "10 14 * * 2"
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update -y
+ sudo apt-get install -y \
+ gcc \
+ acl \
+ libacl1-dev \
+ attr \
+ libattr1-dev \
+ libcap2-bin \
+ libcap-dev \
+ libonig-dev
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: cpp
+ queries: +security-and-quality
+
+ - name: Generate coverage
+ run: |
+ make -j$(nproc) all
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
+ with:
+ category: "/language:cpp"