Skip to content
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

[ BUG ] tar and update query not working in related RTR commands #427

Open
rootisareservedword opened this issue Oct 1, 2024 · 3 comments
Assignees
Labels
bug Something isn't working fix available Self-applied fix available in issue

Comments

@rootisareservedword
Copy link

rootisareservedword commented Oct 1, 2024

Command list inconsistencies in Real-time Response functions

Describe the bug
In the command lists of the Invoke-FalconAdminCommand and Invoke-FalconResponderCommand functions:

  1. The update install command is duplicated.
  2. The update query command is missing.
  3. The tar command is missing.

To Reproduce

  1. Examine the ValidateSet attribute of the $Command parameter in both Invoke-FalconAdminCommand and Invoke-FalconResponderCommand functions.
# Example for `Invoke-FalconAdminCommand`
(Get-Command Invoke-FalconAdminCommand).Parameters['Command'].Attributes | 
    Where-Object { $_ -is [System.Management.Automation.ValidateSetAttribute] } |
    Select-Object -ExpandProperty ValidValues
  1. Observe that update install is listed twice, while update query and tar are not present.

Expected behavior

  1. The update install command should appear only once in the ValidateSet.
  2. The update query command should be available.
  3. The tar command should be available.

Environment (please complete the following information):

  • OS: Windows 10
  • PowerShell: 5.1
  • PSFalcon: 2.2.7
@rootisareservedword rootisareservedword added the bug Something isn't working label Oct 1, 2024
@bk-cs bk-cs changed the title [ BUG ] Command list inconsistencies in RTR functions [ BUG ] Command list inconsistencies in RTR commands Oct 1, 2024
bk-cs added a commit that referenced this issue Oct 1, 2024
Added `tar` to valid `Command` list for `Invoke-FalconAdminCommand` and `Invoke-FalconResponderCommand`

Corrected `Invoke-FalconAdminCommand` to properly include the `Command` value `update query`
@bk-cs
Copy link
Collaborator

bk-cs commented Oct 1, 2024

Thank you for catching this! I have corrected this for the next PSFalcon release.

If you'd like to resolve it for your local module before release, you can replace public\real-time-response.ps1 using the steps outlined below.

Import-Module -Name PSFalcon
$ModulePath = (Show-FalconModule).ModulePath
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/CrowdStrike/psfalcon/b603fe7a395982a39aa09222a5ca08c221f62c06/public/real-time-response.ps1 -UseBasicParsing).Content > (Join-Path (Join-Path $ModulePath public) real-time-response.ps1)

Please ensure that you close and re-open PowerShell and re-import PSFalcon before testing.

@bk-cs bk-cs added the fix available Self-applied fix available in issue label Oct 1, 2024
@bk-cs bk-cs changed the title [ BUG ] Command list inconsistencies in RTR commands [ BUG ] tar and update query not working in related RTR commands Oct 1, 2024
@rootisareservedword
Copy link
Author

Awesome! Thanks, and glad to help!

@bk-cs
Copy link
Collaborator

bk-cs commented Oct 2, 2024

Leaving this issue open for people to apply the fix until the next release.

@bk-cs bk-cs reopened this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix available Self-applied fix available in issue
Projects
None yet
Development

No branches or pull requests

2 participants