Skip to content

Fix DEP0190 deprecation: execFile with shell:true passes args unsafely #135

@that-github-user

Description

@that-github-user

Summary

Node.js DEP0190 warning appears on every thinktank run:
`Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.`

Location

src/scoring/test-runner.ts — uses execFile with shell:true and passes args as an array. Node.js warns this is unsafe because the args aren't escaped when shell mode is used.

Fix

Either:

  1. Use exec (string command) instead of execFile with shell:true
  2. Remove shell:true and handle command resolution differently
  3. Suppress the warning if we've already validated the command (we do via validateTestCommand)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions