feat(process): honor entry-declared security config on process start - #555
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures entry-declared security: configuration for process entries is preserved and applied at process start, bringing process behavior in line with functions and supervised services.
Changes:
- Extends process metadata (
process.Meta) and Lua process entry configs to carrySecurity *security.Config. - Threads parsed security config through the Lua process component factory registration so hosts can access it.
- Applies
WithSecurityConfigto the process frame context in bothservice/hostandservice/terminal, and adds a host-level test covering actor + policy application.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| service/terminal/host.go | Applies entry-declared security config to terminal-launched process frame contexts before scheduling. |
| service/host/host.go | Applies entry-declared security config to standard host process frame contexts before scheduling. |
| service/host/host_test.go | Adds test asserting entry security actor + policies are visible/evaluable in the process frame context. |
| runtime/lua/component/process/manager.go | Propagates parsed Security from Lua process configs into FactoryEntry.Meta during factory registration/updates/invalidation. |
| runtime/lua/component/process/manager_test.go | Updates test helper call signature for registerFactory to include the new security parameter. |
| api/runtime/lua/config.go | Adds security field to ProcessConfig and BytecodeProcessConfig to support security: blocks in manifests. |
| api/process/process.go | Extends process.Meta to include Security *security.Config so hosts can apply it at start. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }) | ||
| require.NoError(t, err) | ||
|
|
||
| <-done |
skhaz
approved these changes
Aug 7, 2026
Process entries silently dropped their security block: ProcessConfig and BytecodeProcessConfig had no Security field, and the process component registered factories with method-only metadata. Function entries and supervised services already apply entry security via WithSecurityConfig, leaving processes as the one component type without declared capabilities. Security now flows from the entry config through process.Meta into both host Run paths (service host and terminal host), applied to the process frame context before scheduling. Semantics match the function path: a declared actor replaces the inherited one, declared policies merge onto the inherited scope. Entries without a security block are unaffected; meta.Security is nil and the frame context is unchanged.
wolfy-j
force-pushed
the
feat/process-entry-security
branch
from
August 8, 2026 22:25
badbcb2 to
016d229
Compare
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.
Problem
Lua process entries currently discard their
security:block. Functions and supervised services already apply intrinsic entry security throughWithSecurityConfig; processes are the remaining executable entry type that cannot declare an actor or policy scope.Change
Security *security.Configto source and bytecode process configs and to process factory metadata.Semantics
This uses the existing function-entry contract and resolver:
data.securityis intrinsic to the process and applies to every launch path.This is distinct from PR #558:
meta.command.securityis a trusted CLI-launch overlay, while this PR provides the process entry’s intrinsic security. Combined-tree tests verify that launch scope is preserved, intrinsic policy scope is merged, and the intrinsic actor wins. Once #558 lands, both paths resolve through the samesystem/security.ResolveConfigPairsimplementation.Verification