LOGBOOK

HELP

Quiz Entry - updated: 2026.11.26

What does cp_mgmt_run_script do, and why is it a powerful (and dangerous) capability?

It makes the management server run a shell script on a list of target machines (gateways and the management server itself) and returns their output; whoever can call it can execute arbitrary commands on the firewalls.

    - name: scripts - list files under / dir
      check_point.mgmt.cp_mgmt_run_script:
        script_name: 'List files under / dir'
        script: ls -l /
        targets:
          - A-SMS
          - A-GW
      register: data_dirs

targets are object names (or UIDs) of managed Check Point machines. The management server delivers the script over its trusted SIC channel, each target runs it, and the outputs come back as one result per target.

This is what makes it useful: anything you could type on a gateway's shell (show the routing table, read a config file, check an interface) can be collected from all gateways in one playbook run, without SSH access to each box.

It is also why the right to run scripts must be guarded. It gives shell access to every security gateway, below the level of the policy. Restrict it to dedicated automation accounts with suitable permission profiles, keep credentials in a vault, and treat the script content like code (reviewed, version-controlled).

Go deeper:

From Quiz: ITIA / Network Automation with Ansible and a Check Point Firewall | Updated: Nov 26, 2026