-
Notifications
You must be signed in to change notification settings - Fork 39
fix adding enum value & command line exception #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good! 👍
On inspection (I haven't done any testing), I don't think the Perhaps handling these cases is out of scope, but if Perhaps the shell-invoking command |
I didn't use the |
Correct me if I am wrong, but isn't the text in this code user-controlled? const cmd = `${this.dotNetPath()} ${this.openApiDiffDllPath()} -o ${oldSwagger} -n ${newSwagger}`
log.debug(`Executing: "${cmd}"`)
const { stdout } = await exec(cmd, { encoding: "utf8", maxBuffer: 1024 * 1024 * 64 }) And could be attacked by a valid file path like:
|
The tool will check if the file exists, if you provide an invalid file path, the tool will fail before executing this command, and your attack works only when your server do contain such dangerous swagger file path which can't be controlled by the attacker
|
Fix issues:
#254
Azure/azure-sdk-tools#3748