ppkarwasz commented on code in PR #422:
URL: 
https://github.com/apache/commons-release-plugin/pull/422#discussion_r3111117641


##########
src/site/markdown/slsa/v0.1.0.md:
##########
@@ -0,0 +1,131 @@
+<!-- SPDX-License-Identifier: Apache-2.0 -->
+
+# Build Type: Apache Commons Maven Release
+
+```jsonc
+"buildType": 
"https://commons.apache.org/proper/commons-release-plugin/slsa/v0.1.0";
+```
+
+This is a [SLSA Build Provenance](https://slsa.dev/spec/v1.2/build-provenance) 
build type
+that describes releases produced by Apache Commons PMC release managers 
running Maven on their own equipment.
+
+## Build definition
+
+Artifacts are generated by a single Maven execution, typically of the form:
+
+```shell
+mvn -Prelease deploy
+```
+
+The provenance is recorded by the `build-attestation` goal of the
+`commons-release-plugin`, which runs in the `verify` phase.
+
+### External parameters
+
+External parameters capture everything supplied by the release manager at 
invocation time.
+All parameters are captured from the running Maven session.
+
+| Parameter               | Type     | Description                             
                                |
+|-------------------------|----------|-------------------------------------------------------------------------|
+| `maven.goals`           | string[] | The list of Maven goals passed on the 
command line (e.g. `["deploy"]`). |
+| `maven.profiles`        | string[] | The list of active profiles passed via 
`-P` (e.g. `["release"]`).       |
+| `maven.user.properties` | object   | User-defined properties passed via `-D` 
flags.                          |
+| `maven.cmdline`         | string   | The reconstructed Maven command line.   
                                |
+| `jvm.args`              | string[] | JVM input arguments.                    
                                |
+| `env`                   | object   | A filtered subset of environment 
variables: `TZ` and locale variables.  |
+
+### Internal parameters
+
+No internal parameters are recorded for this build type.
+
+### Resolved dependencies
+
+The `resolvedDependencies` list captures all inputs that contributed to the 
build output.
+It always contains the following entries, in order:
+
+#### JDK
+
+Represents the Java Development Kit used to run Maven (`"name": "JDK"`).
+To allow verification of the JDK's integrity, a `gitTree` digest is computed 
over the `java.home` directory.
+
+The following annotations are recorded from [
+`System.getProperties()`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#getProperties()):
+
+| Annotation key                      | System property                        
  | Description                                                              |
+|-------------------------------------|------------------------------------------|--------------------------------------------------------------------------|
+| `version`                           | `java.version`                         
  | Java Runtime Environment version.                                        |
+| `version.date`                      | `java.version.date`                    
  | Java Runtime Environment version date, in ISO-8601 YYYY-MM-DD format.    |
+| `vendor`                            | `java.vendor`                          
  | Java Runtime Environment vendor.                                         |
+| `vendor.url`                        | `java.vendor.url`                      
  | Java vendor URL.                                                         |
+| `vendor.version`                    | `java.vendor.version`                  
  | Java vendor version _(optional)_.                                        |
+| `home`                              | `java.home`                            
  | Java installation directory.                                             |
+| `vm.specification.version`          | `java.vm.specification.version`        
  | Java Virtual Machine specification version.                              |
+| `vm.specification.vendor`           | `java.vm.specification.vendor`         
  | Java Virtual Machine specification vendor.                               |
+| `vm.specification.name`             | `java.vm.specification.name`           
  | Java Virtual Machine specification name.                                 |
+| `vm.version`                        | `java.vm.version`                      
  | Java Virtual Machine implementation version.                             |
+| `vm.vendor`                         | `java.vm.vendor`                       
  | Java Virtual Machine implementation vendor.                              |
+| `vm.name`                           | `java.vm.name`                         
  | Java Virtual Machine implementation name.                                |
+| `specification.version`             | `java.specification.version`           
  | Java Runtime Environment specification version.                          |
+| `specification.maintenance.version` | 
`java.specification.maintenance.version` | Java Runtime Environment 
specification maintenance version _(optional)_. |
+| `specification.vendor`              | `java.specification.vendor`            
  | Java Runtime Environment specification vendor.                           |
+| `specification.name`                | `java.specification.name`              
  | Java Runtime Environment specification name.                             |
+
+#### Maven
+
+Represents the Maven installation used to run the build (`"name": "Maven"`).
+To allow verification of the installation's integrity, a `gitTree` hash is 
computed over the `maven.home` directory.
+
+The `uri` key contains the Package URL of the Maven distribution, as published 
to Maven Central.
+
+The following annotations are sourced from Maven's `build.properties`, bundled 
inside the Maven distribution.
+They are only present if the resource is accessible from Maven's Core 
Classloader at runtime.
+
+| Annotation key          | Description                                        
          |
+|-------------------------|--------------------------------------------------------------|
+| `distributionId`        | The ID of the Maven distribution.                  
          |
+| `distributionName`      | The full name of the Maven distribution.           
          |
+| `distributionShortName` | The short name of the Mavendistribution.           
          |
+| `buildNumber`           | The Git commit hash from which this Maven release 
was built. |
+| `version`               | The Maven version string.                          
          |
+
+#### Source repository
+
+Represents the source code being built.
+The URI follows
+the [SPDX Download 
Location](https://spdx.github.io/spdx-spec/v2.3/package-information/#77-package-download-location-field)
+format.
+
+#### Project dependencies
+
+One entry per resolved Maven dependency (compile + runtime scope), as declared 
in the project's POM.
+These are appended after the build tool entries above.
+
+| Field           | Value                                               |
+|-----------------|-----------------------------------------------------|
+| `name`          | Artifact filename, e.g. `commons-lang3-3.14.0.jar`. |
+| `uri`           | Package URL.                                        |
+| `digest.sha256` | SHA-256 hex digest of the artifact file on disk.    |
+
+## Run details
+
+### Builder
+
+The `builder.id` is always `https://commons.apache.org/builds/0.1.0`.
+It represents the commons-release-plugin acting as the build platform.
+
+## Subjects
+
+The attestation covers all artifacts attached to the Maven project at the time 
the `verify` phase runs:
+the primary artifact (e.g. the JAR) and any attached artifacts (e.g. sources 
JAR, javadoc JAR, POM).
+
+| Field           | Value                                    |
+|-----------------|------------------------------------------|
+| `name`          | Artifact filename.                       |
+| `uri`           | Package URL.                             |
+| `digest.sha256` | SHA-256 hex digest of the artifact file. |
+
+## Version history

Review Comment:
   It took some refactoring of the tests, but now tests are based on a file in 
`src/test/resources/attestations` and an excerpt of that file is added to the 
documentation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to