Skip to content

Commit 07ff497

Browse files
chore(StepSecurity): Add CodeQL (#786)
## Security Fixes ### Detect Vulnerabilities with SAST Workflow Static Code Analysis (also known as Source Code Analysis) is usually performed as part of a Code Review (also known as clear-box testing) and is carried out at the Implementation phase of a Security Development Lifecycle (SDL). Static Code Analysis commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within ‘static’ (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis. - [The Open Source Security Foundation (OpenSSF) Security Guide](https://github.com/ossf/scorecard/blob/main/docs/checks.md#sast) - [OWASP Static Code Analysis](https://owasp.org/www-community/controls/Static_Code_Analysis) - [Github Guide For Code Scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository) --------- Signed-off-by: StepSecurity Bot <[email protected]> Co-authored-by: StepSecurity Bot <[email protected]>
1 parent 89d2f41 commit 07ff497

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
# For most projects, this workflow file will not need changing; you simply need
3+
# to commit it to your repository.
4+
#
5+
# You may wish to alter this file to override the set of languages analyzed,
6+
# or to provide custom queries or build logic.
7+
#
8+
# ******** NOTE ********
9+
# We have attempted to detect the languages in your repository. Please check
10+
# the `language` matrix defined below to confirm you have the correct set of
11+
# supported CodeQL languages.
12+
#
13+
name: CodeQL
14+
15+
on:
16+
push:
17+
branches:
18+
- master
19+
pull_request:
20+
schedule:
21+
- cron: 0 0 * * 1
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
analyze:
28+
name: Analyze
29+
runs-on: ubuntu-latest
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
language:
39+
- python
40+
# CodeQL supports [ $supported-codeql-languages ]
41+
# Learn more about CodeQL language support at
42+
# https://aka.ms/codeql-docs/language-support
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
48+
# Initializes the CodeQL tools for scanning.
49+
- name: Initialize CodeQL
50+
# yamllint disable-line rule:line-length
51+
uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
52+
with:
53+
languages: ${{ matrix.language }}
54+
# If you wish to specify custom queries, you can do so here or in
55+
# a config file. # By default, queries listed here will override any
56+
# specified in a config file. Prefix the list here with "+" to use
57+
# these queries and those in the config file.
58+
59+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java)
60+
# If this step fails, then you should remove it and run the build
61+
# manually (see below)
62+
- name: Autobuild
63+
# yamllint disable-line rule:line-length
64+
uses: github/codeql-action/autobuild@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
65+
66+
# ℹ️ Command-line programs to run using the OS shell.
67+
# yamllint disable-line rule:line-length
68+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
69+
70+
# If the Autobuild fails above, remove it and uncomment the following
71+
# three lines. Modify them (or add more) to build your code if your
72+
# project, please refer to the EXAMPLE below for guidance.
73+
74+
# - run: |
75+
# echo "Run, Build Application using script"
76+
# ./location_of_script_within_repo/buildscript.sh
77+
78+
- name: Perform CodeQL Analysis
79+
# yamllint disable-line rule:line-length
80+
uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
81+
with:
82+
category: /language:${{matrix.language}}

0 commit comments

Comments
 (0)