Skip to content

Commit f2a6788

Browse files
author
root
committed
Updating GitHub Code Scanning Workflows
1 parent f5628c1 commit f2a6788

File tree

4 files changed

+199
-0
lines changed

4 files changed

+199
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: "CodeQL Java/Kotlin"
4+
5+
on:
6+
push:
7+
branches: ["master", "main"]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: ["master", "main"]
11+
schedule:
12+
- cron: "27 4 * * 5"
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ["java"]
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v2
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: security-extended # security-and-quality
38+
# If you wish to specify custom queries, you can do so here or in a config file.
39+
# By default, queries listed here will override any specified in a config file.
40+
# Prefix the list here with "+" to use these queries and those in the config file.
41+
42+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
43+
# If this step fails, then you should remove it and run the build manually (see below)
44+
- name: Autobuild
45+
uses: github/codeql-action/autobuild@v2
46+
47+
# ℹ️ Command-line programs to run using the OS shell.
48+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
49+
50+
# If the Autobuild fails above, remove it and uncomment the following three lines.
51+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
52+
53+
# - run: |
54+
# echo "Run, Build Application using script"
55+
# ./location_of_script_within_repo/buildscript.sh
56+
57+
- name: Perform CodeQL Analysis
58+
uses: github/codeql-action/analyze@v2
59+
with:
60+
category: "/language:${{matrix.language}}"
61+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: "CodeQL JavaScript/TypeScript"
4+
5+
on:
6+
push:
7+
branches: ["master", "main"]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: ["master", "main"]
11+
schedule:
12+
- cron: "27 4 * * 5"
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ["javascript"]
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v2
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: security-extended # security-and-quality
38+
# If you wish to specify custom queries, you can do so here or in a config file.
39+
# By default, queries listed here will override any specified in a config file.
40+
# Prefix the list here with "+" to use these queries and those in the config file.
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v2
44+
with:
45+
category: "/language:${{matrix.language}}"
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: "CodeQL Python"
4+
5+
on:
6+
push:
7+
branches: ["master", "main"]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: ["master", "main"]
11+
schedule:
12+
- cron: "27 4 * * 5"
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ["python"]
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v2
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: security-extended # security-and-quality
38+
# If you wish to specify custom queries, you can do so here or in a config file.
39+
# By default, queries listed here will override any specified in a config file.
40+
# Prefix the list here with "+" to use these queries and those in the config file.
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v2
44+
with:
45+
category: "/language:${{matrix.language}}"
46+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
name: "CodeQL Ruby"
4+
5+
on:
6+
push:
7+
branches: ["master", "main"]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: ["master", "main"]
11+
schedule:
12+
- cron: "27 4 * * 5"
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ["ruby"]
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v2
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: security-extended # security-and-quality
38+
# If you wish to specify custom queries, you can do so here or in a config file.
39+
# By default, queries listed here will override any specified in a config file.
40+
# Prefix the list here with "+" to use these queries and those in the config file.
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v2
44+
with:
45+
category: "/language:${{matrix.language}}"
46+

0 commit comments

Comments
 (0)