Skip to content

Commit c6608ee

Browse files
authored
Add Code Scanning (#2835)
Code scanning is a feature that you use to analyze the code in a GitHub repository to find security vulnerabilities and coding errors. Any problems identified by the analysis are shown in GitHub.
1 parent 50963ec commit c6608ee

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/codeql.yml

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

0 commit comments

Comments
 (0)