forked from hackforla/website
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (105 loc) · 5.88 KB
/
codeql.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "forcodeqlv5", merge-conflict-1, merge-conflict-2 ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "forcodeqlv5" ]
schedule:
- cron: '31 21 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
#language: [ 'java' , 'javascript' ]
language: [ 'javascript' ]
#language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/workflows/codeql-config.yml
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
#disable-default-queries: true
# 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
#TODO this is a test comment should not be part of alert
#// TODO another test
#queries: security-extended,security-and-quality
#queries: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/tests/EmptyThen@testingquery
#queries: SAUMILDHANKAR/codeql/javascript/ql/custom-queries/javascript/tests/Basic@testingquery
#queries: SAUMILDHANKAR/codeql/ruby/ql/src/queries/summary/LinesOfCode.ql@testingquery
#queries: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/queries/EmptyThen.ql@testingquery
#queries: SAUMILDHANKAR/codeql/java/ql/src/Security/CWE/CWE-074/JndiInjection.ql@testingquery
#queries: SAUMILDHANKAR/codeql/javascript/ql/src/Security/CWE-830/FunctionalityFromUntrustedSource.ql@main
#queries: SAUMILDHANKAR/codeql/javascript/ql/src/Security/CWE-830/FunctionalityFromUntrustedSource.ql@testingquery
#queries: SAUMILDHANKAR/codeql/javascript/ql/lib/semmle/javascript/YAML.qll@testingquery
#following query generated around 20 code scanning alerts for commented out code in comment.js file
#queries: SAUMILDHANKAR/codeql/javascript/ql/src/Comments/CommentedOutCode.ql@testingquery
#following query generated around 4 code scanning alerts especially 2 todo comments written by me in comment.js file
#queries: SAUMILDHANKAR/codeql/javascript/ql/src/Comments/TodoComments.ql@testingquery
#following query should generate 2 code scanning alerts and added liquid errors
#queries: SAUMILDHANKAR/codeql/javascript/ql/src/Comments/FUTUREBUG.ql@testingquery
#following query should generate 2 code scanning alerts with updated desc
queries: SAUMILDHANKAR/codeql/javascript/ql/src/Comments/ForLiquidComment.ql@testingquery
# earlier results not processed for the following query
# now following query generates one code alert
#queries: SAUMILDHANKAR/codeql/javascript/ql/test/library-tests/YAML/tests.ql@testingquery
# following returned no result
#queries: SAUMILDHANKAR/codeql/javascript/ql/test/library-tests/YAML/printAst.ql@testingquery
#queries: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/tests/EmptyThen/Test.java@testingquery
#queries: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/tests/EmptyThen/EmptyThen.qlref@testingquery
#uses: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/tests/EmptyThen
#packs: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/tests/EmptyThen@testingquery
#queries:
#- name: Use an external repo query
#uses: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/tests/EmptyThen@testingquery
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
#- run: |
#echo "Run, Build Application using script"
#./location_of_script_within_repo/buildscript.sh
#./buildscript.sh
#- run: |
#make bootstrap
#make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
disable-default-queries: true
#uses: SAUMILDHANKAR/codeql/java/ql/custom-queries/java/tests/EmptyThen