Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2025-3938: Coder vulnerable to privilege escalation could lead to a cross workspace compromise in github.com/coder/coder

wsbuilder

package
v2.23.1Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2025 License:AGPL-3.0Imports:27Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Overview

Package wsbuilder provides the Builder object, which encapsulates the common business logic of inserting a newworkspace build into the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcProvisionerVersionSupportsDynamicParametersadded inv2.23.0

func ProvisionerVersionSupportsDynamicParameters(versionstring)bool

Types

typeBuildError

type BuildError struct {// Status is a suitable HTTP status codeStatusintMessagestringWrappederror}

func (BuildError)Error

func (eBuildError) Error()string

func (BuildError)Unwrap

func (eBuildError) Unwrap()error

typeBuilder

type Builder struct {// contains filtered or unexported fields}

Builder encapsulates the business logic of inserting a new workspace build into the database.

Builder follows the so-called "Builder" pattern where options that customize the kind of build you get returna new instance of the Builder with the option applied.

Example:

b = wsbuilder.New(workspace, transition).VersionID(vID).Initiator(me)build, job, err := b.Build(...)

func (Builder)ActiveVersion

func (bBuilder) ActiveVersion()Builder

func (*Builder)Build

Build computes and inserts a new workspace build into the database. If authFunc is provided, it also performsauthorization preflight checks.

func (Builder)DeploymentValues

func (bBuilder) DeploymentValues(dv *codersdk.DeploymentValues)Builder

func (Builder)DynamicParametersadded inv2.23.0

func (bBuilder) DynamicParameters(usingbool)Builder

func (Builder)Experimentsadded inv2.23.0

func (bBuilder) Experiments(expcodersdk.Experiments)Builder

func (Builder)Initiator

func (bBuilder) Initiator(uuuid.UUID)Builder

func (Builder)LogLevel

func (bBuilder) LogLevel(lstring)Builder

func (Builder)MarkPrebuildadded inv2.22.0

func (bBuilder) MarkPrebuild()Builder

MarkPrebuild indicates that a prebuilt workspace is being built.

func (Builder)MarkPrebuiltWorkspaceClaimadded inv2.22.0

func (bBuilder) MarkPrebuiltWorkspaceClaim()Builder

MarkPrebuiltWorkspaceClaim indicates that a prebuilt workspace is being claimed.

func (Builder)Orphan

func (bBuilder) Orphan()Builder

func (Builder)Reason

func (Builder)RichParameterValues

func (bBuilder) RichParameterValues(p []codersdk.WorkspaceBuildParameter)Builder

func (Builder)SetLastWorkspaceBuildInTx

func (bBuilder) SetLastWorkspaceBuildInTx(build *database.WorkspaceBuild)Builder

SetLastWorkspaceBuildInTx prepopulates the Builder's cache with the last workspace build. This allows usto avoid a repeated database query when the Builder's caller also needs the workspace build, e.g. auto-start &auto-stop.

CAUTION: only call this method from within a database transaction with RepeatableRead isolation. This transactionMUST be the database.Store you call Build() with.

func (Builder)SetLastWorkspaceBuildJobInTx

func (bBuilder) SetLastWorkspaceBuildJobInTx(job *database.ProvisionerJob)Builder

SetLastWorkspaceBuildJobInTx prepopulates the Builder's cache with the last workspace build job. This allows usto avoid a repeated database query when the Builder's caller also needs the workspace build job, e.g. auto-start &auto-stop.

CAUTION: only call this method from within a database transaction with RepeatableRead isolation. This transactionMUST be the database.Store you call Build() with.

func (Builder)State

func (bBuilder) State(state []byte)Builder

func (Builder)TemplateVersionPresetIDadded inv2.22.0

func (bBuilder) TemplateVersionPresetID(iduuid.UUID)Builder

func (Builder)VersionID

func (bBuilder) VersionID(vuuid.UUID)Builder

typeOption

type Option func(Builder)Builder

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp