api/graph: validate OAuth grants when submitting build An OAuth grants string can be supplied when submitting a build manifest. Validate it to make sure it's well-formed.
1 files changed, 7 insertions(+), 0 deletions(-) M api/graph/schema.resolvers.go
M api/graph/schema.resolvers.go => api/graph/schema.resolvers.go +7 -0
@@ 299,6 299,13 @@ func (r *mutationResolver) Submit(ctx context.Context, manifest string, tags []s return nil, secretsErr } if man.OAuth != "" { _, err := auth.DecodeGrants(ctx, man.OAuth) if err != nil { return nil, err } } var job model.Job if err := database.WithTx(ctx, nil, func(tx *sql.Tx) error { tags := strings.Join(tags, "/")