chore: support latest oss publishing guidelines - #312
Open
kridai wants to merge 14 commits into
Open
Conversation
- Drop Node 20 from all CI test matrices; minimum is now Node 22 - Update hardcoded node-version '20' → '22' in release jobs - Switch test job runners to ubuntu-x64 - SHA-pin actions/checkout (v4) and actions/setup-node (v6) - Add Artifactory OIDC Auth step to all test jobs - Add ARTIFACTORY_URL env var and id-token: write permissions - Add lockfile-hygiene job (twilio/sdk-actions/npm-lockfile-hygiene) to cli-core-test.yml - Guard test jobs with if: github.repository_owner == 'twilio' - Fix dead SonarCloud condition (16.x → lts/*) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The npm-lockfile-hygiene gate failed: all 878 resolved URLs in package-lock.json pointed at npmjs.artifacts.twilio.com, which an external consumer cannot reach. The action allows only registry.npmjs.org, registry.yarnpkg.com, github.com and codeload.github.com. - rewrote all 878 resolved URLs to registry.npmjs.org. Package set is unchanged: 1136 entries, identical versions and integrity hashes, so the same tarballs still verify - `make install` no longer does `rm -f package-lock.json`. Deleting it forced a full re-resolution on every run, which is why CI began failing without any code change: GitHub moved the runners to Node 24 (Node 20 deprecation), changing the bundled npm and therefore the resolved tree. It also regenerated the lockfile through whatever registry the developer had configured, which is how the Artifactory URLs got committed - `npm install --no-optional` -> `npm ci --omit=optional`. --no-optional is a deprecated alias npm warns about on every run, and npm ci installs the committed tree instead of re-resolving. Verified package.json and the lockfile are in sync (lockfileVersion 3), so npm ci will not fail on drift This does not unblock CI on its own. Two packages in the tree are still refused by jfrog curation: npm@7.24.2 via @semantic-release/npm (^7.0.0), CVE-2021-43616 CVSS 9.8. Fix exists at >= 8.4.1, but ^7.0.0 cannot reach it, and @semantic-release/npm@7.1.3 is transitive, so it needs a semantic-release upgrade ejs@3.1.10 via @oclif/core@1.26.2 and a nested copy under @oclif/plugin-help. CVE-2023-29827 CVSS 9.8, and curation reports no version resolves it, so it needs either an exception or dropping @oclif/core v1
Adds an informational step that tries `npm pack` for ejs 3.1.10 and 6.0.1 through the registry CI is authenticated against, and reports allowed/blocked in the job summary. 3.1.10 is what @oclif/core <= 4.13.3 pulls; 6.0.1 is what >= 4.13.4 pulls, so this answers whether upgrading past that boundary clears the block -- without committing to the upgrade first. It has to run in CI. A local probe cannot answer it: developer npm points at npmjs.artifacts.twilio.com/virtual-npm-twilio, which allows ejs 3.1.10, while the 403 in CI came from twilio.jfrog.io/virtual-npm-thirdparty. Different Artifactory repositories carry different curation policies, and local credentials get E401 against the CI one, so only a CI run is authoritative. continue-on-error, since it is a question rather than a gate. Also trims the trailing internal catalog URL out of the failure reporting added earlier, for both the curation notice and the 403 line -- the tarball filename is enough to identify the package.
Removes the failure-only step that grepped the install log for curation blocks, and restores `- run: make install` to its original form -- the tee to /tmp/install.log and the step id existed only to feed it. The curation probe still reports which ejs versions are allowed, which is the question that actually needed answering.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node-version: '20'→'22'in release jobsubuntu-x64actions/checkout(v4) andactions/setup-node(v6) across all workflowstwilio/sdk-actions/artifactory-oidc) to all test jobsARTIFACTORY_URLenv var andid-token: writepermissions to test jobslockfile-hygienejob (twilio/sdk-actions/npm-lockfile-hygiene) tocli-core-test.ymlif: github.repository_owner == 'twilio'16.x→lts/*)Test plan
ubuntu-x64runner🤖 Generated with Claude Code