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

.github: scan JavaScript code with codeql #18423

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

jelly
Copy link
Member

@jelly jelly commented Feb 28, 2023

This still has plenty of issues but I think it's time to start scanning

  • Tons of false positives in test/ which are used from Python
  • kdump needs some major re-factoring to make it more sane. I've fixed the state issues in a branch but I think it's more worthwhile to fix it in general
  • Some interesting related issues which require investigation.

@jelly jelly added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Feb 28, 2023
@jelly jelly temporarily deployed to cockpit-dist February 28, 2023 10:59 — with GitHub Actions Inactive
@martinpitt
Copy link
Member

What's your goal here? One approach would be to ignore all current 70 issues to avoid introducing new ones, but if we are honest, we'll just never fix them then. Once we waive them away (which we need to to get green), they will be really hard to find again.

So I'd rather do a different approach: Go over them once, fix the trivial stuff, and then change the codeql scan to only look at / fail on the 20 security alerts -- then fix/waive these (I think you said there are a lot of false positives?). Then we can fix the 12 warnings and 38 notes in separate steps.

@martinpitt martinpitt removed their request for review March 1, 2023 06:07
@jelly
Copy link
Member Author

jelly commented Mar 1, 2023

What's your goal here? One approach would be to ignore all current 70 issues to avoid introducing new ones, but if we are honest, we'll just never fix them then. Once we waive them away (which we need to to get green), they will be really hard to find again.

Yes, you are probably right here, once we ignore there is no way back.

So I'd rather do a different approach: Go over them once, fix the trivial stuff, and then change the codeql scan to only look at / fail on the 20 security alerts -- then fix/waive these (I think you said there are a lot of false positives?). Then we can fix the 12 warnings and 38 notes in separate steps.

I think I figured most trivial stuff.

I've went through and marked all the test related things as non-applicable. The rest needs more investigation.

@jelly
Copy link
Member Author

jelly commented Mar 17, 2023

This should be re-run as kdump was fixed.

@jelly jelly temporarily deployed to cockpit-dist March 17, 2023 15:50 — with GitHub Actions Inactive
@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.

@jelly jelly force-pushed the gh-code-scanning branch 2 times, most recently from a631aef to a5e2763 Compare June 22, 2023 13:55
@jelly jelly requested a review from martinpitt August 23, 2023 07:19
@jelly jelly added the .github-changes Set by a reviewer just before landing to acknowledge that a PR changes github workflows label Aug 23, 2023
@jelly
Copy link
Member Author

jelly commented Aug 23, 2023

@martinpitt ok, there are now ~ 8 issues left of which I am unsure how to fix. So shall we merge it and then sort those out?

@jelly jelly marked this pull request as ready for review August 23, 2023 07:31
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Sure, sounds good! At least we'll prevent introducing new errors then.

@jelly jelly merged commit d974c4b into cockpit-project:main Aug 23, 2023
37 of 38 checks passed
@jelly jelly deleted the gh-code-scanning branch August 23, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.github-changes Set by a reviewer just before landing to acknowledge that a PR changes github workflows no-test For doc/workflow changes, or experiments which don't need a full CI run,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants