fix(coderd): scope provisioner module file downloads to the daemon's org (#26635)

This commit is contained in:
Jon Ayers
2026-06-24 12:09:22 -05:00
committed by GitHub
parent 9defdb4af2
commit 1961908ca7
9 changed files with 246 additions and 0 deletions
+5
View File
@@ -975,6 +975,11 @@ type sqlcQuerier interface {
GetWorkspacesByTemplateID(ctx context.Context, templateID uuid.UUID) ([]WorkspaceTable, error)
GetWorkspacesEligibleForTransition(ctx context.Context, now time.Time) ([]GetWorkspacesEligibleForTransitionRow, error)
GetWorkspacesForWorkspaceMetrics(ctx context.Context) ([]GetWorkspacesForWorkspaceMetricsRow, error)
// Reports whether the given file is referenced as cached module files by any
// template version in the given organization. Used to authorize provisioner
// module-file downloads so a daemon cannot read another organization's cached
// Terraform module source.
HasTemplateVersionsUsingCachedModuleFileInOrg(ctx context.Context, arg HasTemplateVersionsUsingCachedModuleFileInOrgParams) (bool, error)
// Stamps the pinned hash and error on every not-yet-hydrated chat for
// an agent (context_aggregate_hash IS NULL) and copies the agent's
// current context resources onto those chats in the same statement, so