Skip to content

initial commit#1

Merged
AlexandreYang merged 1 commit intomainfrom
alex/initial_commit
Mar 8, 2026
Merged

initial commit#1
AlexandreYang merged 1 commit intomainfrom
alex/initial_commit

Conversation

@AlexandreYang
Copy link
Copy Markdown
Member

No description provided.

@AlexandreYang AlexandreYang merged commit a720867 into main Mar 8, 2026
3 checks passed
@AlexandreYang AlexandreYang deleted the alex/initial_commit branch March 8, 2026 19:04
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a720867c4c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread interp/api.go
fmt.Fprintln(r.stderr, err)
return ExitStatus(2)
}
r.exit = exitStatus{}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep AllowedPaths failures fail-closed during Run

If Reset cannot open an allowed root (for example, the directory is deleted or permissions change after New), it sets a fatal exit and returns before installing the wrapped open/readdir/exec handlers; Run then immediately clears that state with r.exit = exitStatus{} and continues. In that state the runner can execute with default unrestricted file handlers instead of denying access, so a transient AllowedPaths setup failure becomes a sandbox bypass rather than a hard failure.

Useful? React with 👍 / 👎.

Comment on lines +40 to +41
callCtx.Errf("%s: too many arguments\n", name)
return Result{Code: 1, BreakN: 1}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exit on break/continue too-many-arguments errors

For break/continue with too many operands, this returns {Code: 1, BreakN: 1} without setting Exiting, so scripts keep running statements after the loop (e.g. for i in 1; do break 1 2; done; echo after). In non-interactive bash this error is fatal for the shell, so continuing execution here can change control flow and mask loop-control argument errors.

Useful? React with 👍 / 👎.

Comment thread interp/api.go
Comment on lines +271 to +273
if r.execHandler == nil {
r.execHandler = noExecHandler()
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose a RunnerOption for configuring ExecHandler

This path always installs noExecHandler when execHandler is unset, and there is no public RunnerOption in this package to set a non-default exec handler from outside interp. That makes the advertised external-command opt-in path unreachable for library consumers, so all non-builtin commands are permanently blocked even when callers need to enable a constrained executor.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant