Repository navigation
feat(embedded): EmbeddedOptions has no scriptsDir, so require()/lookup are refused in admin-created imposters (rift#1617) - #348
Merged
Conversation
… confines to it rift 0.24.0's rift_serve_admin takes scriptsDir, and an imposter posted through that plane reads lookup CSVs, require() modules and file: scripts only under it; without it such a lookup is refused (rift#1611, rift#1617). The embedded transport routes replaceAll through the plane, so an embedded replaceAll carrying a lookup could not work at all on the pinned engine. EmbeddedOptions.scriptsDir(Path) sends it, refused like the other serve options unless the engine advertises it. It does not start the plane early: the engine reads the root per admin request, and host-call imposters (create, addStub) stay unconfined. Closes #343
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rift 0.24.0's
rift_serve_admintakesscriptsDir. An imposter posted through the embedded admin plane readslookupCSVs,require()modules andfile:scripts only under it, and without it such a lookup is refused (rift#1611, rift#1617). The embedded transport routesreplaceAllthrough that plane, so on the pinned engine an embeddedreplaceAllcarrying a lookup couldn't work at all.Change
EmbeddedOptions.scriptsDir(Path)(new), sent asscriptsDirin the serve payload. Like the other serve options, it's refused withEngineUnavailableunless the engine advertisesscriptsDirinserveOptions(rift ≥ 0.24.0).create,addStub,applyConfig) stay unconfined (trusted_cwd). The reviewer confirmed both against the v0.24.0 engine source.SpawnOptions.scriptsDirfrom chore(deps): bump rift engine to 0.24.0 and write behaviors the way it admits them #346),docs/design/sdk-api.md, Javadoc.Tests
ServeOptionsScriptsDirTest(+6): the payload key, absent when unset, refusal naming the setter on a 0.23 build-info, acceptance on 0.24, no eager start, null refused.LaunchOptionsIT(+3, real engine), all throughreplaceAll:scriptsDirserves the row;scriptsDirthe lookup is refused withno --scripts-dir is configured;outside --scripts-dir.Verification (local, JDK 21, rift 0.24.0)
Full
RIFT_IT=1 verifyacross the reactor (spawn lane,rift-java-embedded-jdk21with the 0.24.0 dylib, conformance with the 0.24.0 corpus): all modules green.Downstream: rift-scala's facade needs FacadeCoverage entries for
EmbeddedOptions.scriptsDirandSpawnOptions.scriptsDirat its next rift-java bump.Closes #343
🤖 Generated with Claude Code