refactor(scum): declare protected run requests
This commit is contained in:
@@ -5,12 +5,13 @@ feature gate: no SCUM game, database, UE4SS build, or source revision controls
|
||||
plugin availability.
|
||||
|
||||
The Companion declares availability from its server-bound typed ports and
|
||||
runtime schema probes. Notification and fixed vehicle spawning can use a local
|
||||
typed transport, but callers never supply a command, socket, credential, path,
|
||||
or raw transport reply. Vehicle spawning creates only the private
|
||||
`#spawnvehicle <vehicleCode>` template from the plugin allowlist.
|
||||
runtime schema probes. Plugin-generated SQL, RCON, and management-program
|
||||
request text is declared through the protected Platform-to-Run transport, not
|
||||
executed by the Companion. Callers never receive a socket, credential, path,
|
||||
or raw transport reply. A management-program request is not host OS shell
|
||||
access.
|
||||
|
||||
Semantic events come from bounded Run stdout/stderr records. Unknown records
|
||||
create diagnostics and never produce fabricated events. Run database access is
|
||||
limited to typed allowlisted projections and safe mutations; DSNs, rows, SQL,
|
||||
and credentials do not leave Run.
|
||||
Semantic events come from bounded Run stdout/stderr console records. Unknown
|
||||
records create diagnostics and never produce fabricated events. DSNs, rows,
|
||||
connections, and credentials do not leave Run; request text is protected and
|
||||
redacted from browser and audit projections.
|
||||
|
||||
@@ -68,7 +68,7 @@ func TestRuntimeAdapterUsesOnlyLogicalConfigValuesAndRedactsDiagnostics(t *testi
|
||||
}
|
||||
}
|
||||
|
||||
func TestVersionedUE4SSNotificationIsFixedTypedAndRedacted(t *testing.T) {
|
||||
func TestUE4SSNotificationIsTypedAndRedacted(t *testing.T) {
|
||||
port := ¬ificationPortFixture{accepted: true}
|
||||
adapter := RuntimeAdapter{BoundServerID: "server-1", Notification: port}
|
||||
result, err := adapter.NotifyPlayer(context.Background(), map[string]any{"playerId": "76561198000000001", "message": "Moon \"gift\""})
|
||||
|
||||
@@ -10,7 +10,8 @@ import (
|
||||
)
|
||||
|
||||
// SafeAdapter is intentionally narrow: it receives typed values only and has
|
||||
// no raw RCON, SQL, host-path, credential, or shell access.
|
||||
// no direct transport, host-path, credential, or shell access. Protected SQL,
|
||||
// RCON, and management-program text is forwarded to Run by Platform, not here.
|
||||
type SafeAdapter interface {
|
||||
ReadConfiguration(context.Context) (map[string]any, error)
|
||||
PatchConfiguration(context.Context, map[string]any) (map[string]any, error)
|
||||
|
||||
Reference in New Issue
Block a user