Skip to content

Commit

Permalink
fix(): use codeql v3
Browse files Browse the repository at this point in the history
  • Loading branch information
KarimGl committed Aug 21, 2024
1 parent 9d57f96 commit b1c05bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 44 deletions.
46 changes: 13 additions & 33 deletions .github/workflows/codeql-analysis-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,54 +14,34 @@ on:
type: string
required: true
description: "Release if true"
build-mode:
type: string
required: false
default: autobuild
description: "The build mode that will be used to analyze the language"

jobs:
codeql-analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read

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

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: "maven"

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ inputs.language }}
build-mode: ${{ inputs.build-mode }}
source-root: ${{ inputs.project-dir }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# 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@v2
with:
working-directory: ${{ inputs.project-dir }}

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
13 changes: 2 additions & 11 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
#SPDX-FileCopyrightText: 2017-2024 Enedis
#SPDX-License-Identifier: Apache-2.0

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches:
- main
- codeql
paths-ignore:
- 'docs/**'

Expand All @@ -33,6 +23,7 @@ jobs:
with:
project-dir: chutney/ui
language: javascript-typescript
build-mode: none

dsl-analyze:
uses: ./.github/workflows/codeql-analysis-template.yml
Expand Down

0 comments on commit b1c05bf

Please sign in to comment.