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

ci: Add CodeQL analysis #3700

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Conversation

IvanGoncharov
Copy link
Member

Motivation: codeql are quite popular now, moreover various projects use it
as metric on how secure certain OSS project is. Example: https://github.com/
ossf/scorecard/blob/main/docs/checks.md#sast
Also, it can uncover some real security issues both in our sorce code and GitHub
workflows.

So I don't see a lot of harm by enabling it, we can always ignore certain files
or disable it completely.

Fixes #3162

@netlify
Copy link

netlify bot commented Aug 16, 2022

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit 6e7090e
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/630c96831b73c30008afbb5c
😎 Deploy Preview https://deploy-preview-3700--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

Hi @IvanGoncharov, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@IvanGoncharov IvanGoncharov force-pushed the pr_branch4 branch 5 times, most recently from 365ac4d to 9d2713f Compare August 18, 2022 09:17
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Aug 18, 2022
Extracted from graphql#3700

CodeQL correctly reported that we using user supplied data in our scripts
that can lead to shell injection.
Running those scripts on untrusted PRs both locally and on CI can be problematic
Note I reviewed all places and none of them can be exploited but it good practice
to switch to spawnSync if we can.
Aditional benefit it automatically solves all the issues with command arguments
being misenterpritade by the shell.
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Aug 21, 2022
Extracted from graphql#3700

CodeQL correctly reported that we using user supplied data in our scripts
that can lead to shell injection.
Running those scripts on untrusted PRs both locally and on CI can be problematic
Note I reviewed all places and none of them can be exploited but it good practice
to switch to spawnSync if we can.
Aditional benefit it automatically solves all the issues with command arguments
being misenterpritade by the shell.
Motivation: codeql are quite popular now, moreover various projects use it
as metric on how secure certain OSS project is. Example: https://github.com/
ossf/scorecard/blob/main/docs/checks.md#sast
Also, it can uncover some real security issues both in our sorce code and GitHub
workflows.

So I don't see a lot of harm by enabling it, we can always ignore certain files
or disable it completely.

Fixes graphql#3162
@IvanGoncharov IvanGoncharov merged commit 29bf39f into graphql:main Aug 29, 2022
@IvanGoncharov IvanGoncharov deleted the pr_branch4 branch August 29, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant