You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that npm supports distributing package provenance via the official npm registry, I think this would be a good time introduce provenance generation to tslib.
Given tslib is such a highly used package, I suggest generating SLSA Build L3 provenance using the Node.js Builder reusable workflow for GitHub Actions. This would provide the highest level of integrity for the build while hopefully remaining a minimal change to the existing publish.yml workflow.
Would the tslib project be open to a PR introducing these changes?
Update publish.yml to call the Node.js builder workflow.
README: A brief description for end-user to know how to verify the package integrity using the generated provenance.
This may be valuable, although tslib itself has no actual build outputs. Our publish process only performs what is essentially a lint against modules/index.js to make sure it has the same exports as tslib.js, though we do run some additional tests during CI.
SLSA only validates the provenance of a single package and doesn't validate transitive dependencies. If tslib doesn't support SLSA it wouldn't necessarily impact projects that depend on it that want to support SLSA themselves.
I am currently reading up on SLSA, but it would help to know what this change would entail as far as ongoing maintenance (i.e., signing certificate renewal, PR review requirements, etc.).
I've read a lot of the docs, and, for us, the ask is basically just to change our build & publish actions to their "verified" actions that do a bunch of hashing and publish integrity metadata alongside the publish. Technically, we can get L1 just by passing --provenance to our existing npm publish call. The L3-level Ian Lewis (@ianlewis) mentions is stronger integrity guarantees - that the build wasn't tampered with, rather than just providing a link between git hash and build artifact.
Which reading the docs linked, implies changing our publish yaml to (guesstimating a bit, since the parts are, well, in parts, and we want to retain our existing on-github-release behavior, not on-git-tag):
and adding node test/validateModuleExportsMatchCommonJS/index.js as our formal npm run test script in the package.json.
But for real, since there's 0 dependencies and 0 build step, passing --provenance to npm publishshould be just as strong a guarantee, since there's no additional build steps to guarantee the integrity of.
But for real, since there's 0 dependencies and 0 build step, passing --provenance to npm publishshould be just as strong a guarantee, since there's no additional build steps to guarantee the integrity of.
You're right this is a bit of a special case so you're right that the security benefits are a bit nuanced for sure. I still think there is a bit of benefit to separating the build, provenance generation, provenance signing, and publishing steps and should work nicely if you ever do need to introduce any build steps or dependencies (though I imagine the later at least is unlikely).
Activity
RyanCavanaugh commentedon Jun 14, 2023
Ron Buckton (@rbuckton) Wesley Wigham (@weswigham) thoughts?
rbuckton commentedon Jun 14, 2023
This may be valuable, although
tslibitself has no actual build outputs. Our publish process only performs what is essentially a lint againstmodules/index.jsto make sure it has the same exports astslib.js, though we do run some additional tests during CI.SLSA only validates the provenance of a single package and doesn't validate transitive dependencies. If
tslibdoesn't support SLSA it wouldn't necessarily impact projects that depend on it that want to support SLSA themselves.I am currently reading up on SLSA, but it would help to know what this change would entail as far as ongoing maintenance (i.e., signing certificate renewal, PR review requirements, etc.).
weswigham commentedon Jun 14, 2023
I've read a lot of the docs, and, for us, the ask is basically just to change our build & publish actions to their "verified" actions that do a bunch of hashing and publish integrity metadata alongside the publish. Technically, we can get L1 just by passing
--provenanceto our existingnpm publishcall. The L3-level Ian Lewis (@ianlewis) mentions is stronger integrity guarantees - that the build wasn't tampered with, rather than just providing a link between git hash and build artifact.Which reading the docs linked, implies changing our publish yaml to (guesstimating a bit, since the parts are, well, in parts, and we want to retain our existing on-github-release behavior, not on-git-tag):
and adding
node test/validateModuleExportsMatchCommonJS/index.jsas our formalnpm run testscript in thepackage.json.But for real, since there's 0 dependencies and 0 build step, passing
--provenancetonpm publishshould be just as strong a guarantee, since there's no additional build steps to guarantee the integrity of.ianlewis commentedon Jun 14, 2023
You're right this is a bit of a special case so you're right that the security benefits are a bit nuanced for sure. I still think there is a bit of benefit to separating the build, provenance generation, provenance signing, and publishing steps and should work nicely if you ever do need to introduce any build steps or dependencies (though I imagine the later at least is unlikely).