Skip to content

docs(buildfile): note load() is confined to the workspace root - #83

Open
raphaelvigee wants to merge 2 commits into
mainfrom
claude/eager-galileo-xbtt3q
Open

docs(buildfile): note load() is confined to the workspace root#83
raphaelvigee wants to merge 2 commits into
mainfrom
claude/eager-galileo-xbtt3q

Conversation

@raphaelvigee

Copy link
Copy Markdown
Member

Summary

  • hephbuild/heph#277 (commit 66dea21) closed a security bug where load() path resolution had no workspace-root boundary check, so a ..-laden or //-absolute path (e.g. load("../../../../etc/hosts")) could escape the workspace and be parsed as Starlark. load() now enforces the same boundary check as file()/glob()/query(), rejecting such paths with an error.
  • website/docs/plugins/buildfile.md already documented this workspace-root boundary for file()/glob()/query() paths, but was silent on load(). Added one sentence to the "Sharing symbols with load()" section mirroring the existing statement, now that load() behaves the same way.

Not documented (out of scope, no user-facing docs claim to correct): the companion fix for package-address escapes (Provider::get/list/probe now returning empty/not-found for a ..-escaping package address) and the list_packages symlinked-BUILD-file fix — both are internal consistency fixes with no prior doc claims to update.

Test plan

  • Read-only prose change to an existing docs page; no build/lint run per routine instructions (no build env available in this session).
  • Reviewer: confirm the added sentence renders correctly and matches site voice.

Generated by Claude Code

load() now enforces the same workspace-root boundary as file()/glob()/query() —
a `..`-laden path that would resolve outside the workspace is rejected instead
of being followed.

Ref: hephbuild/heph@66dea21 (#277)
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

⚡ Cloudflare Pages preview

Preview https://1e46897e.hephbuild.pages.dev
Commit 7da2a83

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

what the hell ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

My mistake — I pre-base64-encoded the file content before sending it through the file-update API, which already does that encoding itself, so the first commit landed the literal base64 string as the file body instead of the markdown. Fixed in 8c9ba0b: the diff is now just the intended one-paragraph addition to the load() section. Sorry for the noise.


Generated by Claude Code

The prior commit sent the file content pre-base64-encoded, but this
tool already base64-encodes the `content` param — so the committed
file literally contained the base64 string instead of the markdown.
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