Skip to content

Commit 3cf6f0d

Browse files
authored
fix: update provenance transparency log link (#6287)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
1 parent 8de8508 commit 3cf6f0d

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

workspaces/libnpmpublish/lib/publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ciInfo = require('ci-info')
99

1010
const { generateProvenance } = require('./provenance')
1111

12-
const TLOG_BASE_URL = 'https://rekor.sigstore.dev/api/v1/log/entries'
12+
const TLOG_BASE_URL = 'https://search.sigstore.dev/'
1313

1414
const publish = async (manifest, tarballData, opts) => {
1515
if (manifest.private) {

workspaces/libnpmpublish/test/publish.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,11 @@ t.test('publish existing package with provenance in gha', async t => {
640640
entryPoint: workflowPath,
641641
}
642642

643-
const { publish } = t.mock('..', { 'ci-info': t.mock('ci-info') })
643+
const log = []
644+
const { publish } = t.mock('..', {
645+
'ci-info': t.mock('ci-info'),
646+
'proc-log': { notice: (...msg) => log.push(['notice', ...msg]) },
647+
})
644648
const registry = new MockRegistry({
645649
tap: t,
646650
registry: opts.registry,
@@ -670,6 +674,7 @@ t.test('publish existing package with provenance in gha', async t => {
670674
const rekorURL = 'https://mock.rekor'
671675
const signature = 'ABC123'
672676
const b64Cert = Buffer.from(leafCertificate).toString('base64')
677+
const logIndex = 2513258
673678
const uuid =
674679
'69e5a0c1663ee4452674a5c9d5050d866c2ee31e2faaf79913aea7cc27293cf6'
675680

@@ -692,7 +697,7 @@ t.test('publish existing package with provenance in gha', async t => {
692697
integratedTime: 1654015743,
693698
logID:
694699
'c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d',
695-
logIndex: 2513258,
700+
logIndex,
696701
verification: {
697702
/* eslint-disable-next-line max-len */
698703
signedEntryTimestamp: 'MEUCIQD6CD7ZNLUipFoxzmSL/L8Ewic4SRkXN77UjfJZ7d/wAAIgatokSuX9Rg0iWxAgSfHMtcsagtDCQalU5IvXdQ+yLEA=',
@@ -789,6 +794,13 @@ t.test('publish existing package with provenance in gha', async t => {
789794
rekorURL: rekorURL,
790795
})
791796
t.ok(ret, 'publish succeeded')
797+
t.match(log, [
798+
['notice', 'publish',
799+
'Signed provenance statement with source and build information from GitHub Actions'],
800+
['notice', 'publish',
801+
/* eslint-disable-next-line max-len */
802+
`Provenance statement published to transparency log: https://search.sigstore.dev/?logIndex=${logIndex}`],
803+
])
792804
})
793805

794806
t.test('publish new/private package with provenance in gha - no access', async t => {

0 commit comments

Comments
 (0)