You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SECURITY] Keep preview IaC state paths under operator control on server surfaces #834
Constituent of #769. Reviewed current main at 1de4135 on 2026-10-08; this issue proposes work, no implementation is included.
CWEs: CWE-73, CWE-22.
Finding and evidence
With the explicit unstable preview opt-in, stackql_preview.iac.run accepts a SQL state predicate. internal/stackql/intrinsic/iac.go uses ApplicationFilesRootPath only when the predicate is absent, then passes the supplied path to omnisdk.Converge. pkg/omnisdk/iac.go creates ledger/journal storage under that path.
The path reaches the filesystem without a server-side base-directory policy. A current-build probe using omnisdk's local widgets fixture and a temporary state directory outside the approot created ledger/probe/.lease.v1.json and the journal directory. It then failed on Windows directory sync; no cloud or mock mutation request occurred. Empty-resource and invalid-address probes failed before opening state and are not valid reproduction payloads. Server reachability is source-traced; this probe used local exec to isolate the filesystem behavior.
Required outcome
Make server-side state location operator-owned, or resolve approved logical state names under a configured root. Reject paths escaping that root, including Windows and symlink/junction cases.
Preserve a deliberate local CLI override where the operator owns the process.
Ensure rejected state paths cause no filesystem or cloud mutation, and document how collections share state.
Validation and acceptance
Use a valid minimal mock provider with unstable preview enabled, run through pgwire and MCP, and test outside-root/absolute/parent/symlink paths plus allowed state names. Assert no outside artifacts or cloud calls for rejected paths. Verify the preview-disabled default remains unavailable.
Scope and related work
Independent of MCP classifying effectful SELECT correctly: even an authorized full_access operation should not choose arbitrary server filesystem locations. This does not claim the stable/default query surface exposes preview IaC.
Activity