Skip to content

Commit

Permalink
Merge pull request #141 from iartemov-ledger/codeql_checks
Browse files Browse the repository at this point in the history
CodeQL workflows add-on for C and python code
  • Loading branch information
iartemov-ledger authored Jan 9, 2025
2 parents 7abd9c6 + c416c5d commit 4a33364
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/codeql_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "CodeQL (c-code)"

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:
# Excluded path: add the paths you want to ignore instead of deleting the workflow
paths-ignore:
- '.github/workflows/*.yml'
- 'tests/*'

jobs:
analyse:
name: Analyse
strategy:
fail-fast: false
matrix:
sdk: ["$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK"]
# 'cpp' covers C and C++
language: ['cpp']
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest

steps:
- name: Clone
uses: actions/checkout@v4
with:
submodules: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality

# CodeQL will create the database during the compilation
- name: Build
run: |
make BOLOS_SDK=${{ matrix.sdk }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
39 changes: 39 additions & 0 deletions .github/workflows/codeql_checks_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL (python)"

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:
# Excluded path: add the paths you want to ignore instead of deleting the workflow
paths-ignore:
- '.github/workflows/*.yml'

jobs:
analyse:
name: Analyse
strategy:
fail-fast: false
matrix:
language: ['python']
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest

steps:
- name: Clone
uses: actions/checkout@v4
with:
submodules: true

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

0 comments on commit 4a33364

Please sign in to comment.