Skip to content

Missing input validation on path and argument inputs #37

Closed

Description

@ismits

While reviewing this action, I identified several input validation gaps that could pose security risks:

  • toolpath: Used directly without path validation or scope checking. Also uses string concatenation instead of path.join() on line 166, which can break on Windows.
  • customSettings: Split and pushed into the args array without any format validation, allowing arbitrary argument injection.
  • Path inputs (targetdir, historydir, sourcedirs, reports): Not validated to stay within the workspace. Absolute paths bypass workingdir entirely, and relative paths with .. can escape the repository root.
  • plugins: File paths passed directly to -plugins: without validation, which could allow loading untrusted .NET assemblies.

I'd be happy to submit a PR to address these. Would you be open to contributions here?

Activity

  1. danielpalme commented on Apr 14, 2026

    @danielpalme
    Owner

    Thanks for your PR. I will have a look at it as soon as possible!

  2. ismits commented on Apr 15, 2026

    @ismits
    Author

    Hi @danielpalme. If you'd like, I can refactor those sanitization functions out to a sanitize.ts import instead?

    We'd like to continue to use your gh action in our project but need some of these areas of concern locked down. So if I can help with a clean refactor, let me know.

  3. danielpalme commented on Apr 15, 2026

    @danielpalme
    Owner

    If you'd like, I can refactor those sanitization functions out to a sanitize.ts import instead?

    That would be great! Once this is done, I can publish a new release.

  4. ismits commented on Apr 15, 2026

    @ismits
    Author

    Updated. I think this is cleaner and dryer. I didn't update the version stamp since I'm not familiar with your workflow.

    Happy to correct anything you don't like.

  5. danielpalme commented on Apr 15, 2026

    @danielpalme
    Owner

    Thanks, I will merge and update the version within the next days!

  6. ismits commented on Apr 15, 2026

    @ismits
    Author

    Excellent! Really appreciate your responsiveness.

  7. added a commit that references this issue on Apr 15, 2026
  8. danielpalme commented on Apr 15, 2026

    @danielpalme
    Owner

    Release 5.5.5 is now available!

  9. ismits commented on Apr 17, 2026

    @ismits
    Author

    Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions