PaloAltoNetworks / PaloAltoNetworks/pan.dev

Issues with asset types in "Get Vulnerable Assets by RQL"

Open
#1,072 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. The following assetType strings return error 400 invalid_rql_query: Invalid asset type value, while the equivalent strings with spaces return the expected output:

    • serverlessFunction vs serverless function
    • deployedImage vs deployed image
    • vmImage vs vm image
  2. registryImage returns invalid type regardless of how it's spelled

  3. iac returns error 500

Possible solution

Make the implementation follow the current docs (use camel case and allow filtering for registryImage and iac

Steps to reproduce

  1. Send a request to list-vulnerable-assets with any of the reported assetType strings
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.