Dagger
Search

chainloop

Chainloop is an open source project that allows you to collect, attest, and distribute pieces of evidence from your Software Supply Chain.

Installation

dagger install github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e

Entrypoint

Return Type
Chainloop
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
func (m *myModule) example() *Chainloop  {
	return dag.
			Chainloop()
}
@function
def example() -> dag.Chainloop:
	return (
		dag.chainloop()
	)
@func()
example(): Chainloop {
	return dag
		.chainloop()
}

Types

Chainloop 🔗

resume() 🔗

Resume an attestation from its identifier

Return Type
Attestation !
Arguments
NameTypeDefault ValueDescription
attestationIdString !-No description provided
tokenSecret !-No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 resume --attestation-id string --token env:MYSECRET
func (m *myModule) example(attestationId string, token *Secret) *ChainloopAttestation  {
	return dag.
			Chainloop().
			Resume(attestationId, token)
}
@function
def example(attestation_id: str, token: dagger.Secret) -> dag.ChainloopAttestation:
	return (
		dag.chainloop()
		.resume(attestation_id, token)
	)
@func()
example(attestationId: string, token: Secret): ChainloopAttestation {
	return dag
		.chainloop()
		.resume(attestationId, token)
}

init() 🔗

Initialize a new attestation

Return Type
Attestation !
Arguments
NameTypeDefault ValueDescription
contractRevisionString -No description provided
sourceDirectory -No description provided
tokenSecret -No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init
func (m *myModule) example() *ChainloopAttestation  {
	return dag.
			Chainloop().
			Init()
}
@function
def example() -> dag.ChainloopAttestation:
	return (
		dag.chainloop()
		.init()
	)
@func()
example(): ChainloopAttestation {
	return dag
		.chainloop()
		.init()
}

Attestation 🔗

A Chainloop attestation https://docs.chainloop.dev/how-does-it-work/#contract-based-attestation

attestationId() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 attestation-id
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Chainloop().
			Init().
			AttestationId(ctx)
}
@function
async def example() -> str:
	return await (
		dag.chainloop()
		.init()
		.attestation_id()
	)
@func()
async example(): Promise<string> {
	return dag
		.chainloop()
		.init()
		.attestationId()
}

source() 🔗

Return Type
Directory !
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 source
func (m *myModule) example() *Directory  {
	return dag.
			Chainloop().
			Init().
			Source()
}
@function
def example() -> dagger.Directory:
	return (
		dag.chainloop()
		.init()
		.source()
	)
@func()
example(): Directory {
	return dag
		.chainloop()
		.init()
		.source()
}

status() 🔗

Check the attestation status

Return Type
String !
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 status
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Chainloop().
			Init().
			Status(ctx)
}
@function
async def example() -> str:
	return await (
		dag.chainloop()
		.init()
		.status()
	)
@func()
async example(): Promise<string> {
	return dag
		.chainloop()
		.init()
		.status()
}

withRegistry() 🔗

Attach credentials for a container registry. Chainloop will use them to query the registry for container image material.

Return Type
Attestation !
Arguments
NameTypeDefault ValueDescription
addressString !-No description provided
usernameString !-No description provided
passwordSecret !-No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 with-registry --address string --username string --password env:MYSECRET
func (m *myModule) example(address string, username string, password *Secret) *ChainloopAttestation  {
	return dag.
			Chainloop().
			Init().
			WithRegistry(address, username, password)
}
@function
def example(address: str, username: str, password: dagger.Secret) -> dag.ChainloopAttestation:
	return (
		dag.chainloop()
		.init()
		.with_registry(address, username, password)
	)
@func()
example(address: string, username: string, password: Secret): ChainloopAttestation {
	return dag
		.chainloop()
		.init()
		.withRegistry(address, username, password)
}

addBlob() 🔗

Add a blob of text to the attestation

Return Type
Attestation !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
contentsString !-No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 add-blob --name string --contents string
func (m *myModule) example(name string, contents string) *ChainloopAttestation  {
	return dag.
			Chainloop().
			Init().
			AddBlob(name, contents)
}
@function
def example(name: str, contents: str) -> dag.ChainloopAttestation:
	return (
		dag.chainloop()
		.init()
		.add_blob(name, contents)
	)
@func()
example(name: string, contents: string): ChainloopAttestation {
	return dag
		.chainloop()
		.init()
		.addBlob(name, contents)
}

addFile() 🔗

Add a file to the attestation

Return Type
Attestation !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
fileFile !-No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 add-file --name string --file file:path
func (m *myModule) example(name string, file *File) *ChainloopAttestation  {
	return dag.
			Chainloop().
			Init().
			AddFile(name, file)
}
@function
def example(name: str, file: dagger.File) -> dag.ChainloopAttestation:
	return (
		dag.chainloop()
		.init()
		.add_file(name, file)
	)
@func()
example(name: string, file: File): ChainloopAttestation {
	return dag
		.chainloop()
		.init()
		.addFile(name, file)
}

debug() 🔗

Return Type
Terminal !
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 debug
func (m *myModule) example() *Terminal  {
	return dag.
			Chainloop().
			Init().
			Debug()
}
@function
def example() -> dag.Terminal:
	return (
		dag.chainloop()
		.init()
		.debug()
	)
@func()
example(): Terminal {
	return dag
		.chainloop()
		.init()
		.debug()
}

container() 🔗

Build an ephemeral container with everything needed to process the attestation

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
ttlInteger 0No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 container
func (m *myModule) example() *Container  {
	return dag.
			Chainloop().
			Init().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.chainloop()
		.init()
		.container()
	)
@func()
example(): Container {
	return dag
		.chainloop()
		.init()
		.container()
}

push() 🔗

Generate, sign and push the attestation to the chainloop control plane

Return Type
String !
Arguments
NameTypeDefault ValueDescription
keySecret !-No description provided
passphraseSecret !-No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 push --key env:MYSECRET --passphrase env:MYSECRET
func (m *myModule) example(ctx context.Context, key *Secret, passphrase *Secret) string  {
	return dag.
			Chainloop().
			Init().
			Push(ctx, key, passphrase)
}
@function
async def example(key: dagger.Secret, passphrase: dagger.Secret) -> str:
	return await (
		dag.chainloop()
		.init()
		.push(key, passphrase)
	)
@func()
async example(key: Secret, passphrase: Secret): Promise<string> {
	return dag
		.chainloop()
		.init()
		.push(key, passphrase)
}

markFailed() 🔗

Mark the attestation as failed

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
reasonString -No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 mark-failed
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Chainloop().
			Init().
			MarkFailed(ctx)
}
@function
async def example() -> None:
	return await (
		dag.chainloop()
		.init()
		.mark_failed()
	)
@func()
async example(): Promise<void> {
	return dag
		.chainloop()
		.init()
		.markFailed()
}

markCanceled() 🔗

Mark the attestation as canceled

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
reasonString -No description provided
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
 init \
 mark-canceled
func (m *myModule) example(ctx context.Context)   {
	return dag.
			Chainloop().
			Init().
			MarkCanceled(ctx)
}
@function
async def example() -> None:
	return await (
		dag.chainloop()
		.init()
		.mark_canceled()
	)
@func()
async example(): Promise<void> {
	return dag
		.chainloop()
		.init()
		.markCanceled()
}