Skip to content

Conversation

jiparis
Copy link
Member

@jiparis jiparis commented Feb 12, 2025

This PR adds automatic verification on workflow run describe command, using the trusted root from Chainloop service and verification material from the attestation.
Note that only the signature and certificate chain are validated. Certificate contents validation is not yet implemented (issuer, SAN, etc.)

> chainloop wf run describe --digest sha256:0c432b7de0dde8c1aea926086e9346980c03abecd3461e00bb87413f50466037
┌───────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Workflow                                                                                              │
├─────────────────────────────┬─────────────────────────────────────────────────────────────────────────┤
│ ID                          │ 95f1b597-20e1-498c-b931-fc6d7331860e                                    │
│ Name                        │ mywf                                                                    │
│ Team                        │                                                                         │
│ Project                     │ myproject                                                               │
│ Version                     │ v0.162.0 (prerelease)                                                   │
├─────────────────────────────┼─────────────────────────────────────────────────────────────────────────┤
│ Workflow Run                │                                                                         │
├─────────────────────────────┼─────────────────────────────────────────────────────────────────────────┤
│ ID                          │ 5fed99ee-c48e-475e-ab9d-2954c1f9b495                                    │
│ Initialized At              │ 12 Feb 25 09:18 UTC                                                     │
│ Finished At                 │ 12 Feb 25 09:19 UTC                                                     │
│ State                       │ success                                                                 │
│ Runner Link                 │                                                                         │
├─────────────────────────────┼─────────────────────────────────────────────────────────────────────────┤
│ Statement                   │                                                                         │
├─────────────────────────────┼─────────────────────────────────────────────────────────────────────────┤
│ Payload Type                │ application/vnd.in-toto+json                                            │
│ Digest                      │ sha256:0c432b7de0dde8c1aea926086e9346980c03abecd3461e00bb87413f50466037 │
│ Verified                    │ true                                                                    │
│ Policies violation strategy │ ADVISORY                                                                │
│ Policies                    │ ------                                                                  │
│                             │ source-commit: Ok                                                       │
│                             │ sbom-present: missing SBOM material                                     │
└─────────────────────────────┴─────────────────────────────────────────────────────────────────────────┘
INF you can use the flag "--output statement" to see the full in-toto statement

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis requested review from javirln and migmartri February 12, 2025 09:44
Copy link
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and nice.

So if there is a bundle but generated with asymetric keys, the verification error will be swallowed and verify will be still false correct?

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis
Copy link
Member Author

jiparis commented Feb 12, 2025

Simple and nice.

So if there is a bundle but generated with asymetric keys, the verification error will be swallowed and verify will be still false correct?

Correct. In that case it will detect missing Verification material, and will fallback to prevous behaviour (you'd need --verify true --key cosign.pub to do the verification)

@javirln
Copy link
Member

javirln commented Feb 12, 2025

Love this!

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis merged commit 9652ebf into chainloop-dev:main Feb 12, 2025
13 checks passed
@jiparis jiparis deleted the pfm-2283-verif-chainloop branch February 12, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants