{"version":"2.1.163","anchor":"workflow-script-static-validation-via-ast","canonical_anchor":"workflow-script-static-validation-via-ast","heading":"Workflow Script Static Validation via AST","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.163\/e\/workflow-script-static-validation-via-ast","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.163","markdown":"### Workflow Script Static Validation via AST\n\n**What**\n\nWorkflow scripts are now parsed with the Acorn JavaScript parser (including the `acorn-walk` tree traversal library) for accurate static validation before execution.\n\n**Details**\n\n- `'with' statements` are rejected: `SyntaxError: 'with' statements are not supported in workflow scripts.`\n- `'await using' declarations` are rejected: `SyntaxError: 'await using' declarations are not supported in workflow scripts.`\n- Identifiers starting with the internal prefix are rejected: `SyntaxError: Identifier '<name>' is reserved.`\n- `import()` expressions are disallowed.\n- The AST-based approach replaces simpler regex-based checks and properly handles edge cases like `await` inside async arrow functions with expression bodies.\n\n**Evidence**\n\nError messages (search for `\"'with' statements are not supported in workflow scripts.\"` and `\"'await using' declarations are not supported in workflow scripts.\"`)"}