|
18 | 18 | /** |
19 | 19 | * SLSA 1.2 Build Attestation Models. |
20 | 20 | * |
21 | | - * <p>This package provides Jackson-annotated model classes that implement the <a |
22 | | - * href="https://slsa.dev/spec/v1.2">Supply-chain Levels for Software Artifacts (SLSA) v1.2 |
23 | | - * specification</a>. |
| 21 | + * <p>This package provides Jackson-annotated model classes that implement the <a href="https://slsa.dev/spec/v1.2">Supply-chain Levels for Software Artifacts |
| 22 | + * (SLSA) v1.2 specification</a>.</p> |
24 | 23 | * |
25 | 24 | * <h2>Overview</h2> |
26 | 25 | * |
27 | | - * <p>SLSA is a framework for evaluating and improving the security posture of build systems. SLSA |
28 | | - * v1.2 defines a standard for recording build provenance - information about how software |
29 | | - * artifacts were produced. |
30 | | - * |
31 | | - * <h2>Core Models</h2> |
32 | | - * |
33 | | - * <ul> |
34 | | - * <li><b>{@link org.apache.commons.build.models.slsa.v1_2.Provenance}</b> - Root object |
35 | | - * describing the build provenance. Contains BuildDefinition and RunDetails. |
36 | | - * <li><b>{@link org.apache.commons.build.models.slsa.v1_2.BuildDefinition}</b> - Specifies |
37 | | - * the inputs that define the build, including build type, configuration, external |
38 | | - * parameters, and resolved dependencies. |
39 | | - * <li><b>{@link org.apache.commons.build.models.slsa.v1_2.RunDetails}</b> - Specifies the |
40 | | - * details about the build invocation and environment, including the builder identity and |
41 | | - * build metadata. |
42 | | - * </ul> |
43 | | - * |
44 | | - * <h2>Supporting Models</h2> |
45 | | - * |
46 | | - * <ul> |
47 | | - * <li><b>{@link org.apache.commons.build.models.slsa.v1_2.Builder}</b> - Identifies the |
48 | | - * entity that executed the build. |
49 | | - * <li><b>{@link org.apache.commons.build.models.slsa.v1_2.BuildMetadata}</b> - Contains |
50 | | - * metadata about the build invocation, including timing information. |
51 | | - * <li><b>{@link org.apache.commons.build.models.slsa.v1_2.ResourceDescriptor}</b> - Describes |
52 | | - * an artifact or resource referenced in the build by URI and cryptographic digest. |
53 | | - * </ul> |
54 | | - * |
55 | | - * <h2>Usage Example</h2> |
56 | | - * |
57 | | - * <pre> |
58 | | - * // Create a builder |
59 | | - * Builder builder = new Builder(); |
60 | | - * builder.setId("https://github.com/actions"); |
61 | | - * builder.setVersion("1.0"); |
62 | | - * |
63 | | - * // Create build metadata |
64 | | - * BuildMetadata buildMetadata = new BuildMetadata(); |
65 | | - * buildMetadata.setInvocationId("build-12345"); |
66 | | - * buildMetadata.setStartedOn(OffsetDateTime.now(ZoneOffset.UTC)); |
67 | | - * buildMetadata.setFinishedOn(OffsetDateTime.now(ZoneOffset.UTC)); |
68 | | - * |
69 | | - * // Create run details |
70 | | - * RunDetails runDetails = new RunDetails(); |
71 | | - * runDetails.setBuilder(builder); |
72 | | - * runDetails.setMetadata(buildMetadata); |
73 | | - * |
74 | | - * // Create build definition |
75 | | - * BuildDefinition buildDefinition = new BuildDefinition(); |
76 | | - * buildDefinition.setBuildType("https://github.com/actions"); |
77 | | - * buildDefinition.setExternalParameters(new HashMap<>()); |
78 | | - * |
79 | | - * // Create provenance |
80 | | - * Provenance provenance = new Provenance(); |
81 | | - * provenance.setBuildDefinition(buildDefinition); |
82 | | - * provenance.setRunDetails(runDetails); |
83 | | - * |
84 | | - * // Serialize with Jackson |
85 | | - * ObjectMapper mapper = new ObjectMapper(); |
86 | | - * String json = mapper.writeValueAsString(provenance); |
87 | | - * </pre> |
88 | | - * |
89 | | - * <h2>Jackson Integration</h2> |
90 | | - * |
91 | | - * <p>All models use Jackson annotations for JSON serialization/deserialization: |
92 | | - * |
93 | | - * <ul> |
94 | | - * <li>{@code @JsonProperty} - Maps field names to JSON properties |
95 | | - * <li>{@code @JsonInclude} - Controls inclusion of null/empty values in serialization |
96 | | - * <li>{@code @JsonFormat} - Specifies date/time formatting |
97 | | - * </ul> |
98 | | - * |
99 | | - * <p>The models are compatible with Jackson's ObjectMapper and support both serialization to |
100 | | - * JSON and deserialization from JSON. |
101 | | - * |
102 | | - * <h2>Validation</h2> |
103 | | - * |
104 | | - * <p>Some models include Jakarta Validation annotations: |
105 | | - * |
106 | | - * <ul> |
107 | | - * <li>{@code @NotBlank} - Ensures required string fields are not empty |
108 | | - * </ul> |
109 | | - * |
110 | | - * <p>Users can enable validation using a Jakarta Validation provider to ensure provenance |
111 | | - * integrity. |
112 | | - * |
113 | | - * <h2>Reference</h2> |
| 26 | + * <p>SLSA is a framework for evaluating and improving the security posture of build systems. SLSA v1.2 defines a standard for recording build provenance: |
| 27 | + * information about how software artifacts were produced.</p> |
114 | 28 | * |
115 | 29 | * @see <a href="https://slsa.dev/spec/v1.2">SLSA v1.2 Specification</a> |
116 | 30 | * @see <a href="https://github.com/in-toto/attestation">In-toto Attestation Framework</a> |
|
0 commit comments