You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add CodeQL Workflow for Code Security Analysis
This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.
We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every push and pull request to the main branch.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for third-party code, focusing only on our own codebase.
Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.
Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.
Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation.
Signed-off-by: Brian <[email protected]>
# Use only 'java' to analyze code written in Java, Kotlin or both
44
+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
45
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
46
+
47
+
steps:
48
+
- name: Checkout repository
49
+
uses: actions/checkout@v3
50
+
with:
51
+
submodules: recursive
52
+
53
+
# Initializes the CodeQL tools for scanning.
54
+
- name: Initialize CodeQL
55
+
uses: github/codeql-action/init@v2
56
+
with:
57
+
languages: ${{ matrix.language }}
58
+
# If you wish to specify custom queries, you can do so here or in a config file.
59
+
# By default, queries listed here will override any specified in a config file.
60
+
# Prefix the list here with "+" to use these queries and those in the config file.
61
+
62
+
# 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
63
+
# queries: security-extended,security-and-quality
64
+
queries: security-and-quality
65
+
66
+
67
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
68
+
# If this step fails, then you should remove it and run the build manually (see below)
69
+
#- name: Autobuild
70
+
# uses: github/codeql-action/autobuild@v2
71
+
72
+
# ℹ️ Command-line programs to run using the OS shell.
73
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
74
+
75
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
76
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
77
+
78
+
- run: |
79
+
./.github/workflows/codeql-buildscript.sh
80
+
81
+
- name: Perform CodeQL Analysis
82
+
uses: github/codeql-action/analyze@v2
83
+
with:
84
+
category: "/language:${{matrix.language}}"
85
+
upload: false
86
+
id: step1
87
+
88
+
# Filter out rules with low severity or high false positve rate
0 commit comments