Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

apptest

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:32Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcRun

func Run(t *testing.T, appHostIsPrimarybool, factoryDeploymentFactory)

Run runs the entire workspace app test suite against deployments mintedby the provided factory.

appHostIsPrimary is true if the app host is also the primary coder APIserver. This disables any tests that test API passthrough or rely on theapp server not being the API server.nolint:revive

Types

typeApp

type App struct {UsernamestringWorkspaceNamestring// AgentName is optional, except for when proxying to a port. AgentName is// always ignored when making a path app URL.//// Set WorkspaceName to `workspace.agent` if you want to generate a path app// URL with an agent name.AgentNamestringAppSlugOrPortstringQuerystring}

App is similar to httpapi.ApplicationURL but with a Query field.

typeDeployment

type Deployment struct {Options *DeploymentOptions// SDKClient should be logged in as the admin user.SDKClient      *codersdk.ClientFirstUsercodersdk.CreateFirstUserResponsePathAppBaseURL *url.URL}

Deployment is a license-agnostic deployment with all the fields that appstests need.

typeDeploymentFactory

type DeploymentFactory func(t *testing.T, opts *DeploymentOptions) *Deployment

DeploymentFactory generates a deployment with an API client, a path base URL,and a subdomain app host URL.

typeDeploymentOptions

type DeploymentOptions struct {AppHoststringDisablePathAppsboolDisableSubdomainAppsboolDangerousAllowPathAppSharingboolDangerousAllowPathAppSiteOwnerAccessboolServeHTTPSbool// contains filtered or unexported fields}

DeploymentOptions are the options for creating a *Deployment with aDeploymentFactory.

typeDetailsadded inv0.23.0

type Details struct {*DeploymentMecodersdk.UserWorkspace *codersdk.WorkspaceAgent     *codersdk.WorkspaceAgentAppPortuint16Apps struct {FakeAppOwnerAppAuthenticatedAppPublicAppPortApp}}

Details are the full test details returned from setupProxyTestWithFactory.

func (*Details)AppClientadded inv0.23.0

func (d *Details) AppClient(t *testing.T) *codersdk.Client

AppClient returns a *codersdk.Client that will route all requests to theapp server. API requests will fail with this client. Any redirect responsesare not followed by default.

The client is authenticated as the first user by default.

func (*Details)PathAppURLadded inv0.23.0

func (d *Details) PathAppURL(appApp) *url.URL

PathAppURL returns the URL for the given path app.

func (*Details)SubdomainAppURLadded inv0.23.0

func (d *Details) SubdomainAppURL(appApp) *url.URL

SubdomainAppURL returns the URL for the given subdomain app.

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