Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add analysis workflows for SonarQube and CodeQL #1158

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

peternied
Copy link
Member

Description

This repo has an asynchronous process where SonarQube rules are run several hours after code has merged. This creates a life-cycle where code is reviewed approved and merged and then needs to be updated in a second PR.

This change introduces two new workflows to minimize the after-work required for changes in this repo, by running CodeQL which is built into GitHub for security risk detection and SonarQube with its set of issues based on security issues, code smells, and bug detectors.

These new workflows are being added without any fixes or adjustments to the codebase to be handled in an ongoing basis.

Issues Resolved

Testing

See failed workflow step and annotations on the pull request.

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

This repo has an asychronous process where SonarQube rules are run
several hours after code has merged.  This creates a life-cycle where
code is reviewed approved and merged and then needs to be updated in a
second PR.

This change introduces two new workflows to minimize the afterwork
required for changes in this repo, by running CodeQL which is built into
GitHub for security risk detection and SonarQube with its set of issues
based on security issues, code smells, and bug detectors.

These new workflows are being added without any fixes or adjustments to
the codebase to be handled in an ongoing basis.

Signed-off-by: Peter Nied <[email protected]>
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.76%. Comparing base (d5b401c) to head (88ca892).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1158   +/-   ##
=========================================
  Coverage     80.76%   80.76%           
  Complexity     2948     2948           
=========================================
  Files           400      400           
  Lines         15104    15104           
  Branches       1021     1021           
=========================================
  Hits          12199    12199           
  Misses         2288     2288           
  Partials        617      617           
Flag Coverage Δ
unittests 80.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

push:
pull_request:
schedule:
- cron: '25 22 * * 0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this schedule for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sure even if nothing is pushed during a week main branch is scanned in case new security definitions are created.

@peternied peternied merged commit 7da05b7 into opensearch-project:main Nov 22, 2024
21 of 22 checks passed
@peternied peternied deleted the sonarqube branch November 22, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants