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: improve CodeQL workflow #497

Merged
merged 3 commits into from
Feb 13, 2024
Merged

ci: improve CodeQL workflow #497

merged 3 commits into from
Feb 13, 2024

Conversation

ybiquitous
Copy link
Member

Which issue, if any, is this issue related to?

None.

Is there anything in the PR that needs further explanation?

@ybiquitous ybiquitous marked this pull request as ready for review February 8, 2024 18:42
@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.

@adalinesimonian
Copy link
Member

Doesn't setting up Node.js and installing dependencies means CodeQL can both check to ensure that our current dependencies don't have any vulnerabilities either, as well as analyse bad patterns in their use?

@ybiquitous
Copy link
Member Author

I think we should rely on Dependabot alerts, not Code scanning alerts. If security issues were found by CodeQL, we couldn't fix them ourselves.

@adalinesimonian
Copy link
Member

Certainly agree with you there, but doesn't CodeQL check to see that how the code from the dependencies is used in the application doesn't constitute a security issue-prone pattern? Or is this based off of a misunderstanding of mine?

@ybiquitous
Copy link
Member Author

In my understanding, since CodeQL is a static analysis tool, it should not need library codes. For example, if the following code using some library is insecure,

import insecure from "insecure";

insecure("Dangerous!");

CodeQL should detect such a malicious code pattern without installing the library.

I tried searching for dependency installation examples in CodeQL's actual use cases, but I couldn't find them.
https://github.com/search?q=%22javascript-typescript%22+language%3AYAML+path%3A.github%2Fworkflows%2F&type=code

@adalinesimonian
Copy link
Member

In my understanding, since CodeQL is a static analysis tool, it should not need library codes. For example, if the following code using some library is insecure,

import insecure from "insecure";

insecure("Dangerous!");

CodeQL should detect such a malicious code pattern without installing the library.

I tried searching for dependency installation examples in CodeQL's actual use cases, but I couldn't find them. https://github.com/search?q=%22javascript-typescript%22+language%3AYAML+path%3A.github%2Fworkflows%2F&type=code

All I could find is some information on installing Python dependencies before running CodeQL, but I can't find anything either that applies to a TS/JS environment.

Copy link
Member

@adalinesimonian adalinesimonian left a comment

Choose a reason for hiding this comment

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

LGTM

@ybiquitous ybiquitous merged commit 0ed8966 into main Feb 13, 2024
9 checks passed
@ybiquitous ybiquitous deleted the improve-codeql-workflow branch February 13, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants