Description

Junos devices log a CSCRIPT_SECURITY_WARNING message in the system log file, or the Python script fails to run with return -1.

Symptoms

Feb 5 16:23:34 prd-sw-isp-01.db4 cscript: CSCRIPT_SECURITY_WARNING: unsigned python script '/var/db/scripts/event/auto_ddos.py' without checksum is executed

Solution

We recommend that you configure a checksum to verify the integrity of Python scripts. To specify a checksum for a local script, configure the checksum statement under the [file filename] statement in the hierarchy for your specific type of script. To specify a checksum for a remote op script, include the key argument when you execute the script using the op url command. Starting in Junos OS Release 18.2R2 and 18.3R1, if you execute an unsigned Python script that does not have a checksum configured, Junos devices log a CSCRIPT_SECURITY_WARNING message in the system log file.

 

Note: If the Python script not running with return -1, that will be due to a syntax error in the code.

Modification History

2024-03-03 : Article Created