Regex Security Settings

OL Connect Automate nodes support configurable regex security levels to protect against potentially unsafe regular expression patterns.

Adding this protection requires editing the olca.settings.json file.

By default, Node-RED stores configuration in the settings.js file. In OL Connect Automate, these settings are externalized to olca.settings.json. This prevents overwrites during updates or reinstalls, and ensures that your custom configurations, such as Project and Git settings, remain intact across software upgrades. For a default Automate installation, these files are found in the following location:

C:\ProgramData\Objectif Lune\OL Connect Automate

Configure regex security

To configure regex security levels, add the following code to your settings file. Enter the appropriate security level option, referring to the details and recommendations below.

Copy
```javascript
module.exports = {
  olConnectAutomate: {
    security: {
      regex: "moderate"  // Options: "none", "moderate", "strict"
    }
  }
}
```

Security Level Options

  • none (default): No validation or restrictions on regex patterns. All patterns are allowed.

  • moderate: Validates patterns and logs warnings for potentially unsafe patterns that could cause performance issues. Patterns are still allowed to execute, but warnings are logged to help identify potential problems during development.

  • strict: Blocks unsafe patterns that could cause performance issues or security vulnerabilities. Patterns that fail validation will throw an error and prevent execution.

Recommendations

  • Enter none for maximum compatibility when regex security is not a concern.

  • Enter moderate during development to identify potential pattern issues while maintaining functionality.

  • Enter strict in production environments for maximum security and protection.

Limitations

  • This feature applies to nodes in the OL Connect package. For more about node packages, see OL Connect Automate packages.

  • This feature applies to nodes which use regular expressions, such as folder capture and folder operations.

Note: Save the changes to the file and restart Automate to apply this security to the nodes.