我为gosec
添加了一个golangci-lint棉绒,除以下内容外,所有内容都涵盖了:
exec.Command(params[0],params[1:]…)
我知道我可以禁用此皮棉,但是我不想这样做。有没有一种方法可以修复代码以满足该要求呢?
错误是:
G204: Subprocess launched with function call as argument or cmd arguments ```
我为gosec
添加了一个golangci-lint棉绒,除以下内容外,所有内容都涵盖了:
exec.Command(params[0],params[1:]…)
我知道我可以禁用此皮棉,但是我不想这样做。有没有一种方法可以修复代码以满足该要求呢?
错误是:
G204: Subprocess launched with function call as argument or cmd arguments ```
对命令调用进行硬编码。有no other options个AFAIS。
,您可以使用注释将特定行排除在外,而不是禁用linter;
concat('token=',**encodeUriComponent**(body('ApplicationToken')?['value']),'&user=',**encodeUriComponent**(body('UserToken')?['value']),'&title=Stock+Order+Status+Changed&message=to+do')
,
如果您想仅禁用此检查,您可以
exec.Command(params[0],params[1:]...) // #nosec G204