Skip to content

Commit 841a58b

Browse files
Implement standardized CI extensions for GitHub (#1073)
* Implement standardized CI extensions for GitHub This adds the set of standardized extensions and creates the mapping for GitHub Actions. All extension values are DER-encoded strings. This also creates a duplicated issuer extension to match the encoding that was used for the new extensions. OIDs 1.1 through 1.6 will be deprecated but still present in the certificates until a future major version of Fulcio. Updated the OID numbers so that the issuer is the first of the new OIDs. A future refactor will be ideal when implementing the extensions for other CI platforms. Signed-off-by: Hayden Blauzvern <[email protected]> --------- Signed-off-by: Hayden Blauzvern <[email protected]>
1 parent 7f322e7 commit 841a58b

File tree

7 files changed

+1105
-217
lines changed

7 files changed

+1105
-217
lines changed

docs/oid-info.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ Nice-to-haves:
4545
- Fully qualified URL: Complete URL with protocol.
4646
- `Digest`: Output of a cryptographic hash function, e.g. git commit SHA
4747

48+
## Extension values
49+
50+
`1.3.6.1.4.1.57264.1.1` through `1.3.6.1.4.1.57264.1.6` are formatted as raw strings without any DER encoding.
51+
52+
`1.3.6.1.4.1.57264.1.7` is formatted as a DER-encoded string in the SubjectAlternativeName extension, as per RFC 5280 4.2.1.6.
53+
54+
`1.3.6.1.4.1.57264.1.8` through `1.3.6.1.4.1.57264.1.21` are formatted as DER-encoded strings; the ASN.1 tag is
55+
UTF8String (0x0C) and the tag class is universal.
56+
4857
## Directory
4958

5059
Note that all values begin from the root OID 1.3.6.1.4.1.57264 [registered by Sigstore][oid-link].
@@ -97,60 +106,70 @@ the git ref that the workflow run was based upon.
97106
This specifies the username identity in the OtherName Subject Alternative Name, as
98107
defined by [RFC5280 4.2.1.6](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.6).
99108

100-
### 1.3.6.1.4.1.57264.1.8 | Build Signer URI
109+
### 1.3.6.1.4.1.57264.1.8 | Issuer (V2)
110+
111+
This contains the `iss` claim from the OIDC Identity Token that was
112+
presented at the time the code signing certificate was requested to be created.
113+
This claim is the URI of the OIDC Identity Provider that digitally signed the
114+
identity token. For example: `https://oidc-issuer.com`.
115+
116+
The difference between this extension and `1.3.6.1.4.1.57264.1.1` is that the extension value
117+
is formatted to the RFC 5280 specification as a DER-encoded string.
118+
119+
### 1.3.6.1.4.1.57264.1.9 | Build Signer URI
101120

102121
Reference to specific build instructions that are responsible for signing. SHOULD be fully qualified. MAY be the same as Build Config URI. Build Signer URI is also included in the Subject Alternative Name.
103122

104123
For example a reusable workflow ref in GitHub Actions or a Circle CI Orb name/version. For example: `https://github.com/slsa-framework/slsa-github-generator/.github/workflows/[email protected]`.
105124

106-
### 1.3.6.1.4.1.57264.1.9 | Build Signer Digest
125+
### 1.3.6.1.4.1.57264.1.10 | Build Signer Digest
107126

108127
Immutable reference to the specific version of the build instructions that is responsible for signing. For example: `abc123` git commit SHA.
109128

110-
### 1.3.6.1.4.1.57264.1.10 | Runner Environment
129+
### 1.3.6.1.4.1.57264.1.11 | Runner Environment
111130

112131
Runner Environment specifying whether the build took place in platform-hosted cloud infrastructure or customer/self-hosted infrastructure. For example: `[platform]-hosted` and `self-hosted`.
113132

114-
### 1.3.6.1.4.1.57264.1.11 | Source Repository URI
133+
### 1.3.6.1.4.1.57264.1.12 | Source Repository URI
115134

116135
Source repository URL that the build was based on. SHOULD be fully qualified. For example: `https://example.com/owner/repository`.
117136

118-
### 1.3.6.1.4.1.57264.1.12 | Source Repository Digest
137+
### 1.3.6.1.4.1.57264.1.13 | Source Repository Digest
119138

120139
Immutable reference to a specific version of the source code that the build
121140
was based upon. For example: `abc123` git commit SHA.
122141

123-
### 1.3.6.1.4.1.57264.1.13 | Source Repository Ref
142+
### 1.3.6.1.4.1.57264.1.14 | Source Repository Ref
124143

125144
Source Repository Ref that the build run was based upon. For example: `refs/head/main` git branch or tag.
126145

127-
### 1.3.6.1.4.1.57264.1.14 | Source Repository Identifier
146+
### 1.3.6.1.4.1.57264.1.15 | Source Repository Identifier
128147

129148
Immutable identifier for the source repository the workflow was based upon. MAY be empty if the Source Repository URI is immutable. For example: `1234` if using a primary key.
130149

131-
### 1.3.6.1.4.1.57264.1.15 | Source Repository Owner URI
150+
### 1.3.6.1.4.1.57264.1.16 | Source Repository Owner URI
132151

133152
Source repository owner URL of the owner of the source repository that the build was based
134153
on. SHOULD be fully qualified. MAY be empty if there is no Source Repository Owner. For example: `https://example.com/owner`
135154

136-
### 1.3.6.1.4.1.57264.1.16 | Source Repository Owner Identifier
155+
### 1.3.6.1.4.1.57264.1.17 | Source Repository Owner Identifier
137156

138157
Immutable identifier for the owner of the source repository that the workflow was based upon. MAY be empty if there is no Source Repository Owner or Source Repository Owner URI is immutable. For example: `5678` if using a primary key.
139158

140-
### 1.3.6.1.4.1.57264.1.17 | Build Config URI
159+
### 1.3.6.1.4.1.57264.1.18 | Build Config URI
141160

142161
Build Config URL to the top-level/initiating build instructions. SHOULD be fully qualified. For example: `https://example.com/owner/repository/build-config.yml`.
143162

144-
### 1.3.6.1.4.1.57264.1.18 | Build Config Digest
163+
### 1.3.6.1.4.1.57264.1.19 | Build Config Digest
145164

146165
Immutable reference to the specific version of the top-level/initiating build
147166
instructions. For example: `abc123` git commit SHA.
148167

149-
### 1.3.6.1.4.1.57264.1.19 | Build Trigger
168+
### 1.3.6.1.4.1.57264.1.20 | Build Trigger
150169

151170
Event or action that initiated the build. For example: `push`.
152171

153-
### 1.3.6.1.4.1.57264.1.20 | Run Invocation URI
172+
### 1.3.6.1.4.1.57264.1.21 | Run Invocation URI
154173

155174
Run Invocation URL to uniquely identify the build execution. SHOULD be fully qualified. For example: `https://github.com/example/repository/actions/runs/1536140711/attempts/1`.
156175

0 commit comments

Comments
 (0)