From b6145b5a0ffe424bd97eaeaf54ecef8e0b6ab94e Mon Sep 17 00:00:00 2001 From: Don Kackman Date: Sun, 13 Sep 2026 08:11:53 -0500 Subject: [PATCH] Potential fix for code scanning alert no. 55: Information exposure through an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- dw/workflow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dw/workflow.py b/dw/workflow.py index 00b898a3..5355a185 100644 --- a/dw/workflow.py +++ b/dw/workflow.py @@ -399,9 +399,9 @@ def validation_errors(self, arguments=None): try: expanded = self.expanded_definition(arguments, source_indices) except ForEachError as e: - return [{"path": e.path, "message": str(e)}] + return [{"path": e.path, "message": "Invalid for_each configuration"}] except ConstantError as e: - return [{"path": e.path, "message": str(e)}] + return [{"path": e.path, "message": "Invalid constant reference or constant value"}] except VariableNotFoundError: # Every undeclared reference, not just the first one substitution # tripped over - and reported where each sits rather than as a @@ -414,7 +414,7 @@ def validation_errors(self, arguments=None): # no single path inside the definition to blame, so it is # reported against 'variables' as a whole rather than escaping # as an unhandled exception - return [{"path": "variables", "message": str(e)}] + return [{"path": "variables", "message": "Variable cycle detected"}] return previous_result_reference_errors( expanded, source_indices ) + subfolder_errors(expanded, source_indices)