grapl-security / grapl

Graph platform for Detection and Response
https://www.graplsecurity.com
Apache License 2.0
686 stars 78 forks source link

Fix bug where graph-merger updates have equal forward_edge_name/reverse edge_name. #2100

Closed wimax-grapl closed 2 years ago

wimax-grapl commented 2 years ago

Which issue does this PR correspond to?

none. discovered today

What changes does this PR make to Grapl? Why?

I noticed in analyzer logging that the Updates we were getting had the same value for forward/reverse. That's wrong!

The easiest way to get the reverse edge name is to forward it from graph-mutation, which already does that lookup (and caches it).

How were these changes tested?

Added an integration test!

codecov[bot] commented 2 years ago

Codecov Report

Base: 41.36% // Head: 41.37% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (10b2891) compared to base (d9d2e2d). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2100 +/- ## ========================================== + Coverage 41.36% 41.37% +0.01% ========================================== Files 406 406 Lines 9910 9910 ========================================== + Hits 4099 4100 +1 + Misses 5811 5810 -1 ``` | [Impacted Files](https://codecov.io/gh/grapl-security/grapl/pull/2100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security) | Coverage Δ | | |---|---|---| | [src/rust/graph-merger/src/service.rs](https://codecov.io/gh/grapl-security/grapl/pull/2100/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvZ3JhcGgtbWVyZ2VyL3NyYy9zZXJ2aWNlLnJz) | `0.00% <ø> (ø)` | | | [...rust-proto/src/graplinc/grapl/api/graph/v1beta1.rs](https://codecov.io/gh/grapl-security/grapl/pull/2100/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3QvcnVzdC1wcm90by9zcmMvZ3JhcGxpbmMvZ3JhcGwvYXBpL2dyYXBoL3YxYmV0YTEucnM=) | `50.81% <0.00%> (-0.33%)` | :arrow_down: | | [src/rust/sysmon-parser/src/util.rs](https://codecov.io/gh/grapl-security/grapl/pull/2100/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security#diff-c3JjL3J1c3Qvc3lzbW9uLXBhcnNlci9zcmMvdXRpbC5ycw==) | `41.33% <0.00%> (+1.33%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=grapl-security)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.