Require step-up password confirmation for shells, terminals and file changes

A new elevate request verifies the web sign-in password (scrypt hash, read-only,
rate-limited, constant time) and elevates that connection for 15 minutes.
chat_shell_run/input, rename/move/delete, terminal_open/input and POST /files
(via a per-connection upload token) are refused with code elevation_required
until then.
This commit is contained in:
2026-11-10 01:21:15 +00:00
parent a706739088
commit f11ff8650d
12 changed files with 963 additions and 1 deletions
+5
View File
@@ -81,6 +81,11 @@ func main() {
// harness; the summariser falls back to the prompt's first line, so title
// generation never blocks or fails run creation.
options := server.Options{AllowAuthoring: *allowAuthoring, ArtifactsRoot: artifactsRoot, RunTitles: summarise.GenerateTitle, StepVerdicts: summarise.GenerateVerdictReason, VerificationFixtures: server.VerificationFixturesFromEnvironment(os.Getenv), DetachSessions: detach}
// Shell commands, terminals and file changes need a recent confirmation of
// the web sign-in password on the same connection (step-up
// re-authentication). PIPELINES_ELEVATION_MINUTES overrides 15 minutes.
options.WebAuthFile = server.DefaultWebAuthFile()
options.ElevationTTL = server.ElevationTTLFromEnvironment(os.Getenv)
recorded := ""
if value, err := store.OpenCodeEndpoint(ctx); err != nil {
log.Printf("OpenCode endpoint setting unreadable: %v", err)