Skip to content

Restrict script language versions #1063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,21 @@ Enables the execution of custom scripts or code within a workflow, empowering wo

| Name | Type | Required | Description |
|:--|:---:|:---:|:---|
| language | `string` | `yes` | The language of the script to run |
| language | `string` | `yes` | The language of the script to run.<br>*Supported values are: [`js`](https://tc39.es/ecma262/2024/) and [`python`](https://www.python.org/downloads/release/python-3131/).* |
| code | `string` | `no` | The script's code.<br>*Required if `source` has not been set.* |
| source | [externalResource](#external-resource) | `no` | The script's resource.<br>*Required if `code` has not been set.* |
| arguments | `map` | `no` | A list of the arguments, if any, of the script to run |
| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured script process |

> [!WARNING]
> To ensure cross-compatibility, Serverless Workflow strictly limits the versions of supported scripting languages. These versions may evolve with future releases. If you wish to use a different version of a language, you may do so by utilizing the [`container process`](#container-process).

**Supported languages**
| Language | Version |
|:-----------|:---------:|
| `JavaScript` | [`ES2024`](https://tc39.es/ecma262/2024/) |
| `Python` | [`3.13.x`](https://www.python.org/downloads/release/python-3131/) |

###### Examples

```yaml
Expand Down
6 changes: 4 additions & 2 deletions dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ When the evaluation of an expression fails, runtimes **must** raise an error wit
| workflow | [`workflowDescriptor`](#workflow-descriptor) | Describes the current workflow. |
| runtime | [`runtimeDescriptor`](#runtime-descriptor) | Describes the runtime. |

⚠️ **Warning**: Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.
> [!WARNING]
> Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.

##### Runtime Descriptor

Expand Down Expand Up @@ -407,7 +408,8 @@ The following table shows which arguments are available for each runtime express
| Task `export.as` | Transformed task output | `$context` | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Workflow `output.as` | Last task's transformed output | Transformed workflow output | ✔ | | | ✔ | | ✔ | ✔ | |

⚠️ **Warning**: Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.
> [!WARNING]
> Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.

### Fault Tolerance

Expand Down
Loading