tenable/pyTenable

agent_name is not a filterable option

ButlerJoseph opened this issue · 5 comments

Describe the bug
Unable to use the agent_name filter when editting or creating tags.

To Reproduce
Steps to reproduce the behavior:

  1. tio.tags.edit(tag_uuid, [("agent_name", "eq", "hostname"]
  2. agent_name is not a filterable option

Expected behavior
I can use agent_name as a filter on the website frontend and when querying tio.tags.details(tag_uuid) I can see that it is set.

System Information (please complete the following information):
Using pyTenable 1.4.13

The supported filter options from the API are as follows (below). The UI has some additional filters as it does some filters on the data client-side.

>>> for filter_name in tio.filters.asset_tag_filters().keys():
...     print(filter_name)
...
tenable_uuid
mac_address
netbios_name
fqdn
operating_system
property_list
aws_ec2_instance_id
aws_ec2_instance_ami_id
aws_owner_id
aws_region
aws_availability_zone
aws_vpc_id
aws_ec2_instance_type
aws_ec2_instance_state_name
aws_ec2_instance_group_name
aws_subnet_id
aws_ec2_product_code
aws_ec2_name
azure_vm_id
azure_resource_id
gcp_project_id
gcp_zone
gcp_instance_id
qualys_asset_id
qualys_host_id
servicenow_sysid
has_plugin_results
ipv4
installed_software
ipv6
asset_assessed
network_id
sources

Closing as there was no response

@SteveMcGrath Following up on this, I've been trying to apply some filters on tags but am finding that my filters are being categorized as legacy_filters and when I save things like "Licensed equals Yes" in the UI, the details show ('is_licensed', 'eq', 'true') but I can't seem to figure out how I set the non-legacy filters? I'd like to make sure I can filter on Licensed as well but get a similar error to the OP. Any help is appreciated.

I'd need more context here. what APIs are you querying, how are you querying them, etc.

@SteveMcGrath Yeah my bad, I've filed #768 with background information.