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

Create codeql-analysis.yml #1961

Merged
merged 1 commit into from
Jun 16, 2021
Merged

Create codeql-analysis.yml #1961

merged 1 commit into from
Jun 16, 2021

Conversation

jfcg
Copy link
Contributor

@jfcg jfcg commented Apr 12, 2021

Add Github CodeQL security checks for Go.

@CLAassistant
Copy link

CLAassistant commented Apr 12, 2021

CLA assistant check
All committers have signed the CLA.

@jfcg
Copy link
Contributor Author

jfcg commented Apr 13, 2021

Btw in my fork under /security/code-scanning I see:
k6

You can see merge scan results here

@na--
Copy link
Member

na-- commented Apr 19, 2021

@jfcg, thanks for submitting this PR and sorry for the delay in responding! 😞 We are still unsure if we'd like to integrate CodeQL, since we already have extensive linter coverage for our Go code via golangci-lint. Besides, most of the results from this scan I can see are false-positives in our JS examples, for example:
https://github.com/k6io/k6/blob/47a0b493cce0020d445a47edbca79c25ab5a550f/cmd/testdata/example.js#L81
https://github.com/k6io/k6/blob/47a0b493cce0020d445a47edbca79c25ab5a550f/samples/graphql.js#L4

So, before we can merge this, it will have to be configured to check only Go code, not JavaScript... Though the 2 Incomplete regular expression for hostnames issues in our Go code that were caught are valid and golangci-lint doesn't seem to be able to catch them, so there is some value in this service 🎉

@jfcg
Copy link
Contributor Author

jfcg commented Apr 19, 2021

simplified the codeql file, includes only Go checks

@na-- na-- added this to the v0.33.0 milestone Apr 20, 2021
Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Thanks! Why did you remove the pull_request build trigger?

@jfcg
Copy link
Contributor Author

jfcg commented Apr 20, 2021

Thanks! Why did you remove the pull_request build trigger?

Analysis takes some time and most projects I have contributed CodeQL patches/configurations preferred only on pushes. This is the leanest codeql configuration, but of course if you prefer they can also be added.

Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

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

Sorry for the delay here, I forgot to circle back and merge this 😞

@na-- na-- merged commit b1d2528 into grafana:master Jun 16, 2021
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.

4 participants