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

CodeQL fixes #102

Merged
merged 10 commits into from
Sep 13, 2021
Merged

CodeQL fixes #102

merged 10 commits into from
Sep 13, 2021

Conversation

mbien
Copy link
Member

@mbien mbien commented Aug 27, 2021

This PR closes some (~14) CodeQL alerts.

Most of them could be fixed by restructuring the code a little.

75ba795 changes the config so that JS alerts don't show up three times.

I am thinking about closing two additional alerts manually:

bonus:
96810ea is a unrelated fix, 188e201 sets JS produced cookies to https and "SameSite" by default

This is technically not needed, but CodeQL thinks those variables are client provided Strings,
since one code path leads to the InitFilter. We do it anyway to fix 3 alerts + its trivial.
CodeQL doesn't understand validation which is happening *after* Files or Paths are created.
Rewriting the method a little bit solves that + its now using Path instead of File.
this requires unfortunately another config file since path settings
can't be set in the workflow config.
see github/codeql-action#283
@mbien mbien marked this pull request as ready for review August 29, 2021 05:28
Copy link
Contributor

@snoopdave snoopdave left a comment

Choose a reason for hiding this comment

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

Some very nice simplifications and fixes in here!

@mbien mbien merged commit 440ef70 into apache:master Sep 13, 2021
@mbien
Copy link
Member Author

mbien commented Sep 13, 2021

@snoopdave thanks for taking a look. As mentioned in the PR I just manually closed the two additional CodeQL alerts.

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.

2 participants