PaloAltoNetworks / PaloAltoNetworks/pan.dev
Issues with asset types in "Get Vulnerable Assets by RQL"
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 78
- Forks
- 88
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 18
Description
Describe the bug
In the Get Vulnerable Assets by RQL endpoint, some asset types return error 400 unless they're written with spaces instead of camel case, while others always return an error
Expected behavior
Asset types following the documented strings should return the assets accordingly.
Current behavior
-
The following
assetTypestrings return error 400invalid_rql_query: Invalid asset type value, while the equivalent strings with spaces return the expected output:serverlessFunctionvsserverless functiondeployedImagevsdeployed imagevmImagevsvm image
-
registryImagereturns invalid type regardless of how it's spelled -
iacreturns error 500
Possible solution
Make the implementation follow the current docs (use camel case and allow filtering for registryImage and iac
Steps to reproduce
- Send a request to
list-vulnerable-assetswith any of the reportedassetTypestrings - Verify the error on response
Context
Causing error in our integration when using the expected strings
Your Environment
- Version used:
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
- Operating System and version (desktop or mobile):
- Link to your project:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the documented Get Vulnerable Assets by RQL endpoint and reproduce each reported assetType request. Trace the endpoint implementation to determine why camel-case values fail and why registryImage and iac error. Done means the documented camel-case values work and registryImage and iac return filtered assets without errors.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100