Skip to content

Commit adeda00

Browse files
authored
Create codeql.yml
1 parent 9ac2291 commit adeda00

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/codeql.yml

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

0 commit comments

Comments
 (0)