Describe the bug
In Get-FalconAsset -Id <Asset ID>, there is a regex string handler before it is passed to API for data retrieval. The regex expression is ^[a-fA-F0-9]{32}_\w+$. Whilst some Asset ID coming from Active Directory provider may not match this regex formula. I will give an example here:
0b<CID-REDACTED>dd_ATDufiR7TJI4MGwW4ipsTCV2UXvNC3fiTjBPadcJ-l3l4A
^ Notice there is a hyphen '-' in the near-end of the string. Once run with the PS command it will return with error code saying Asset ID doesn't match the regex ^[a-fA-F0-9]{32}_\w+$.
0b<CID-REDACTED>dd_ATDqgLNM4lEx3__TXQ4fNiKbpptkdVDXQQ_J2YuyPHQugQ
^ This one doesn't have a hyphen thus the PS command will work.
To Reproduce
Run the following command, replace with a valid asset ID. The asset ID must have a hyphen in it to trigger the bug:
Get-FalconAsset -Id <Asset ID>
Expected behavior
The regex notation should be ^[a-fA-F0-9]{32}_[\w\-]+$ instead to also capture hyphen character in the asset ID.
Environment (please complete the following information):
Describe the bug In
Get-FalconAsset -Id <Asset ID>
, there is a regex string handler before it is passed to API for data retrieval. The regex expression is^[a-fA-F0-9]{32}_\w+$
. Whilst some Asset ID coming from Active Directory provider may not match this regex formula. I will give an example here:0b<CID-REDACTED>dd_ATDufiR7TJI4MGwW4ipsTCV2UXvNC3fiTjBPadcJ-l3l4A
^ Notice there is a hyphen '-' in the near-end of the string. Once run with the PS command it will return with error code saying Asset ID doesn't match the regex ^[a-fA-F0-9]{32}_\w+$.0b<CID-REDACTED>dd_ATDqgLNM4lEx3__TXQ4fNiKbpptkdVDXQQ_J2YuyPHQugQ
^ This one doesn't have a hyphen thus the PS command will work.To Reproduce Run the following command, replace with a valid asset ID. The asset ID must have a hyphen in it to trigger the bug:
Get-FalconAsset -Id <Asset ID>
Expected behavior The regex notation should be
^[a-fA-F0-9]{32}_[\w\-]+$
instead to also capture hyphen character in the asset ID.Environment (please complete the following information):
Additional context
Transcript content