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
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: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
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 \
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
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: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
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 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
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: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
Name | Type | Default Value | Description |
---|---|---|---|
ttl | Integer | 0 | No 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
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: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
Name | Type | Default Value | Description |
---|---|---|---|
reason | String | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
reason | String | - | 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()
}