About Script Security

The Script and Python Script operators can trigger undesirable automation scripts. To preserve the integrity of your data, detecting and reviewing potentially unsafe scripts is important.

This page discusses:

Context

Executing a script grants Read and Write permissions to your machine’s file-system. This can also send data via the network. These capabilities improve your productivity but they also present a risk. When you import a model created by an untrusted party, or when you paste nodes that contain scripts, the script execution can be automatic and can lead to unwanted actions.

Therefore, it is highly recommended to customize the Script Security Management options to review, authorize, or block scripts before their execution.

Preferences Customization

The Script Security Management options are available in Me > Preferences > App Preferences > 3D Modeling > Multi Discipline Automated Engineering > Basics > Parameters & Relations.

Related Scripts

Your Script Security Management preference applies to:

  • EKL scripts that call VBScript
  • Python scripts

Note: User operators can directly or indirectly include Script or Python Script operators. When a user operator contains at least one unsafe script, it is entirely considered as unsafe. Therefore, authorizing or blocking a script applies to all operators within the user operator.

Behavior

The following table describes the behavior of each option:

Option Description
Enable All Scripts Execution All scripts are considered to be secured and no checks are performed for unsecured scripts.

this option is selected.

Ask First Time On Each Script Execution The first time an unsafe operator is executed, the Script Execution Warning dialog box appears.

Clicking Yes authorizes the script, clicking No blocks the script.

Notes:
  • If you execute a user operator containing several unsafe operators, the warning applies to the entire user operator.
  • When this option is selected, new scripts created during the session are automatically authorized.
Show Scripts Panel On Open Each time you open a document containing scripts (product, part, etc.), the Script Security Report panel appears.

The panel lists all the features that contain potentially unsecured scripts.

Clicking Enable authorizes the script, clicking Disable blocks the script.

Note: When this option is selected:
  • New scripts created during the session are automatically authorized.
  • The Script Security Report dialog box appears when new scripts are added in user operators or when they are pasted, letting you authorize or block their execution.
Disable All Scripts Execution All existing scripts are blocked.
Note: When this option is selected, new scripts created during the session are automatically authorized.

Notes:
  • When a node containing a script is duplicated, the duplicated node inherits the same status as the initial node.
  • It is impossible to change an authorization status once it is defined.
  • It is impossible to select another option unless you close your current session.
  • When an operator is blocked, its node appears "in error", and a warning message is displayed:

Important: Script security management is session-dependent. Thus, the authorized and blocked status:
  • Are lost when you close the editor or your session
  • Need to be checked again when you reopen the editor or the session
Recommendation: Modifying a script does not modify its authorization status. Beware when editing scripts, especially if you use code from unsafe sources.