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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user