Skip to content

Commit bf7c536

Browse files
committed
clean up codeql for RN
1 parent bfc1301 commit bf7c536

File tree

2 files changed

+41
-55
lines changed

2 files changed

+41
-55
lines changed

.github/codeql-config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
paths:
2+
- src
3+
- android/src/main/java
4+
- ios/RCTOneSignal/**/*.m
5+
- ios/RCTOneSignal/**/*.h
6+
- .github/actions
7+
8+
paths-ignore:
9+
- "examples/**/android/**"

.github/workflows/codeql.yml

Lines changed: 32 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12-
name: "CodeQL"
1+
name: 'CodeQL'
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
136

147
on:
158
push:
16-
branches: [ "main", "major_release_5.0.0" ]
9+
branches: ['main']
1710
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [ "main", "major_release_5.0.0" ]
11+
branches: ['main']
2012
schedule:
2113
- cron: '37 19 * * 4'
2214

@@ -38,45 +30,30 @@ jobs:
3830
strategy:
3931
fail-fast: false
4032
matrix:
41-
language: [ 'javascript-typescript' ]
42-
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
43-
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
44-
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
45-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
33+
include:
34+
- language: actions
35+
build-mode: none
36+
- language: javascript-typescript
37+
build-mode: none
38+
- language: java
39+
build-mode: none
40+
- language: c-cpp
41+
build-mode: none
4642

4743
steps:
48-
- name: Checkout repository
49-
uses: actions/checkout@v3
50-
51-
# Initializes the CodeQL tools for scanning.
52-
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@v2
54-
with:
55-
languages: ${{ matrix.language }}
56-
# If you wish to specify custom queries, you can do so here or in a config file.
57-
# By default, queries listed here will override any specified in a config file.
58-
# Prefix the list here with "+" to use these queries and those in the config file.
59-
60-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
61-
# queries: security-extended,security-and-quality
62-
63-
64-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
65-
# If this step fails, then you should remove it and run the build manually (see below)
66-
- name: Autobuild
67-
uses: github/codeql-action/autobuild@v2
68-
69-
# ℹ️ Command-line programs to run using the OS shell.
70-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
71-
72-
# If the Autobuild fails above, remove it and uncomment the following three lines.
73-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
74-
75-
# - run: |
76-
# echo "Run, Build Application using script"
77-
# ./location_of_script_within_repo/buildscript.sh
78-
79-
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v2
81-
with:
82-
category: "/language:${{matrix.language}}"
44+
- name: Checkout repository
45+
uses: actions/checkout@v6
46+
47+
# Initializes the CodeQL tools for scanning.
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@v4
50+
51+
with:
52+
languages: ${{ matrix.language }}
53+
build-mode: ${{ matrix.build-mode }}
54+
config-file: ./.github/codeql-config.yml
55+
56+
- name: Perform CodeQL Analysis
57+
uses: github/codeql-action/analyze@v4
58+
with:
59+
category: '/language:${{matrix.language}}'

0 commit comments

Comments
 (0)