Skip to content

Commit

Permalink
Create codeql.yml (#66)
Browse files Browse the repository at this point in the history
* Create codeql.yml

* add c build system

* add makefile comment

* generate an object file instead of a library

* add missing EOF

* use wildcard to select all c files

* Use ubuntu-22.04

* add Makefile echo

* Update Makefile

---------

Co-authored-by: George Adams <[email protected]>
  • Loading branch information
qmuntal and gdams authored Mar 26, 2024
1 parent d431ca0 commit 614a81e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: 19 21 * * 6

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ubuntu-22.04
timeout-minutes: 360
permissions:
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'go' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{matrix.language}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.dll
*.so
*.dylib
*.o

# Test binary, built with `go test -c`
*.test
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Purpose: Makefile for building the C code for CodeQL analysis.
build:
cc -c openssl/*.c
echo "This task is only useful for CodeQL analysis. You don't need to run it."

0 comments on commit 614a81e

Please sign in to comment.