Skip to content

Commit

Permalink
Add SAST tool CodeQL scan
Browse files Browse the repository at this point in the history
Address OpenSSF "SAST" in intel#516
  • Loading branch information
wenju-he committed Jun 4, 2024
1 parent 97fe700 commit 2bae8fe
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
analyze:
name: Analyze

runs-on: ubuntu-latest

permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual

steps:
- name: Checkout opencl-clang sources for action files
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Run build-opencl-clang action
uses: ./.github/actions/build-opencl-clang
with:
ref_llvm: main
ref_translator: main
ref_opencl-clang: main

- name: Initialize CodeQL
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
with:
category: "/language:${{matrix.language}}"

0 comments on commit 2bae8fe

Please sign in to comment.