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(codeql): restrict code scanning to src folder #623

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Oct 24, 2023

CodeQL currently scans dist folder which contains source code not introduced by this repository and could trigger false-positives. This should only scan src folder per https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#specifying-directories-to-scan

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@@ -37,6 +37,9 @@ jobs:
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config: |
paths:
- src

Choose a reason for hiding this comment

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

probably makes sense to remove lines :10 and :15 as well, to not trigger this action redundantly

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we still need these so CodeQL is triggered when dist has changed, which means a dependency in package.json has been updated and therefore might change the behavior of the project.

Choose a reason for hiding this comment

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

:ack ok that makes sense to me. Thanks!

@crazy-max crazy-max merged commit 7137ecb into docker:master Oct 24, 2023
8 checks passed
@crazy-max crazy-max deleted the fix-codeql-config branch October 24, 2023 16:45
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.

None yet

2 participants