Skip to content

Commit 24906d3

Browse files
author
git_repo_user
committed
Updates based on coderabbit
1 parent 902ed95 commit 24906d3

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

source/includes/groovy-sandbox-configuration.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
When a Groovy script is executed all code is validated against either a whitelist of allowed expressions and/or a blacklist
2-
of insecure expressions, depending on what is used by your installation, to prevent code that could compromise the system.
1+
When a Groovy script is executed, all code is validated to prevent operations that could compromise the system.
2+
Depending on your installation, validation may use a whitelist (allowed expressions), a blacklist (blocked expressions),
3+
or both. If both are enabled, an expression must be allowed by the whitelist and must not match the blacklist.
34

4-
When you try to execute a script that contains insecure expressions from the blacklist, or contains an expression not in
5-
the whitelist depending on your configuration, you will see an error similar to this:
5+
When you try to execute a script that contains an expression not included in the whitelist, or an expression blocked by
6+
the blacklist , you’ll see an error similar to the following:
67

78
.. code-block:: none
89
:caption: *Error message encountered for scripts containing insecure expressions*
@@ -11,7 +12,7 @@ the whitelist depending on your configuration, you will see an error similar to
1112
1213
|
1314
14-
It is recommended to keep the default configuration if possible. However, if access to one or more of the blacklisted
15+
It is recommended to keep the default configuration. However, if access to one or more of the blacklisted
1516
expressions is required, or access to one or more expressions not in the whitelist is required, it is possible to
1617
override the blacklist and/or whitelist configuration. Configuration is global and affects all scripts on the server.
1718

source/reference/modules/deployer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ To use a custom whitelist follow these steps:
10321032

10331033
``CRAFTER_HOME/bin/crafter-deployer/groovy/whitelist``
10341034

1035-
#. Remove or comment (adding a ``#`` at the beginning of the line) or add the expressions that your scripts require
1035+
#. Add, remove or comment (adding a ``#`` at the beginning of the line) the expressions that your scripts require
10361036
#. Update the ``application.yaml`` configuration file to load the custom whitelist:
10371037

10381038
.. code-block:: yaml
@@ -1070,7 +1070,7 @@ To disable the whitelist for all targets update the ``application.yaml`` configu
10701070
whitelist:
10711071
# Indicates if the whitelist should be enabled for all targets
10721072
# (this will have no effect if the sandbox is disabled)
1073-
enabled: true
1073+
enabled: false
10741074
10751075
10761076
"""""""""""""""""""

source/reference/modules/engine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3831,7 +3831,7 @@ To use a custom whitelist follow these steps:
38313831
38323832
``CRAFTER_HOME/bin/apache-tomcat/shared/classes/crafter/engine/extension/groovy/whitelist``
38333833
3834-
#. Remove or comment (adding a ``#`` at the beginning of the line) or add the expressions that your scripts require
3834+
#. Add, remove or comment (adding a ``#`` at the beginning of the line) the expressions that your scripts require
38353835
#. Update the :ref:`server-config.properties <engine-configuration-files>` configuration file to load the custom whitelist:
38363836
38373837
.. code-block:: properties

source/reference/modules/studio.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5248,14 +5248,14 @@ To use a custom whitelist follow these steps:
52485248

52495249
``CRAFTER_HOME/bin/apache-tomcat/shared/classes/crafter/studio/extension/groovy/whitelist``
52505250

5251-
#. Remove or comment (adding a ``#`` at the beginning of the line) the expressions that your scripts require
5251+
#. Add, remove or comment (adding a ``#`` at the beginning of the line) the expressions that your scripts require
52525252
#. Update the ``studio-config-override.yaml`` configuration file to load the custom whitelist:
52535253

52545254
.. code-block:: yaml
52555255
:caption: *CRAFTER_HOME/bin/apache-tomcat/shared/classes/crafter/studio/extension/studio-config-override.yaml*
52565256
52575257
# The location of the default whitelist to use (this will have no effect if the sandbox is disabled)
5258-
studio.scripting.sandbox.blacklist.path: classpath:crafter/studio/groovy/whitelist
5258+
studio.scripting.sandbox.whitelist.path: classpath:crafter/studio/groovy/whitelist
52595259
52605260
#. Restart CrafterCMS
52615261

0 commit comments

Comments
 (0)