dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

add CodeQL Github Action

Open carlsonp opened this issue 2 years ago • 3 comments

What this PR does / why we need it:

This adds a Github Action for CodeQL. It integrates well since it's from Github. It helps in checking for security vulnerabilities.

Will be a no-op for code and documentation.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

carlsonp avatar Jan 03 '23 17:01 carlsonp

If you are still interested in this PR, can you please merge and resolve any merge conflicts with the latest from develop? If so, we can prioritize reviewing and QAing the changes. If we don’t hear from you by May 22, 2024, we’ll go ahead and close this PR (it can always be reopened after that date, if there is still interest).

scolapasta avatar Apr 23 '24 23:04 scolapasta

Rebased onto develop branch

carlsonp avatar Apr 26 '24 04:04 carlsonp

Hooray for code quality tools integration! I hope this PR will be merged, and/or #9847. (I'm not really involved, but have been a proponent of cleaning up the code base for years.)

However, https://github.com/IQSS/dataverse/actions/runs/8842621992 says that the autobuild failed and to update the used actions. Could you have a look at the suggestions?

bencomp avatar Jul 25 '24 13:07 bencomp

2024/11/18: @ofahimIQSS please review and decide how we can move it forward. Thanks!

cmbz avatar Nov 18 '24 15:11 cmbz

I’m currently researching the potential benefits of integrating CodeQL into our GitHub Actions workflow. CodeQL is a robust security and code analysis tool designed to identify vulnerabilities and maintain high-quality code standards.

Over the next few weeks, I’ll analyze how CodeQL compares to other similar tools, evaluating its impact on our development process, code quality, and overall team efficiency.

ofahimIQSS avatar Dec 20 '24 20:12 ofahimIQSS

@carlsonp any idea why this PR is failing? 🤔

Screenshot 2025-03-18 at 1 09 54 PM

pdurbin avatar Mar 18 '25 17:03 pdurbin

Guessing it's the out of date actions - at QDR we have https://github.com/QualitativeDataRepository/dataverse/blob/develop/.github/workflows/codeql-analysis.yml which has new versions of all the github actions involved. We also have Java, JavaScript and Python as languages, versus just Java.

qqmyers avatar Mar 18 '25 17:03 qqmyers

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.

I went through the wizard at https://github.com/IQSS/dataverse/new/develop?filename=.github%2Fworkflows%2Fcodeql.yml&workflow_template=code-scanning%2Fcodeql and then copied and pasted it into the YAML for this PR in 793c3ee.

pdurbin avatar Mar 19 '25 17:03 pdurbin

Im wondering how we can handle/proceed with the code scanning results: https://github.com/IQSS/dataverse/security/code-scanning?page=1&query=pr%3A9252+tool%3ACodeQL+is%3Aopen+sort%3Acreated-desc numbers 302 to 162

ofahimIQSS avatar Mar 19 '25 18:03 ofahimIQSS

Noticed that continuous-integration/jenkins/pr-merge failed - rerunning it now.

ofahimIQSS avatar Mar 19 '25 18:03 ofahimIQSS

The branch was 3231 commits behind. 😅

I just merged the latest from develop into it.

pdurbin avatar Mar 19 '25 19:03 pdurbin

Looks good, merging PR

ofahimIQSS avatar Mar 19 '25 20:03 ofahimIQSS