Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidatable_addresses_and_groups: Error when examining NAT rules #57

Open
desh130 opened this issue Oct 4, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@desh130
Copy link

desh130 commented Oct 4, 2023

:\Pan_Cleaner>pan_analyzer --xml 4412.xml
palo_alto_firewall_analyzer - INFO - Running validators
palo_alto_firewall_analyzer.validators.bad_hostnames - INFO - ********************************************************************************

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\desh1\AppData\Roaming\Python\Python311\site-packages\palo_alto_firewall_analyzer\validators\consolidatable_addresses_and_groups.py", line 172, in replace_policy_contents
if object_policy_dict[translation].get('static-ip', {}).get('translated-address', {}).get('member'):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'

C:\Pan_Cleaner>

@moshekaplan
Copy link
Owner

It appears that object_policy_dict[translation] is returning a string, instead of a dict. I will try to look into this when I return from vacation next week.

@moshekaplan moshekaplan changed the title Getting error while iterating consolidatable_addresses_and_groups: Error when examining NAT rules Oct 13, 2023
@moshekaplan
Copy link
Owner

I've created a new release with additional debugging. Could you re-run pan_analyzer with --debug appended and paste the object's information from the bottom of the debug file, after the crash?

@moshekaplan moshekaplan added the bug Something isn't working label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants