cosign
Sign a container image using Cosign
Installation
dagger install github.com/opopops/daggerverse/cosign@v1.4.2Entrypoint
Return Type
Cosign !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| image | String ! | "cgr.dev/chainguard/wolfi-base:latest" | Cosign image | 
| version | String | null | No description provided | 
| user | String ! | "65532" | Cosign image user | 
| registryUsername | String | null | No description provided | 
| registryPassword | Secret | null | No description provided | 
| container | Container | null | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user stringfunc (m *MyModule) Example(image string, user string) *dagger.Cosign  {
	return dag.
			Cosign(image, user)
}@function
def example(image: str, user: str, ) -> dagger.Cosign:
	return (
		dag.cosign(image, user)
	)@func()
example(image: string, user: string, ): Cosign {
	return dag
		.cosign(image, user)
}Types
Cosign 🔗
Cosign CLI
image() 🔗
Cosign image
Return Type
String !Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string imagefunc (m *MyModule) Example(ctx context.Context, image string, user string) string  {
	return dag.
			Cosign(image, user).
			Image(ctx)
}@function
async def example(image: str, user: str, ) -> str:
	return await (
		dag.cosign(image, user)
		.image()
	)@func()
async example(image: string, user: string, ): Promise<string> {
	return dag
		.cosign(image, user)
		.image()
}version() 🔗
Return Type
String Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string versionfunc (m *MyModule) Example(ctx context.Context, image string, user string) string  {
	return dag.
			Cosign(image, user).
			Version(ctx)
}@function
async def example(image: str, user: str, ) -> str:
	return await (
		dag.cosign(image, user)
		.version()
	)@func()
async example(image: string, user: string, ): Promise<string> {
	return dag
		.cosign(image, user)
		.version()
}user() 🔗
Cosign image user
Return Type
String !Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string userfunc (m *MyModule) Example(ctx context.Context, image string, user string) string  {
	return dag.
			Cosign(image, user).
			User(ctx)
}@function
async def example(image: str, user: str, ) -> str:
	return await (
		dag.cosign(image, user)
		.user()
	)@func()
async example(image: string, user: string, ): Promise<string> {
	return dag
		.cosign(image, user)
		.user()
}registryUsername() 🔗
Return Type
String Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string registry-usernamefunc (m *MyModule) Example(ctx context.Context, image string, user string) string  {
	return dag.
			Cosign(image, user).
			RegistryUsername(ctx)
}@function
async def example(image: str, user: str, ) -> str:
	return await (
		dag.cosign(image, user)
		.registry_username()
	)@func()
async example(image: string, user: string, ): Promise<string> {
	return dag
		.cosign(image, user)
		.registryUsername()
}registryPassword() 🔗
Return Type
Secret Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string registry-passwordfunc (m *MyModule) Example(image string, user string) *dagger.Secret  {
	return dag.
			Cosign(image, user).
			RegistryPassword()
}@function
def example(image: str, user: str, ) -> dagger.Secret:
	return (
		dag.cosign(image, user)
		.registry_password()
	)@func()
example(image: string, user: string, ): Secret {
	return dag
		.cosign(image, user)
		.registryPassword()
}attest() 🔗
Attest image with Cosign
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| image | String ! | - | Image digest URI | 
| predicate | File ! | - | path to the predicate file | 
| privateKey | Secret | null | No description provided | 
| password | Secret | null | No description provided | 
| type | String | null | No description provided | 
| oidcProvider | String | null | No description provided | 
| oidcIssuer | String | null | No description provided | 
| recursive | Boolean | false | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string attest --image string --predicate file:pathfunc (m *MyModule) Example(ctx context.Context, image string, user string, image1 string, predicate *dagger.File) string  {
	return dag.
			Cosign(image, user).
			Attest(ctx, image1, predicate)
}@function
async def example(image: str, user: str, image1: str, predicate: dagger.File) -> str:
	return await (
		dag.cosign(image, user)
		.attest(image1, predicate)
	)@func()
async example(image: string, user: string, image1: string, predicate: File): Promise<string> {
	return dag
		.cosign(image, user)
		.attest(image1, predicate)
}container() 🔗
Returns container
Return Type
Container !Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string containerfunc (m *MyModule) Example(image string, user string) *dagger.Container  {
	return dag.
			Cosign(image, user).
			Container()
}@function
def example(image: str, user: str, ) -> dagger.Container:
	return (
		dag.cosign(image, user)
		.container()
	)@func()
example(image: string, user: string, ): Container {
	return dag
		.cosign(image, user)
		.container()
}sign() 🔗
Sign image with Cosign
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| image | String ! | - | Image digest URI | 
| privateKey | Secret | null | No description provided | 
| password | Secret | null | No description provided | 
| oidcProvider | String | null | No description provided | 
| oidcIssuer | String | null | No description provided | 
| recursive | Boolean | false | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string sign --image stringfunc (m *MyModule) Example(ctx context.Context, image string, user string, image1 string) string  {
	return dag.
			Cosign(image, user).
			Sign(ctx, image1)
}@function
async def example(image: str, user: str, image1: str) -> str:
	return await (
		dag.cosign(image, user)
		.sign(image1)
	)@func()
async example(image: string, user: string, image1: string): Promise<string> {
	return dag
		.cosign(image, user)
		.sign(image1)
}withAttest() 🔗
Attest image with Cosign (For chaining)
Return Type
Cosign !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| image | String ! | - | Image digest URI | 
| predicate | File ! | - | path to the predicate file | 
| privateKey | Secret | null | No description provided | 
| password | Secret | null | No description provided | 
| type | String | null | No description provided | 
| oidcProvider | String | null | No description provided | 
| oidcIssuer | String | null | No description provided | 
| recursive | Boolean | false | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string with-attest --image string --predicate file:pathfunc (m *MyModule) Example(image string, user string, image1 string, predicate *dagger.File) *dagger.Cosign  {
	return dag.
			Cosign(image, user).
			WithAttest(image1, predicate)
}@function
def example(image: str, user: str, image1: str, predicate: dagger.File) -> dagger.Cosign:
	return (
		dag.cosign(image, user)
		.with_attest(image1, predicate)
	)@func()
example(image: string, user: string, image1: string, predicate: File): Cosign {
	return dag
		.cosign(image, user)
		.withAttest(image1, predicate)
}withRegistryAuth() 🔗
Authenticate with registry
Return Type
Cosign !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| username | String ! | - | Registry username | 
| secret | Secret ! | - | Registry password | 
| address | String | "docker.io" | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string with-registry-auth --username string --secret env:MYSECRETfunc (m *MyModule) Example(image string, user string, username string, secret *dagger.Secret) *dagger.Cosign  {
	return dag.
			Cosign(image, user).
			WithRegistryAuth(username, secret)
}@function
def example(image: str, user: str, username: str, secret: dagger.Secret) -> dagger.Cosign:
	return (
		dag.cosign(image, user)
		.with_registry_auth(username, secret)
	)@func()
example(image: string, user: string, username: string, secret: Secret): Cosign {
	return dag
		.cosign(image, user)
		.withRegistryAuth(username, secret)
}withSign() 🔗
Sign image with Cosign (For chaining)
Return Type
Cosign !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| image | String ! | - | Image digest URI | 
| privateKey | Secret | null | No description provided | 
| password | Secret | null | No description provided | 
| oidcProvider | String | null | No description provided | 
| oidcIssuer | String | null | No description provided | 
| recursive | Boolean | false | No description provided | 
Example
dagger -m github.com/opopops/daggerverse/cosign@b42e90ea7f3acb4ea9f3506a2b9bde878e880ab8 call \
 --image string --user string with-sign --image stringfunc (m *MyModule) Example(image string, user string, image1 string) *dagger.Cosign  {
	return dag.
			Cosign(image, user).
			WithSign(image1)
}@function
def example(image: str, user: str, image1: str) -> dagger.Cosign:
	return (
		dag.cosign(image, user)
		.with_sign(image1)
	)@func()
example(image: string, user: string, image1: string): Cosign {
	return dag
		.cosign(image, user)
		.withSign(image1)
}