Repository navigation
ci: set min age for npm installed packages - #1003
Conversation
|
/ok-to-test |
andyatmiami
left a comment
There was a problem hiding this comment.
overall this looks just - just a minor nit and looking for simply some clarification on one of the changes.
| }, | ||
| "engines": { | ||
| "node": ">=20.0.0" | ||
| "npm" : "^11.10.0", |
There was a problem hiding this comment.
minor nit:
| "npm" : "^11.10.0", | |
| "npm": "^11.10.0", |
There was a problem hiding this comment.
If I recall correctly, npm 11 ships with Node 24 (not yet LTS). Node 20 ships with npm 10.x. Are we sure we want to pinning to ^20 for Node but requiring a npm version that doesn't ship with Node 20?
There was a problem hiding this comment.
Yes, we actually need to (I outlined the reasoning in the commit message for 790e0e1) if we want to use the min-release-age attrbute. Before this version it is not respected.
|
@christian-heusel thanks for working on this! Just some questions in the PR. |
|
I think this change is critical for the security of maintainers themselves, as there have been many recent cases where these supply chain attacks target the developer computers, rather than the end user consuming the javascript service. |
|
@thesuperzapper I agree with you, the only point that I'm making is the corner case/tradeoff if there is a day zero CVE and a patch recently released, we would need to patch both package and min-release-age=7 (something that Dependabot doesn't do). |
Signed-off-by: Christian Heusel <christian@heusel.eu>
…rity This feature is available the earliest in `npm` with version "v11.10.0" The upstream `actions/setup-node` GHA does not allow to specify a fixed `npm` version, but we need it to be a specific version in an upcoming change, on its own the action itself installs version "10.8.2" right now. To keep the setup maintainable the version is extracted from `packages.json`. Related to actions/setup-node#529 Related to npm/cli#8570 Signed-off-by: Christian Heusel <christian@heusel.eu>
This way the `packages-lock.json` stays untouched and other sane defaults are set for the CI. Link: https://docs.npmjs.com/cli/v8/commands/npm-ci Signed-off-by: Christian Heusel <christian@heusel.eu>
232736d to
66d4a90
Compare
|
Follow up for my comment will be part of : #818 |
|
/approve |
|
Thanks @christian-heusel |
|
/approve |
|
@andyatmiami @thesuperzapper we need someone with approval on CI. |
|
/lgtm thanks @christian-heusel - we have been discussing this on/off on various slack channels today and feel like this improves our security posture. we can/will adjust/adapt moving forward as needs arise
But i think we have good ideas about how that can work - so it won't leave us in a real bind to get these changes in now. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyatmiami, ederign The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The backend added a `namespaceFilter` query param to GET /workspacekinds (kubeflow#1009). Without it, the endpoint requires cluster-wide `list workspacekinds` permission (admin-only). With the filter, auth falls back to checking `create workspaces` in the given namespace, allowing regular users access. The frontend was always calling `listWorkspaceKinds()` without the filter, so non-admin users would get 403 when auth is enabled. Changes: - Update swagger.version to include the namespaceFilter swagger changes - Regenerate the API client from the updated swagger spec - Add optional `namespaceFilter` param to the `useWorkspaceKinds` hook - Thread namespace through WorkspaceFormKindSelection and WorkspaceTable - Add unit test coverage for the new parameter - Sync package-lock.json engines field with package.json - `package.json` updated as part of kubeflow#1003 but `npm` was not ran to reflect this in the lock file Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
The backend added a `namespaceFilter` query param to GET /workspacekinds (#1009). Without it, the endpoint requires cluster-wide `list workspacekinds` permission (admin-only). With the filter, auth falls back to checking `create workspaces` in the given namespace, allowing regular users access. The frontend was always calling `listWorkspaceKinds()` without the filter, so non-admin users would get 403 when auth is enabled. Changes: - Update swagger.version to include the namespaceFilter swagger changes - Regenerate the API client from the updated swagger spec - Add optional `namespaceFilter` param to the `useWorkspaceKinds` hook - Thread namespace through WorkspaceFormKindSelection and WorkspaceTable - Add unit test coverage for the new parameter - Sync package-lock.json engines field with package.json - `package.json` updated as part of #1003 but `npm` was not ran to reflect this in the lock file Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
* chore: Infer node version in CI from `packages.json` Signed-off-by: Christian Heusel <christian@heusel.eu> * ci: Enforce a minimum npm release age for increased supply chain security This feature is available the earliest in `npm` with version "v11.10.0" The upstream `actions/setup-node` GHA does not allow to specify a fixed `npm` version, but we need it to be a specific version in an upcoming change, on its own the action itself installs version "10.8.2" right now. To keep the setup maintainable the version is extracted from `packages.json`. Related to actions/setup-node#529 Related to npm/cli#8570 Signed-off-by: Christian Heusel <christian@heusel.eu> * ci: Use `npm ci` instead of `npm install` in CI This way the `packages-lock.json` stays untouched and other sane defaults are set for the CI. Link: https://docs.npmjs.com/cli/v8/commands/npm-ci Signed-off-by: Christian Heusel <christian@heusel.eu> --------- Signed-off-by: Christian Heusel <christian@heusel.eu>
The backend added a `namespaceFilter` query param to GET /workspacekinds (#1009). Without it, the endpoint requires cluster-wide `list workspacekinds` permission (admin-only). With the filter, auth falls back to checking `create workspaces` in the given namespace, allowing regular users access. The frontend was always calling `listWorkspaceKinds()` without the filter, so non-admin users would get 403 when auth is enabled. Changes: - Update swagger.version to include the namespaceFilter swagger changes - Regenerate the API client from the updated swagger spec - Add optional `namespaceFilter` param to the `useWorkspaceKinds` hook - Thread namespace through WorkspaceFormKindSelection and WorkspaceTable - Add unit test coverage for the new parameter - Sync package-lock.json engines field with package.json - `package.json` updated as part of #1003 but `npm` was not ran to reflect this in the lock file Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
packages.json