-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
fix(QueryContext): validation does not validate query_context metrics #16991
fix(QueryContext): validation does not validate query_context metrics #16991
Conversation
3e60a75
to
e7b3539
Compare
Codecov Report
@@ Coverage Diff @@
## master #16991 +/- ##
==========================================
+ Coverage 67.10% 68.43% +1.33%
==========================================
Files 1609 1590 -19
Lines 64897 65082 +185
Branches 6866 6963 +97
==========================================
+ Hits 43547 44542 +995
+ Misses 19484 18650 -834
- Partials 1866 1890 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
84282d9
to
c92e08e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract until you can't
e6bd829
to
8038b79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
Feature introduced here will enforce datasource access on custom SQL expression of metrics
@villebro we should add column in a follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR - it's bumping up security! I don't see any tests, however. Also, there's a lot of single line methods in the ContextValidator. Can we compress those a bit? Too much delegation makes the code a bit hard to follow along with.
b6fbe51
to
7201bd3
Compare
7201bd3
to
fb7bfa2
Compare
@craig-rueda @hughhhh @jayakrishnankk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass comments. I think this is a great improvement to the security model, but I'm concerned this may cause false positives (I did a similar change some time ago, which caused unpleasant regressions due to triggering false positives in edge cases that hadn't been thought of in the original PR). To make rolling out new security improvements less problematic, I would almost consider introducing (yet another) feature flag "SECURITY_BETA" where new security improvements can be introduced and kept until more comprehensive testing has been done.
90dbeaf
to
5f45fc1
Compare
@craig-rueda - requesting review. bumping this. |
- put new validation under FF - consistency with naming convention - remove global pylint disable
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
04b1537
to
3d204e6
Compare
98e7b63
to
90ac808
Compare
# Conflicts: # tests/integration_tests/charts/data/api_tests.py
SUMMARY
close
continue in #19753