diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..949a6ca --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: CodeQL C/C++ + +permissions: + contents: read + actions: read + security-events: write + +on: + workflow_dispatch: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y gcc build-essential grub2-common grub-pc xorriso qemu-system-x86 mtools cpio + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: c-cpp + build-mode: manual + + - name: Build with CodeQL + run: | + make clean + make + + - name: Run Tests + run: make test + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 \ No newline at end of file diff --git a/README.md b/README.md index 29992f5..8f1c3cd 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![C/C++ CI](https://github.com/CIS-osdev/kernel/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/CIS-osdev/kernel/actions/workflows/c-cpp.yml) [![pages-build-deployment](https://github.com/CIS-osdev/kernel/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/CIS-osdev/kernel/actions/workflows/pages/pages-build-deployment) +[![CodeQL Advanced](https://github.com/0Nera/cis-kernel/actions/workflows/codeql.yml/badge.svg)](https://github.com/0Nera/cis-kernel/actions/workflows/codeql.yml) [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/russian_os/10921)