PaloAltoNetworks / PaloAltoNetworks/pan-os-python
rulebase overwriting object that weren't pulled
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 400
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
I'm using version 0.6.6 and Python3
Is it normal that when you are pulling the security rule
rulebase = pandevice.policies.Rulebase()
fw.add(rulebase)
current_security_rules = pandevice.policies.SecurityRule.refreshall(
rulebase)
You are performing modification on the ruleset and then you rulebase.apply() and fw.apply()
That you are loosing all the other configuration that you didn't pull into the current rulebase ?
I got a case where I did a lot of modification to the security rule and then all the nat rule disappeared from the firewall.
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 with pandevice.policies.Rulebase, SecurityRule.refreshall, and the rulebase.apply()/fw.apply() sequence described in the report. Reproduce the behavior on version 0.6.6 with security and NAT rules present, then trace how applying a partially refreshed rulebase handles objects that were not pulled. Done means unrelated NAT configuration is preserved, with regression coverage added if the project provides a suitable test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100