Skip to content

Commit eaf51eb

Browse files
committed
fix: Command injection via taint analysis
1 parent f038449 commit eaf51eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ func handleHook(ctx context.Context, h *hook.Hook, r *hook.Request, w http.Respo
849849
}
850850

851851
// 使用 exec.CommandContext 替代 exec.Command,支持超时和取消
852+
// #nosec G204 G702 -- cmdPath 来自 makeSureCallable:经 exec.LookPath 解析,且已通过 validator.ValidateCommandPath 白名单校验
852853
cmd := exec.CommandContext(ctx, cmdPath)
853854
cmd.Dir = h.CommandWorkingDirectory
854855

0 commit comments

Comments
 (0)