PaloAltoNetworks / pan-os-php

Framework and utilities to easily manage and edit Palo Alto Network PANOS devices
ISC License
72 stars 15 forks source link

Include URL Category for action:exportToExcel in type=rule #784

Closed taddairpanw closed 10 months ago

taddairpanw commented 11 months ago

Is your feature request related to a problem?

This should be an easy feature to implement. In the action "exportToExcel" in the type=rule util, the current behavior of the output does not include URL category if a URL category is referenced in policy. If leveraging exportToExcel as an auditing tool, a rule may show as "any destination" but URL categories may be referenced. This could skew the results of the audit.

Describe the solution you'd like

Please add an additional column to the exportToExcel behavior in type=rule to include the URL category field. There is already a capability to filter on URL categories, so I would imagine this should be a quick fix.

Describe alternatives you've considered

I could pull information manually but why would I do that when there is such a robust framework such as pan-os-php? :)

Additional context

I am currently doing a policy analysis for a customer and I noticed URL category was missing from the excel output when I saw a rule titled "whitelisted sites" that matched one of my filters for policies of interest.

Please let me know if you need further information and thank you for the continued development of such a great tool!

swaschkut commented 11 months ago

thanks for bringing this to my attention

url-category is a matching criteria same as user info, so now actions=exporttoexcel has a fixed column 'url-category'.

actual available in docker develop container: docker run --name panosphp --rm -v ${PWD}:/share -it swaschkut/pan-os-php:develop

pan-os-php type=rule in=input_config.xml location=any actions=exporttoexcel:url_cat.html

this will be published to "latest" in the beginning of next week

swaschkut commented 10 months ago

785 FR introduced