Skip to content

Potential fix for code scanning alert no. 55: Information exposure through an exception - #103

Closed
dkackman wants to merge 1 commit into
masterfrom
alert-autofix-55
Closed

dkackman wants to merge 1 commit into
masterfrom
alert-autofix-55

Conversation

@dkackman

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/dkackman/diffusers-workflow/security/code-scanning/55

The best fix is to stop returning raw exception messages from Workflow.validation_errors() and return stable, generic messages instead, while preserving useful location info (path) and existing API shape.

Specifically, in dw/workflow.py inside validation_errors():

  • Replace str(e) for:
    • ForEachError with a generic message like "Invalid for_each configuration"
    • ConstantError with "Invalid constant reference or constant value"
    • VariableCycleError with "Variable cycle detected"
  • Keep path fields unchanged (e.path and "variables") so clients still get actionable location context.
  • Do not change return structure or control flow, so functionality remains equivalent (validation still fails and reports structured errors), but sensitive internals are no longer exposed.

No changes are required in dw/server/app.py once upstream messages are sanitized.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…rough an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@dkackman dkackman closed this Sep 13, 2026
@dkackman
dkackman deleted the alert-autofix-55 branch September 13, 2026 14:01
dkackman added a commit that referenced this pull request Nov 1, 2026
…-75wg-m249)

Dependabot alert #103: minimatch < 11.0.1, globparts amplification DoS.
There is no patched 10.x, and eslint, @eslint/config-array and
@typescript-eslint/typescript-estree all declare ^10, so the fix is an
override on those three. None use the APIs 11.0 removed (makeRe, regexp,
AST, matchOne). redocly's minimatch 5.1.9 stays: it predates the vulnerable
firstPhasePreProcess path.

lint (226 files, same as before), check, 700 vitest tests and build pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant