Merge branch 'main' into codex/conduct-risk-and-bug-assessment-4fecjc

This commit is contained in:
野生派Coder~
2026-02-14 13:58:29 +08:00
committed by GitHub
10 changed files with 67 additions and 30 deletions

View File

@@ -39,6 +39,11 @@ func NewExecTool(cfg config.ShellConfig, workspace string) *ExecTool {
allowPatterns = append(allowPatterns, regexp.MustCompile(`(?i)\b`+regexp.QuoteMeta(p)+`\b`))
}
allowPatterns := make([]*regexp.Regexp, 0, len(cfg.AllowedCmds))
for _, p := range cfg.AllowedCmds {
allowPatterns = append(allowPatterns, regexp.MustCompile(`\b`+regexp.QuoteMeta(p)+`\b`))
}
return &ExecTool{
workingDir: workspace,
timeout: cfg.Timeout,