Update CodeQL to Ignore .gyp Files and Compile C++ (#67)

* Update codeql to ignore .gyp files.

* Update the auto-build with codeql to build cpp instead of js.

* Update ignored paths to agree with project naming.

* Update codeql versions.

* Update codeql-analysis.yml

* Try basic manual compile step.

* Attempt to use g++ to compile.

* Try autobuilt v3.

* Update codeql-analysis.yml

* Try to fix autobuilder by setting a tracing directory path.

* Have no cmake file so try manually compiling and linking.

* Fix .cc file names.

* Update codeql-analysis.yml

* Include nan dependency.

* Update codeql-analysis.yml

* Configure node-gyp for dependencies.

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Try using node-gyp instead.

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml
This commit is contained in:
Jackson Weber 2024-11-08 12:58:05 -08:00 коммит произвёл GitHub
Родитель f8e3e8521f
Коммит d149327c9f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 41 добавлений и 10 удалений

3
.github/codeql/codeql-config.yml поставляемый
Просмотреть файл

@ -4,5 +4,6 @@ queries:
- uses: security-and-quality
paths-ignore:
- '**/tests/'
- '**/test/'
- '**/out/'
- '**/*.gyp'

48
.github/workflows/codeql-analysis.yml поставляемый
Просмотреть файл

@ -32,18 +32,18 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
@ -54,8 +54,8 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# - name: Autobuild
# uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@ -64,9 +64,39 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install node-pre-gyp globally
run: npm install -g @mapbox/node-pre-gyp
- name: Install Node gyp
run: npm install -g node-gyp
- name: Install node-pre-gyp globally
run: node-pre-gyp install --fallback-to-build
- name: Install nan globally
run: npm install -g nan
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Make
run: sudo apt-get update && sudo apt-get install -y make
- name: Install GCC
run: sudo apt-get update && sudo apt-get install -y gcc
- name: Build
run: |
npm install --save nan
node-gyp configure
node-gyp rebuild
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3