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@c048efa80c4a02d3528f017105956f608688e12eEntrypoint
Return Type
Chainloop Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
func (m *MyModule) Example() *dagger.Chainloop {
return dag.
Chainloop()
}@function
def example() -> dagger.Chainloop:
return (
dag.chainloop()
)@func()
example(): Chainloop {
return dag
.chainloop()
}Types
Chainloop 🔗
resume() 🔗
Resume an attestation from its identifier
Return Type
Attestation !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| attestationId | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
resume --attestation-id string --token env:MYSECRETfunc (m *MyModule) Example(attestationId string, token *dagger.Secret) *dagger.ChainloopAttestation {
return dag.
Chainloop().
Resume(attestationId, token)
}@function
def example(attestation_id: str, token: dagger.Secret) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| contractRevision | String | - | No description provided |
| source | Directory | - | No description provided |
| token | Secret | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
initfunc (m *MyModule) Example() *dagger.ChainloopAttestation {
return dag.
Chainloop().
Init()
}@function
def example() -> dagger.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-idfunc (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 \
sourcefunc (m *MyModule) Example() *dagger.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 \
statusfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| address | String ! | - | No description provided |
| username | String ! | - | No description provided |
| password | Secret ! | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
init \
with-registry --address string --username string --password env:MYSECRETfunc (m *MyModule) Example(address string, username string, password *dagger.Secret) *dagger.ChainloopAttestation {
return dag.
Chainloop().
Init().
WithRegistry(address, username, password)
}@function
def example(address: str, username: str, password: dagger.Secret) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
| contents | String ! | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
init \
add-blob --name string --contents stringfunc (m *MyModule) Example(name string, contents string) *dagger.ChainloopAttestation {
return dag.
Chainloop().
Init().
AddBlob(name, contents)
}@function
def example(name: str, contents: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
| file | File ! | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
init \
add-file --name string --file file:pathfunc (m *MyModule) Example(name string, file *dagger.File) *dagger.ChainloopAttestation {
return dag.
Chainloop().
Init().
AddFile(name, file)
}@function
def example(name: str, file: dagger.File) -> dagger.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 \
debugfunc (m *MyModule) Example() *dagger.Terminal {
return dag.
Chainloop().
Init().
Debug()
}@function
def example() -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| ttl | Integer | 0 | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
init \
containerfunc (m *MyModule) Example() *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| key | Secret ! | - | No description provided |
| passphrase | Secret ! | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
init \
push --key env:MYSECRET --passphrase env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, key *dagger.Secret, passphrase *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| reason | String | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
init \
mark-failedfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| reason | String | - | No description provided |
Example
dagger -m github.com/shykes/chainloop@c048efa80c4a02d3528f017105956f608688e12e call \
init \
mark-canceledfunc (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()
}