CobbleSword / NachoSpigot

NachoSpigot is a fork of TacoSpigot 1.8.9 that offers several enhancements to performance as well as bug fixes.
GNU General Public License v3.0
237 stars 87 forks source link

add code analysis with codeql #283

Closed CyberFlameGO closed 2 years ago

CyberFlameGO commented 2 years ago

adds CodeQL codescanning

CyberFlameGO commented 2 years ago

Thanks @Elierrr; in hindsight I should’ve probably checked the workflow, though how can I reuse the autobuild from the other workflow run, in the “Analyze” job, without shifting the “Analyze” job (and therefore all of its extra permissions) into the main job?

ghost commented 2 years ago

You should be able to just move the workflows (except for autobuild) and permissions to the main workflow. The init workflow should be at the start, while the analyze being after it compiles

CyberFlameGO commented 2 years ago

That doesn’t quite make sense; wouldn’t the autobuild need to be part of the same job? Also, I feel like it’s foolish to have permissions unnecessarily being given to the other job when only the CodeQL job needs it

Sculas commented 2 years ago

I see you're using a matrix.. but for what? A matrix for a single item is absolutely useless.

CyberFlameGO commented 2 years ago

I see you're using a matrix.. but for what? A matrix for a single item is absolutely useless.

It’s what’s generated with the template setup file, I see no reason to replace it

CyberFlameGO commented 2 years ago

LGTM, you should probably also fix the check failures as well.

Check failures aren’t related to the build but more the security, as outlined in the code scanning results. I’d fix those, but they’re out of scope for this PR, and may need dismissal/suppression due to compatibility.

Sculas commented 2 years ago

Not sure why this wasn't merged yet, merging it now. Thank you!