opencti
opencti copied to clipboard
[backend] validate elUpdateElement input value against schema before indexing (#5696)
Proposed changes
- insert a validation step at the start of engine
elUpdateElementfunction - validate the payload before indexing, against the schema
Related issues
- #5696
Codecov Report
Attention: Patch coverage is 91.91919% with 8 lines in your changes are missing coverage. Please review.
Project coverage is 66.71%. Comparing base (
d793a45) to head (ba1f957). Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #6046 +/- ##
==========================================
+ Coverage 66.67% 66.71% +0.04%
==========================================
Files 541 541
Lines 64420 64501 +81
Branches 5256 5288 +32
==========================================
+ Hits 42950 43033 +83
+ Misses 21470 21468 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This seems like a valid input yes. I'll investigate to see how it comes this payload is produced. If it's a valid payload, it's a bug on the validation process. Otherwise... Maybe we do not handle objectpath on multiple like that (only on indexed path).
I've pushed a commit to allow such case @lndrtrbn, and added some integration tests.