Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/check-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
env:
npm_config_omit: optional

- name: Validate lockfile for SPFx Toolkit
run: .\node_modules\.bin\lockfile-lint --path npm-shrinkwrap.json --type npm --allowed-hosts npm --validate-https

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you consider adding --validate-integrity and --validate-package-names to the lockfile-lint command? The current flags cover host and protocol validation, but the scenario described in the aim, a lockfile edit that swaps the package hash to a vulnerable repo or package, is specifically caught by --validate-integrity. --validate-package-names would additionally cover typosquatting or name mismatches between package.json and the lockfile.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good comment. lets do that πŸ‘, will do that

working-directory: vscode-viva
Comment thread
nicodecleyre marked this conversation as resolved.

- name: Build SPFx Toolkit
run: npm run package
working-directory: vscode-viva
Expand Down
50 changes: 50 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1579,10 +1579,10 @@
"@tailwindcss/postcss": "4.3.3",
"@types/glob": "8.1.0",
"@types/mocha": "10.0.10",
"@types/node-forge": "^1.3.11",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also noticed unrelated dependency changes (@types/node-forge. Removal of @types/sinon, @types/vscode, @typescript-eslint-plugin. Version swap on rehype-raw, remark-gfm, use-debounce). Were these intentional, or can they be split out of this PR since they're not needed for the lockfile-lint change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicodecleyre TBH those changes were just done 'automagically' after npm install. those are the same packages in the same versions just places in different order in the package.json. Not sure if the lint or npm install reoder this part πŸ™‚.
I may revert to previous order but still nothing changed even now as the versions are the same

"@types/react": "18.0.8",
"@types/react-dom": "18.0.3",
"@types/react-router-dom": "5.3.3",
"@types/node-forge": "^1.3.11",
"@types/sinon": "^17.0.4",
"@types/vscode": "^1.125.0",
"@typescript-eslint/eslint-plugin": "8.65.0",
Expand All @@ -1597,6 +1597,7 @@
"fast-glob": "^3.2.11",
"github-directory-downloader": "^1.3.6",
"glob": "12.0.0",
"lockfile-lint": "^5.0.0",
Comment thread
nicodecleyre marked this conversation as resolved.
"mocha": "^11.1.0",
"npm": "^11.18.0",
"npm-run-all": "^4.1.5",
Expand All @@ -1622,8 +1623,8 @@
"@pnp/cli-microsoft365-spfx-toolkit": "1.12.0",
"node-forge": "1.4.0",
"react-markdown": "10.1.0",
"rehype-raw": "7.0.0",
"remark-gfm": "4.0.1",
"use-debounce": "10.1.1",
"rehype-raw": "7.0.0"
"use-debounce": "10.1.1"
}
}