mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-13 06:47:30 +08:00
Merge branch 'main' into codex/conduct-risk-and-bug-assessment-4fecjc
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user