From 25fec67b005cad01266756fe34b4a4fa66b8c15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=90=EC=84=B1=EC=A4=80?= Date: Sun, 29 Nov 2026 01:24:25 +0900 Subject: [PATCH] =?UTF-8?q?npm=20=EA=B2=8C=EC=8B=9C=EB=A5=BC=20token=20?= =?UTF-8?q?=EB=8C=80=EC=8B=A0=20trusted=20publishing(OIDC)=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bypass-2FA token의 직접 게시가 2027-01에 막히는 데 대응해 ADR-0034를 ADR-0095로 대체한다. publish-npm job에서 NPM_TOKEN·NODE_AUTH_TOKEN·registry-url을 빼고, OIDC dist-tag를 지원하는 npm 11.21.3을 고정 sha512로 확인한 뒤 설치한다(Node 24.20.0 내장 npm 11.19.0은 미지원). publish.mjs는 그대로다. workflow 검사는 token 재도입·integrity 비교 제거·registry-url 3가지 변형을 모두 거절하는 것을 확인했다. 실제 OIDC 게시는 trusted publisher 등록 뒤 다음 rc에서 검증한다. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 24 +++++-- README.md | 1 + docs/adr/0034-npm-token-publishing-policy.md | 3 +- docs/adr/0095-npm-trusted-publishing.md | 70 ++++++++++++++++++++ docs/development/npm-distribution.md | 30 +++++---- docs/development/releasing.md | 14 ++-- scripts/check-npm-distribution-workflow.sh | 40 +++++------ scripts/check-rc3-public-docs.sh | 18 ++--- 8 files changed, 146 insertions(+), 54 deletions(-) create mode 100644 docs/adr/0095-npm-trusted-publishing.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c98f90..7941deb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,7 +126,7 @@ jobs: test -n "$package_version" test "$RELEASE_TAG" = "v$package_version" - - name: Require npm token publishing readiness + - name: Require npm trusted publishing readiness env: NPM_PUBLISH_ENABLED: ${{ vars.XGEN_NPM_PUBLISH_ENABLED }} shell: bash @@ -831,7 +831,7 @@ jobs: } publish-npm: - name: Publish npm packages with token authentication and provenance + name: Publish npm packages with trusted publishing and provenance needs: publish runs-on: ubuntu-24.04 permissions: @@ -850,7 +850,22 @@ jobs: with: node-version: 24.20.0 package-manager-cache: false - registry-url: https://registry.npmjs.org/ + + - name: Install pinned npm for OIDC publish and dist-tag + env: + NPM_VERSION: 11.21.3 + NPM_INTEGRITY: sha512-5Cf+jE+XctbhH/zjOOqXC+ity7eec/Tkk4Ql38tf6w+1htp2wYPHmE4c1R1Es3DY227Ac14+SLrlYJwkBicbTg== + shell: bash + run: | + set -euo pipefail + tarball="$RUNNER_TEMP/npm-$NPM_VERSION.tgz" + curl --fail --silent --show-error --location --proto '=https' --tlsv1.2 \ + --output "$tarball" \ + "https://registry.npmjs.org/npm/-/npm-$NPM_VERSION.tgz" + actual="sha512-$(openssl dgst -sha512 -binary "$tarball" | base64 -w0)" + test "$actual" = "$NPM_INTEGRITY" + npm install --global --ignore-scripts --no-audit --no-fund "$tarball" + test "$(npm --version)" = "$NPM_VERSION" - name: Recheck immutable GitHub Release binding env: @@ -931,12 +946,11 @@ jobs: - name: Publish platform packages then launcher env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} RELEASE_TAG: ${{ github.event.workflow_run.head_branch }} shell: bash run: | set -euo pipefail - test -n "$NODE_AUTH_TOKEN" + test "$(npm --version)" = 11.21.3 node npm/scripts/publish.mjs \ --directory release \ --tag "$RELEASE_TAG" diff --git a/README.md b/README.md index b4eedc9..6e3a171 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,7 @@ durable completion에 저장해. 기존 기본 출력은 유지해. - [ADR-0045: 제공자 온보딩과 최소 대화 화면](docs/adr/0045-interactive-onboarding-and-thinking-display.md) - [ADR-0046: XGEN 이름 통일과 기존 저장 데이터 호환](docs/adr/0046-xgen-public-name-and-storage-compatibility.md) - [ADR-0034: npm granular token 게시와 provenance 분리](docs/adr/0034-npm-token-publishing-policy.md) +- [ADR-0095: npm trusted publishing(OIDC) 게시](docs/adr/0095-npm-trusted-publishing.md) ## 개발 및 검증 diff --git a/docs/adr/0034-npm-token-publishing-policy.md b/docs/adr/0034-npm-token-publishing-policy.md index 08afa8b..590665f 100644 --- a/docs/adr/0034-npm-token-publishing-policy.md +++ b/docs/adr/0034-npm-token-publishing-policy.md @@ -1,6 +1,7 @@ # ADR-0034: npm은 granular token으로 게시하고 provenance는 OIDC로 증명한다 -- 상태: Accepted (`@xgen` scope 이름은 [ADR-0051](0051-npm-package-scope-xgen-ai.md)가 대체) +- 상태: Superseded by [ADR-0095](0095-npm-trusted-publishing.md) (2026-11-29, bypass-2FA token 직접 게시 종료 대응). + `@xgen` scope 이름은 [ADR-0051](0051-npm-package-scope-xgen-ai.md)가 대체 - 날짜: 2026-09-02 - 적용 범위: npm package bootstrap, GitHub Actions release, npm credential 운영 - 대체 결정: ADR-0031의 npm Trusted Publisher와 계정 2FA 요구 diff --git a/docs/adr/0095-npm-trusted-publishing.md b/docs/adr/0095-npm-trusted-publishing.md new file mode 100644 index 0000000..0afa289 --- /dev/null +++ b/docs/adr/0095-npm-trusted-publishing.md @@ -0,0 +1,70 @@ +# ADR-0095: npm 게시를 trusted publishing(OIDC)으로 옮긴다 + +- 날짜: 2026-11-29 +- 상태: 채택. workflow 변경 구현, npm 쪽 trusted publisher 등록과 실제 게시 검증은 다음 rc에서 한다. +- 대체: [ADR-0034](0034-npm-token-publishing-policy.md)의 granular token 인증 결정. provenance·SRI·launcher-last + 검증은 그대로 둔다. +- 범위: release workflow의 `publish-npm` job, 운영 문서와 workflow 검사. CLI runtime, Planner 입력, journal은 + 바꾸지 않는다. + +## 문제와 근거 + +ADR-0034는 계정 2FA와 trusted publisher 설정이라는 사람 개입을 피하려고 `bypass 2FA` granular token을 +골랐다. npm은 이 전제를 없앤다. + +- npm access token 문서(2026-09-10 수정): bypass-2FA token의 직접 게시 권한은 2027년 1월에 제거된다. + 이후 token은 `npm stage publish`로 staging만 할 수 있고 최종 게시는 maintainer의 2FA 승인이 필요하다. + token을 유지하면 release마다 사람이 승인해야 한다. +- GitHub changelog(2026-09-30): trusted publishing 설정마다 opt-in `Allow npm dist-tag` 권한이 생겼다 + (npm CLI 11.21.0 이상). 이전에는 OIDC로 `npm dist-tag add`를 할 수 없어서 launcher `latest` 갱신 + ([ADR-0088](0088-first-use-preview-distribution.md))에는 token이 필요했다. + +trusted publishing은 package마다 한 번 2FA로 등록하면 이후 release는 사람 개입 없이 끝난다. token 탈취 +위험도 사라진다. + +## 결정 + +1. `publish-npm` job은 npm token을 받지 않는다. `secrets.NPM_TOKEN`, `NODE_AUTH_TOKEN`, + `actions/setup-node`의 `registry-url`(token 참조 npmrc를 만든다)을 workflow에서 뺀다. 기존 + `id-token: write`가 이제 npm 인증과 provenance 둘 다에 쓰인다. +2. Node 24.20.0에 들어 있는 npm 11.19.0은 OIDC dist-tag를 지원하지 않는다. job은 npm 11.21.3 tarball을 + registry에서 받아 workflow에 고정한 sha512 integrity와 비교한 뒤 global 설치하고, 게시 step에서 version을 + 다시 확인한다. +3. `publish.mjs`는 바꾸지 않는다. `--provenance`, launcher-last, SRI·dist-tag·provenance 사후검증, + 동일 bytes 재실행 skip을 그대로 쓴다. +4. 여섯 package 모두 trusted publisher를 `PlateerLab/xgen-cli`, workflow `release.yml`, environment 없음으로 + 등록한다. launcher `@xgen-ai/cli`에만 `Allow npm dist-tag`를 켠다(`latest` 승격을 하는 유일한 package). +5. `XGEN_NPM_PUBLISH_ENABLED=true`는 이제 "여섯 package에 trusted publisher가 등록됐다"는 관리자 + 확인이다. 값이 없으면 native build 전에 release가 실패한다. +6. 첫 OIDC 게시가 검증된 뒤에 package 설정을 "Require two-factor authentication and disallow tokens"로 + 바꾸고 repository secret `NPM_TOKEN`과 npm token을 폐기한다. 검증 전에는 되돌릴 수 있게 남긴다. + +## 대안 + +- stage-only token + release마다 2FA 승인: 자동 release가 사라진다. 불채택. +- token으로 계속 직접 게시: 2027년 1월 이후 동작하지 않는다. +- setup-node의 Node version을 올려 npm을 바꾸기: OIDC dist-tag를 지원하는 npm이 들어 있는 Node 24 release가 + 아직 없다(24.22.3에 npm 11.19.1). Node가 따라오면 이 단계를 없앤다. + +## 검증 + +- `scripts/check-npm-distribution-workflow.sh`: workflow 전체에 `NPM_TOKEN`·`NODE_AUTH_TOKEN`·`_authToken`· + `registry-url:`가 없고, 고정 npm 설치 step에 version·integrity 비교가 있으며 bundle 검증이 게시보다 먼저인지 + 본다. +- 로컬: 고정 integrity와 registry tarball의 sha512가 일치했고, 설치한 npm 11.21.3에 `npm trust`가 있다. +- 남은 것: 실제 OIDC 게시와 launcher `latest` 갱신은 trusted publisher 등록 뒤 다음 rc release에서 확인한다. + 실패하면 GitHub Release는 이미 immutable이므로, 등록을 바로잡은 뒤 `publish-npm`만 재실행한다. + +## 운영 절차 (npm 관리자, 2FA 필요) + +```bash +# npm 11.15 이상 필요. 로컬 npm이 낮으면 npx로 고정 version을 쓴다. +for p in cli-linux-x64-musl cli-linux-arm64-musl cli-darwin-x64 cli-darwin-arm64 cli-win32-x64 cli; do + npx --yes npm@11.21.3 trust github "@xgen-ai/$p" \ + --file release.yml --repository PlateerLab/xgen-cli --allow-publish --yes +done +npx --yes npm@11.21.3 trust list @xgen-ai/cli +``` + +그다음 npmjs.com의 `@xgen-ai/cli` trusted publishing 설정에서 `Allow npm dist-tag`를 켠다. 새 설정은 +2일 안에 첫 게시가 성공하지 않으면 만료되므로 등록은 release tag 직전에 한다. diff --git a/docs/development/npm-distribution.md b/docs/development/npm-distribution.md index 569b87d..6a31df7 100644 --- a/docs/development/npm-distribution.md +++ b/docs/development/npm-distribution.md @@ -1,4 +1,7 @@ -# npm granular token 게시와 provenance 운영 +# npm trusted publishing 게시와 provenance 운영 + +게시 인증은 [ADR-0095](../adr/0095-npm-trusted-publishing.md)를 따른다. granular token 방식 +([ADR-0034](../adr/0034-npm-token-publishing-policy.md))은 rc.10까지 썼고 대체됐다. `@xgen-ai/cli`는 native XGEN를 npm으로 설치하기 위한 선택형 배포 계층이다. 직접 GitHub installer를 쓰는 사용자는 Node.js가 필요 없고, npm 경로를 고른 사용자는 Node.js 22.14 이상이 필요하다. 두 경로는 같은 @@ -30,9 +33,9 @@ compile은 없다. Launcher는 현재 platform package가 없으면 종료한다 1. 해당 계정 또는 npm organization이 `@xgen-ai` scope 여섯 package를 public으로 게시할 권한이 있는지 확인한다. 권한이나 scope 확보 여부가 불명확하면 `@xgen-ai/cli`를 게시하지 말고 naming ADR을 먼저 갱신한다. -2. npm에서 package read/write 권한과 `bypass 2FA`가 있는 granular access token을 준비한다. 가능하면 - `@xgen-ai` package 범위와 만료 시점을 제한한다. Token 값은 repository, release artifact, 문서와 명령 - 출력에 넣지 않고 GitHub Actions repository secret `NPM_TOKEN`에만 저장한다. +2. (이미 존재하는 package는 건너뛴다) 최초 bootstrap 게시에만 2FA가 켜진 계정의 일회성 로그인이나 + 짧은 수명 token을 현재 process에만 쓴다. Token 값은 repository, release artifact, 문서와 명령 출력에 + 넣지 않는다. 3. clean `main` checkout에서 bootstrap tarball을 만든다. ```bash @@ -48,9 +51,13 @@ node npm/scripts/bootstrap.mjs --output-dir "$bootstrap_dir" 순서로 `--access public --tag bootstrap` 게시한다. Token 값을 shell script나 npmrc에 literal로 쓰지 않는다. Bootstrap에는 실행 파일과 `bin` entry가 없고 GitHub provenance가 없는 package-name 예약용 version이다. -6. GitHub repository secret `NPM_TOKEN`이 설정된 것을 확인한 뒤 repository variable - `XGEN_NPM_PUBLISH_ENABLED=true`를 설정한다. 이 값은 token의 scope, write 권한과 `bypass 2FA`를 사람이 - 확인했다는 fail-closed acknowledgement다. +6. 여섯 package에 trusted publisher를 등록한다(2FA 필요, npm 11.15 이상). + `npm trust github "@xgen-ai/" --file release.yml --repository PlateerLab/xgen-cli --allow-publish --yes` + 를 package마다 실행하고, npmjs.com에서 launcher `@xgen-ai/cli` 설정에만 `Allow npm dist-tag`를 켠다. + 새 설정은 2일 안에 첫 게시가 없으면 만료되므로 release tag 직전에 한다. 그 뒤 repository variable + `XGEN_NPM_PUBLISH_ENABLED=true`를 둔다. 이 값은 등록을 사람이 확인했다는 fail-closed acknowledgement다. + 첫 OIDC 게시가 검증되면 package 설정을 "Require two-factor authentication and disallow tokens"로 바꾸고 + 이전 token과 repository secret을 폐기한다. 7. RC3 게시와 검증이 끝나면 bootstrap version을 deprecated 처리한다. Package 자체는 unpublish하지 않는다. @@ -68,10 +75,9 @@ quality + 5-platform native build -> 5-platform public registry install smoke ``` -npm publish job은 GitHub-hosted Ubuntu runner와 Node.js 24.20.0/npm 11.19.0을 사용한다. Granular token은 -GitHub secret `NPM_TOKEN`에서 publish 단일 step의 `NODE_AUTH_TOKEN`으로만 주입되고, checkout·bundle -검증과 다른 job에는 노출되지 않는다. `id-token: write`는 npm 인증이 아니라 `--provenance`의 GitHub OIDC -증명에만 사용한다. Prerelease는 `next`, stable은 `latest` dist-tag로 게시한다. 모든 package에는 npm +npm publish job은 GitHub-hosted Ubuntu runner와 Node.js 24.20.0을 쓰고, OIDC dist-tag를 지원하는 +npm 11.21.3을 고정 sha512로 확인한 뒤 설치한다. npm token은 workflow 어디에도 없다. `id-token: write`의 +GitHub OIDC가 npm trusted publishing 인증과 `--provenance` 증명에 함께 쓰인다. Prerelease는 `next`, stable은 `latest` dist-tag로 게시한다. 모든 package에는 npm provenance가 있어야 하며 registry metadata에서 SLSA provenance predicate가 확인되지 않으면 job이 실패한다. @@ -89,7 +95,7 @@ Platform package를 launcher보다 먼저 게시하므로 중간 실패가 가 tarball과 모두 같을 때만 skip한다. 하나라도 다르면 자동 수정, unpublish 또는 overwrite하지 않는다. - 동일 bytes인 일부 게시: 실패 job 재실행 -- Token 만료·scope·write 또는 `bypass 2FA` 오설정: secret을 바로잡은 뒤 실패 job 재실행 +- trusted publisher 미등록·만료·repository/workflow 이름 불일치, launcher dist-tag 권한 누락: npm 설정을 바로잡은 뒤 실패 job 재실행 - registry bytes 또는 package name 소유권 불일치: 중단하고 새 version PR과 tag 사용 - GitHub Release 전 실패: 원인을 main에서 수정하고 더 높은 version/tag 사용 diff --git a/docs/development/releasing.md b/docs/development/releasing.md index 703530a..59c1218 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -29,11 +29,11 @@ binary를 감싸는 선택형 설치 채널이며 제품 runtime을 다시 구 `XGEN_MAIN_PROTECTION_ENABLED=true`를 둔다. - Bypass actor가 없음을 관리자가 확인한 뒤 Actions repository variable `XGEN_RELEASE_RULESET_NO_BYPASS=true`를 설정한다. Read-only ruleset API는 bypass 목록을 숨길 수 있다. -- npm의 `@xgen-ai` scope에 여섯 package를 게시할 owner 권한을 확인한다. Package read/write와 `bypass 2FA` - 권한이 있는 granular token을 repository secret `NPM_TOKEN`에 저장하고 source, artifact와 명령 출력에는 - 넣지 않는다. 실행 파일이 없는 bootstrap version을 같은 정책으로 먼저 게시한다. 전체 절차는 - [npm granular token 게시와 provenance](npm-distribution.md)를 따른다. -- token의 scope와 권한을 확인한 뒤 repository variable `XGEN_NPM_PUBLISH_ENABLED=true`를 둔다. 값이 +- npm의 `@xgen-ai` scope에 여섯 package를 게시할 owner 권한을 확인하고, 여섯 package 모두 + `release.yml`을 trusted publisher로 등록한다(launcher만 `Allow npm dist-tag`). npm token은 쓰지 않는다. + 전체 절차는 [npm trusted publishing 게시와 provenance](npm-distribution.md)와 + [ADR-0095](../adr/0095-npm-trusted-publishing.md)를 따른다. +- 등록을 확인한 뒤 repository variable `XGEN_NPM_PUBLISH_ENABLED=true`를 둔다. 값이 없거나 exact `true`가 아니면 native build 전에 release가 fail-closed한다. - macOS notarization과 Windows Authenticode가 없는 build는 SemVer와 별개로 prototype이라고 명시하고 OS 경고 가능성을 안내한다. @@ -126,8 +126,8 @@ latest로 지정한다. 게시 직후에는 일반 release 조회로 exact tag, Quality, build와 assemble job은 repository read 권한만 가진다. 모든 target과 assembly가 통과한 뒤 GitHub publish job에만 `contents: write`, `id-token: write`, `attestations: write`를 부여한다. npm -publish job은 GitHub Release 게시 뒤 별도로 `contents: read`, `id-token: write`만 받고, `NPM_TOKEN`은 -검증이 끝난 publish 단일 step에만 주입한다. 모든 checkout은 credential persistence를 끈다. 외부 GitHub +publish job은 GitHub Release 게시 뒤 별도로 `contents: read`, `id-token: write`만 받고, npm token 없이 +OIDC trusted publishing으로 게시한다. 모든 checkout은 credential persistence를 끈다. 외부 GitHub Action은 mutable tag가 아니라 full commit SHA로 고정한다. ## 게시 artifact diff --git a/scripts/check-npm-distribution-workflow.sh b/scripts/check-npm-distribution-workflow.sh index 6c1afd7..559bdb1 100755 --- a/scripts/check-npm-distribution-workflow.sh +++ b/scripts/check-npm-distribution-workflow.sh @@ -79,7 +79,6 @@ required_job_fragments = ( "test \"$NPM_PUBLISH_ENABLED\" = \"true\"", "node-version: 24.20.0", "actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38", - "registry-url: https://registry.npmjs.org/", "node npm/scripts/verify-release.mjs", "node npm/scripts/publish.mjs", ) @@ -94,28 +93,29 @@ if job.count("node npm/scripts/publish.mjs") != 1: if job.index("node npm/scripts/verify-release.mjs") > job.index("node npm/scripts/publish.mjs"): fail("npm release bundle verification must happen before publication") -secret_expression = "${{ secrets.NPM_TOKEN }}" -if text.count(secret_expression) != 1: - fail("NPM_TOKEN secret must be referenced exactly once") +for forbidden in ("NPM_TOKEN", "NODE_AUTH_TOKEN", "_authToken", "registry-url:"): + if forbidden in text: + fail(f"npm publishing must use trusted publishing without token configuration: {forbidden}") +npm_step_marker = "- name: Install pinned npm for OIDC publish and dist-tag" publish_step_marker = "- name: Publish platform packages then launcher" -if publish_step_marker not in job: - fail("npm publish step is missing") -publish_step = job[job.index(publish_step_marker) :] +for marker in (npm_step_marker, publish_step_marker): + if marker not in job: + fail(f"publish-npm job is missing step: {marker}") +npm_step = job[job.index(npm_step_marker) : job.index(publish_step_marker)] for fragment in ( - f"NODE_AUTH_TOKEN: {secret_expression}", - 'test -n "$NODE_AUTH_TOKEN"', - "node npm/scripts/publish.mjs", + "NPM_VERSION: 11.21.3", + "NPM_INTEGRITY: sha512-", + 'test "$actual" = "$NPM_INTEGRITY"', + 'test "$(npm --version)" = "$NPM_VERSION"', ): - if fragment not in publish_step: - fail(f"npm publish step is missing token isolation contract: {fragment}") -if job[: job.index(publish_step_marker)].count("NODE_AUTH_TOKEN") != 0: - fail("npm token must not be exposed before the publish step") -if job.count("NODE_AUTH_TOKEN") != 2: - fail("npm token must be limited to one env binding and one non-empty check") -if job.index("node npm/scripts/verify-release.mjs") > job.index(secret_expression): - fail("npm token must not be exposed until after release bundle verification") - -gate_step = text.find("- name: Require npm token publishing readiness") + if fragment not in npm_step: + fail(f"pinned npm step is missing integrity contract: {fragment}") +if 'test "$(npm --version)" = 11.21.3' not in job[job.index(publish_step_marker) :]: + fail("npm publish step must confirm the pinned npm version") +if job.index("node npm/scripts/verify-release.mjs") > job.index(publish_step_marker): + fail("npm release bundle verification must happen before publication") + +gate_step = text.find("- name: Require npm trusted publishing readiness") build_job = text.find("\n build:") if gate_step < 0 or build_job < 0 or gate_step > build_job: fail("npm readiness must fail closed in the release quality gate before native builds") diff --git a/scripts/check-rc3-public-docs.sh b/scripts/check-rc3-public-docs.sh index 48123a2..db57460 100644 --- a/scripts/check-rc3-public-docs.sh +++ b/scripts/check-rc3-public-docs.sh @@ -87,23 +87,23 @@ require( require( npm_distribution, ( - "granular access token", - "`bypass 2FA`", - "GitHub Actions repository secret `NPM_TOKEN`", - "publish 단일 step의 `NODE_AUTH_TOKEN`", + "ADR-0095", + "npm trust github", + "`Allow npm dist-tag`", + "npm token은 workflow 어디에도 없다", "`--provenance`", - "npm 인증이 아니라", + "Require two-factor authentication and disallow tokens", ), "npm-distribution", ) for stale_fragment in ( - "Require two-factor authentication and disallow tokens", - "npm trust github", - "npm trust list", + "GitHub Actions repository secret `NPM_TOKEN`", + "publish 단일 step의 `NODE_AUTH_TOKEN`", + "npm 인증이 아니라", ): if stale_fragment in npm_distribution: raise SystemExit( - f"{npm_distribution_path}: stale Trusted Publishing instruction remains: {stale_fragment}" + f"{npm_distribution_path}: stale npm token instruction remains: {stale_fragment}" ) print("RC3 public documentation contract: PASS")