Skip to content

Commit 4809017

Browse files
author
Theomegas1
authored
Create codeql.yml
the program setup to organize job output Signed-off-by: Theomegas1 <[email protected]>
1 parent 4b93ad1 commit 4809017

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed

.github/workflows/codeql.yml

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above- name: Execute Job
19+
# You may pin to the exact commit or the version.
20+
# uses: parasoft/execute-job-action@1899d360584e281e027c537d2df0f75a1115776e
21+
uses: parasoft/[email protected]
22+
with:
23+
# CTP URL
24+
ctpUrl:
25+
# CTP Username
26+
ctpUsername:
27+
# CTP Password
28+
ctpPassword:
29+
# CTP Test Execution Job Name
30+
ctpJob:
31+
# Abort the job after timeout exceeded
32+
abortOnTimeout: # optional
33+
# Timeout value in minutes
34+
timeoutInMinutes: # optional
35+
# Publish test execution results to DTP
36+
publishReport: # optional
37+
# DTP URL
38+
dtpUrl: # optional
39+
# DTP Username
40+
dtpUsername: # optional
41+
# DTP Password
42+
dtpPassword: # optional
43+
# DTP Project Name
44+
dtpProject: # optional
45+
# Build ID to send to DTP
46+
buildId: # optional
47+
# Session Tag to send to DTP
48+
sessionTag: # optional
49+
# Append the test variable set environment name to the session tag
50+
appendEnvironment: # optional branches: [ "main" ]
51+
schedule:
52+
- cron: '21 9 * * 0'
53+
54+
jobs:
55+
analyze:
56+
name: Analyze
57+
# Runner size impacts CodeQL analysis time. To learn more, please see:
58+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
59+
# - https://gh.io/supported-runners-and-hardware-resources
60+
# - https://gh.io/using-larger-runners
61+
# Consider using larger runners for possible analysis time improvements.
62+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
63+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
64+
permissions:
65+
actions: read
66+
contents: read
67+
security-events: write
68+
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
language: [ 'javascript', 'ruby' ]
73+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
74+
# Use only 'java' to analyze code written in Java, Kotlin or both
75+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
76+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
77+
78+
steps:
79+
- name: Checkout repository
80+
uses: actions/checkout@v3
81+
82+
# Initializes the CodeQL tools for scanning.
83+
- name: Initialize CodeQL
84+
uses: github/codeql-action/init@v2
85+
with:
86+
languages: ${{ matrix.language }}
87+
# If you wish to specify custom queries, you can do so here or in a config file.
88+
# By default, queries listed here will override any specified in a config file.
89+
# Prefix the list here with "+" to use these queries and those in the config file.
90+
91+
# 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
92+
# queries: security-extended,security-and-quality
93+
94+
95+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
96+
# If this step fails, then you should remove it and run the build manually (see below)
97+
- name: Autobuild
98+
uses: github/codeql-action/autobuild@v2
99+
100+
# ℹ️ Command-line programs to run using the OS shell.
101+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
102+
103+
# If the Autobuild fails above, remove it and uncomment the following three lines.
104+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
105+
106+
# - run: |
107+
# echo "Run, Build Application using script"
108+
# ./location_of_script_within_repo/buildscript.sh
109+
110+
- name: Perform CodeQL Analysis
111+
uses: github/codeql-action/analyze@v2
112+
with:
113+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)