GithubHelp home page GithubHelp logo

checkpointsw / policycleanup Goto Github PK

View Code? Open in Web Editor NEW
24.0 16.0 12.0 29 KB

Check Point PolicyCleanUp tool allows automatic cleanup of your policy based on hits count.

Python 100.00%
management-api

policycleanup's People

Contributors

chkp-roniz avatar chkp-royl avatar chkp-yaelg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

policycleanup's Issues

Change to rule

Hello,
First off I would like to say this tool is awesome and works great, but i think i found an issue with it. I noticed that if i make a change to the rule, but the hit count doesn't change, it doesn't add it as one of the rules to disable, even though it should be since the hitcount threshold is within the specified time for rules to be disabled.

I tested it with a rule that prior to me making a change was in teh disabled list, and then i made a change to the comments of the rule and installed database and then ran the tool again and it didn't add it to the disabled list.

help

Any idea what i'm doing wrong?

python policyCleanUp.py -op plan -r true

Traceback (most recent call last):
File "policyCleanUp.py", line 1118, in
main()
File "policyCleanUp.py", line 989, in main
check_validation_for_mds(client, user_args.domain)
File "policyCleanUp.py", line 935, in check_validation_for_mds
if int(api_res.data.get('total')) != 0:
AttributeError: 'NoneType' object has no attribute 'get'

show mdss API call from wrong context

The API call show-mdss used to work from any CMA (bug), and it's supposed to be called from the 'System Data' aka MDS domain only (fix).
Please fix the code to make the API call show-mdss against the 'System Data' domain.
Function: check_validation_for_mds
Thank you!

Code cleanup proposal

I am about to start using this program but I would need to add some functionality.
Currently the code is hard to read and work with because it does not follow the established formatting practises like PEP8.

Would you accept pull-requests to make the code better maintainable and expandable?
How long would it usually take to accept the pull-request?

I would like to help with:

  • Formatting to comply usual practise (PEP8). I suggest to use black at the beginning as there is no style established right now.
  • Move the documentation from comments to proper docstrings.
  • Change the application to a proper Python package installable by pip and executable by its name.
  • Split the large file to more easily maintainable modules.
  • Optionally remove obsolete code needed for unsupported Python 2.

'Install on' is an object group

When running this tool against a policy where the "install on" is an object group (rather than a gateway) all rules in this policy are skipped.

R77.xx did not allow an object group in the install on field but since R80.xx it is allowed.

Missing meta data

Dear Developer,

For readability and Search Engine Optimization (SEO) it would be great if you could do the followings:

  • Please provide more than 8 words in the "About" field

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.