Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #429 +/- ##
==========================================
+ Coverage 75.22% 75.25% +0.02%
==========================================
Files 42 42
Lines 3496 3496
==========================================
+ Hits 2630 2631 +1
+ Misses 866 865 -1
|
mathialo
left a comment
There was a problem hiding this comment.
This is a good change, but it is going to result in a breaking change in every extractor using the utils, so we need to be a bit careful when releasing this.
@mathialo Yep I fully agree with this. I will include a version bump with valid release notes for the same. If the changes to address this look good then I will make the version changes as well. |
|
@eighty20results I was hoping you could take a look at the security changelog. |
|
@eighty20results the changes you requested have been made. |
…-of-dotenv-usage-in-cognite-extractor-utils
…tor-utils into DOG-4924-investigate-security-implications-of-dotenv-usage-in-cognite-extractor-utils
|
@mathialo no issues at all. I have updated the version. If this looks good, we can get the maturity-review/risk-review also involved. |
|
Is it feasible to add testing for this? |
In general, anything happening in the startup phase of extractors like this is really hard to unit test, for many reasons such as
With the new rewrite of the utils for next-gen extractors, we are working to decompose some parts of the extractor runtime to make single parts easier to test, but there will still be areas that are just not really possible to unit test without so much monkeypatching and mocking that the test itself becomes meaningless. For changes like this we are much more dependent on manual testing and thorough reviews. |
I have added information as part of the Jira ticket itself.
Primarily we want to avoid the usage of
find_dotenvsince it recursively traverses to root in search of .env file. There is no way for us to limit this search. It is safer measure to stop looking if we don't find anything in the current directory.This will involve a major version bump primarily because I think this is a breaking change and needs to be communicated accordingly to customers as well.