Coverage / crates/hub/src/provenance.rs 100.0%
49 of 49 lines run, 6 of 12 functions · run #537 on main · run missed
| 1 | //! Provenance others can verify (oxygenhub#239): a Flow artifact's in-toto | |
| 2 | //! Statement with an SLSA provenance v1 predicate, in a DSSE envelope signed | |
| 3 | //! with the hub's Ed25519 key, as `cosign verify-blob-attestation` and other | |
| 4 | //! in-toto and SLSA verifiers read it. The runner signed the job's receipt | |
| 5 | //! with a key the hub holds no secret of; the hub checked that receipt when | |
| 6 | //! it kept it, and this envelope is the hub's statement of what the receipt | |
| 7 | //! says, in the shape the wider tools understand. `/.well-known/oxyhub-signing.pem` | |
| 8 | //! is the public key, as cosign's `--key` takes it. | |
| 9 | | |
| 10 | use crateShared; | |
| 11 | pub use pae; | |
| 12 | ||
| 13 | /// DSSE's payload type for in-toto statements. | |
| 14 | pub const PAYLOAD_TYPE: &str = IN_TOTO; | |
| 15 | ||
| 16 | /// What SLSA calls the build type of a Flow job: one URI wherever the job | |
| 17 | /// ran, the same `oxy receipt export --format slsa` writes. | |
| 18 | pub const BUILD_TYPE: &str = "https://oxygenhub.io/oxygenflow/job/v1"; | |
| 19 | ||
| 20 | /// What the statement says of one artifact. | |
| 21 | | |
| 22 | | |
| 23 | | |
| 24 | | |
| 25 | | |
| 26 | | |
| 27 | | |
| 28 | | |
| 29 | | |
| 30 | | |
| 31 | | |
| 32 | | |
| 33 | | |
| 34 | | |
| 35 | | |
| 36 | | |
| 37 | | |
| 38 | | |
| 39 | | |
| 40 | | |
| 41 | ||
| 42 | /// The in-toto Statement v1 with an SLSA provenance v1 predicate. | |
| 43 | 1× | |
| 44 | | |
| 45 | 1× | |
| 46 | 2× | |
| 47 | 2× | |
| 48 | 2× | |
| 49 | 2× | |
| 50 | 1× | |
| 51 | 1× | |
| 52 | 1× | |
| 53 | 1× | |
| 54 | 1× | |
| 55 | 1× | |
| 56 | 1× | |
| 57 | 1× | |
| 58 | 1× | |
| 59 | 1× | |
| 60 | 1× | |
| 61 | 1× | |
| 62 | 1× | |
| 63 | 1× | |
| 64 | 1× | |
| 65 | 1× | |
| 66 | 1× | |
| 67 | 1× | |
| 68 | 1× | |
| 69 | | |
| 70 | 1× | |
| 71 | 1× | |
| 72 | 1× | |
| 73 | 1× | |
| 74 | | |
| 75 | | |
| 76 | 1× | |
| 77 | 1× | |
| 78 | 1× | |
| 79 | | |
| 80 | 1× | |
| 81 | 1× | |
| 82 | 1× | |
| 83 | 1× | |
| 84 | 1× | |
| 85 | | |
| 86 | | |
| 87 | | |
| 88 | | |
| 89 | 1× | |
| 90 | ||
| 91 | /// `statement` in a DSSE envelope signed with the hub's key. | |
| 92 | 1× | |
| 93 | 1× | |
| 94 | 1× | |
| 95 | 1× | |
| 96 | 1× | |
| 97 | ||
| 98 | /// The hub's Ed25519 public key as a PEM SubjectPublicKeyInfo. | |
| 99 | 1× | |
| 100 | 1× | |
| 101 | 1× | |