Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <bayuan@purdue.edu>2023-10-18 23:50:10 +0300
committerPetteri Aimonen <jpa@github.mail.kapsi.fi>2023-10-28 12:02:50 +0300
commitf79d7be6f72863446a1d39625542f26a9eea4df4 (patch)
tree62586df63139125d22b7e159de5cfe078004ec02
parent62e53644ade7aa3f399175adaac466e55d87290d (diff)
Add CodeQL Workflow for Code Security Analysis
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 pull request (functionality to run on every push to main branches is included as a comment for convenience). - Runs daily. - Excludes queries with a high false positive rate or low-severity findings. - Does not display results for git submodules, 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 (https://codeql.github.com/ and https://codeql.github.com/docs/). Signed-off-by: Brian <bayuan@purdue.edu>
-rw-r--r--.github/workflows/codeql.yml23
1 files changed, 13 insertions, 10 deletions
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index eaa9599..3ef873f 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -14,11 +14,10 @@ name: "CodeQL"
on:
push:
branches: [ "main", "master" ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: [ "main", "master" ]
schedule:
- - cron: '28 21 * * 0'
+ - cron: '0 0 * * *'
+ pull_request:
+ branches: '*'
jobs:
analyze:
@@ -103,21 +102,25 @@ jobs:
-**:cpp/suspicious-pointer-scaling
-**:cpp/suspicious-pointer-scaling-void
-**:cpp/unsigned-comparison-zero
- -**/third*party/**
- -**/3rd*party/**
- -**/external/**
+ -**/cmake*/Modules/**
input: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
- - name: Upload SARIF
+ - name: Upload CodeQL results to code scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.step1.outputs.sarif-output }}
category: "/language:${{matrix.language}}"
- - name: Archive CodeQL results
+ - name: Upload CodeQL results as an artifact
+ if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: codeql-results
path: ${{ steps.step1.outputs.sarif-output }}
- retention-days: 5 \ No newline at end of file
+ retention-days: 5
+
+ - name: Fail if an error is found
+ run: |
+ ./.github/workflows/fail_on_error.py \
+ ${{ steps.step1.outputs.sarif-output }}/cpp.sarif