@crombolo/server 0.58.0 → 0.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +14 -14
- package/src/config.ts +1 -1
- package/src/provenance.ts +12 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/server",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.1",
|
|
4
4
|
"description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. The crombolo HTTP server: routing, configuration, media stores and background jobs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@crombolo/api-delivery": "0.58.
|
|
35
|
-
"@crombolo/api-management": "0.58.
|
|
36
|
-
"@crombolo/auth": "0.58.
|
|
37
|
-
"@crombolo/backoffice-host": "0.58.
|
|
38
|
-
"@crombolo/common": "0.58.
|
|
39
|
-
"@crombolo/content": "0.58.
|
|
40
|
-
"@crombolo/contracts": "0.58.
|
|
41
|
-
"@crombolo/core": "0.58.
|
|
42
|
-
"@crombolo/data": "0.58.
|
|
43
|
-
"@crombolo/extension": "0.58.
|
|
44
|
-
"@crombolo/render": "0.58.
|
|
45
|
-
"@crombolo/schema": "0.58.
|
|
46
|
-
"@crombolo/transfer": "0.58.
|
|
34
|
+
"@crombolo/api-delivery": "0.58.1",
|
|
35
|
+
"@crombolo/api-management": "0.58.1",
|
|
36
|
+
"@crombolo/auth": "0.58.1",
|
|
37
|
+
"@crombolo/backoffice-host": "0.58.1",
|
|
38
|
+
"@crombolo/common": "0.58.1",
|
|
39
|
+
"@crombolo/content": "0.58.1",
|
|
40
|
+
"@crombolo/contracts": "0.58.1",
|
|
41
|
+
"@crombolo/core": "0.58.1",
|
|
42
|
+
"@crombolo/data": "0.58.1",
|
|
43
|
+
"@crombolo/extension": "0.58.1",
|
|
44
|
+
"@crombolo/render": "0.58.1",
|
|
45
|
+
"@crombolo/schema": "0.58.1",
|
|
46
|
+
"@crombolo/transfer": "0.58.1",
|
|
47
47
|
"@logtape/logtape": "^2.3.8",
|
|
48
48
|
"@opentelemetry/api": "1.10.0",
|
|
49
49
|
"@opentelemetry/context-async-hooks": "3.0.0",
|
package/src/config.ts
CHANGED
|
@@ -1144,7 +1144,7 @@ export function describeDatabase(
|
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
|
-
export const VERSION = '0.58.
|
|
1147
|
+
export const VERSION = '0.58.1'
|
|
1148
1148
|
|
|
1149
1149
|
/** A whole number of seconds from the environment; undefined when unset or not one. */
|
|
1150
1150
|
/** A positive number from a setting, else the default. */
|
package/src/provenance.ts
CHANGED
|
@@ -37,12 +37,22 @@ const GITHUB_ISSUER = 'https://token.actions.githubusercontent.com'
|
|
|
37
37
|
const SIGSTORE = 'sigstore'
|
|
38
38
|
const SIGSTORE_TUF = '@sigstore/tuf'
|
|
39
39
|
interface SigstoreModule {
|
|
40
|
-
attest(
|
|
40
|
+
attest(
|
|
41
|
+
payload: Buffer,
|
|
42
|
+
payloadType: string,
|
|
43
|
+
options?: { timeout?: number },
|
|
44
|
+
): Promise<SerializedBundle>
|
|
41
45
|
}
|
|
42
46
|
interface TufModule {
|
|
43
47
|
getTrustedRoot(options: { cachePath: string; forceCache?: boolean }): Promise<TrustedRoot>
|
|
44
48
|
}
|
|
45
49
|
const IN_TOTO = 'application/vnd.in-toto+json'
|
|
50
|
+
/**
|
|
51
|
+
* How long Sigstore's log is given to answer. Its default, five seconds, retries
|
|
52
|
+
* an upload the log has already taken but was slow to confirm, and the retry is
|
|
53
|
+
* refused as a duplicate entry (0.58.0's release).
|
|
54
|
+
*/
|
|
55
|
+
const SIGSTORE_TIMEOUT_MS = 60_000
|
|
46
56
|
|
|
47
57
|
/** Fulcio's certificate extensions: what GitHub said about the job that signed. */
|
|
48
58
|
const OID = {
|
|
@@ -357,7 +367,7 @@ export async function signPackage(
|
|
|
357
367
|
)
|
|
358
368
|
const { attest } = (await import(SIGSTORE)) as SigstoreModule
|
|
359
369
|
const digest = packageDigest(dir)
|
|
360
|
-
const signature = await attest(statement(digest), IN_TOTO)
|
|
370
|
+
const signature = await attest(statement(digest), IN_TOTO, { timeout: SIGSTORE_TIMEOUT_MS })
|
|
361
371
|
const source = sourceOf(signature)
|
|
362
372
|
if (!source) throw new Error('The signature Sigstore returned names no GitHub repository.')
|
|
363
373
|
// A key's signature already there is over the same digest, and kept (story 316).
|