Skip to content

Fix path containment for image file references / 修复图片文件引用路径边界#5023

Merged
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/path-ref-containment
Jun 22, 2026
Merged

Fix path containment for image file references / 修复图片文件引用路径边界#5023
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/path-ref-containment

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • contain workspace image file references behind os.Root and root-relative paths
  • stop auto-attaching ordinary file image references when no workspace root is available
  • add SECURITY.md to document supported security boundaries for workspace file access and @path references

Security

Addresses CodeQL code-scanning alerts 184, 185, and 186 (go/path-injection) in internal/control/refs.go.

Validation

  • go test ./internal/control -run 'TestControllerInputImages|TestWorkspaceImageRefsAlsoAttachAsModelImages|TestResolveAbsRef|TestReadFileRefBlocksPathTraversal'
  • go test ./internal/control
  • git diff --check
  • go test ./...

@SivanCola SivanCola requested a review from esengine as a code owner June 22, 2026 07:40
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development agent Core agent loop (internal/agent, internal/control) labels Jun 22, 2026

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

Copy link
Copy Markdown

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: d68ed3b8a6

ℹ️ 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 internal/control/refs.go
@SivanCola SivanCola merged commit 4fbc385 into esengine:main-v2 Jun 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant