-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Pull last changes #726
Pull last changes #726
Conversation
Base cypher queries rewrite
Add ACL object control queries and organize node tabs
Fix README.md headings
"Invoke-BloodHound -CollectionMethod ACLs"
I regret nothing
This PR addresses two issues with parsing Bolt responses: 1. The nature of OPTIONAL MATCH queries means there is a potential for returning "null" fields in a Bolt result. However, this raised errors when a null field was parsed for something like "identity.low" (which doesn't exist for a null field), so the graph wouldn't end up rendering. I've added some checks so that null fields are skipped and the other potential fields (Node, Relationship, Path) are still passed along for proper rendering. 2. The original logic would check the first field in the Bolt result for a certain property: `if (result._fields[0].hasOwnProperty('segments'))`. If it existed, then it would assume there was only one field in the result and it was a Path. If it didn't exist, then it would loop through each field and assume it was either a Node, Relationship, or Array with nested Node/Relationship fields. The problem arises when a query returns both a Path and some other field (Name/Relationship). For example, if the Path was listed as the first RETURN param, then it would be rendered and all other fields would be ignored. The opposite is also true -- if a Node/Relationship was listed as the first RETURN param, then any Path fields would be ignored. I've reordered some of the logic so that each field is parsed in turn instead of having a mutual exclusion between Path and Node/Relationship fields. I came across these while toying with some custom queries. As far as I can tell, none of the existing BloodHound queries use OPTIONAL MATCH or have a RETURN clause with both a Path and a Node/Relationship, so they shouldn't be affected by the current configuration. Merging this PR would be a boost for those using custom queries :)
Update to Bolt result parsing in Graph.jsx
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA 2 out of 11 committers have signed the CLA. |
No description provided.