Repository navigation
velociraptor: fix label actions (stray quote after FROM scope()) (fixes #459) - #460
Open
chiefghost47 wants to merge 1 commit into
Open
chiefghost47 wants to merge 1 commit into
chiefghost47 wants to merge 1 commit into
Conversation
Shuffle#459) Remove the trailing single quote that made the three label queries invalid VQL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
add_client_label,get_client_labelandremove_client_labelnever do anything (#459). Each queryends with a stray single quote after
FROM scope():Velociraptor does not run the statement: the actions return
[], and no label is set, checked orremoved.
Fix
Remove the trailing
'from the three label queries. Nothing else changes.Testing
Against Velociraptor 0.77.3, calling the app's own methods in an image built with the repo's
Dockerfile:
add_client_labelreturns[]and the label is not on the client.add_client_labelsets the label ({"ClientId": ..., "Labels": [...], "Op": "set"}),get_client_labelreturns the check result, andremove_client_labelremoves it. Each step wasconfirmed by reading the client's labels afterwards.
The test image also carried #457 (org_id), so the calls could be run in a non-root org. This change
does not depend on it.
Fixes #459