fix(fixtures): rename package.json/yarn.lock to avoid security scan false positives#1026
Open
tolzhabayev wants to merge 1 commit intomainfrom
Open
fix(fixtures): rename package.json/yarn.lock to avoid security scan false positives#1026tolzhabayev wants to merge 1 commit intomainfrom
tolzhabayev wants to merge 1 commit intomainfrom
Conversation
…alse positives Dependabot scanned the manifests and lockfiles inside `fixtures/` and raised alerts for transitive deps that aren't shipped or run in production. Rename each fixture `package.json` to `_package.json`, drop the committed `yarn.lock` files, and regenerate both on `yarn setup-fixtures`. The new script copies `_package.json` into place and touches an empty `yarn.lock` (required by Yarn Berry to treat each fixture as a standalone project) before installing. The generated files are now gitignored so they never land in the committed tree where scanners would see them. Fixes #594
Collaborator
Author
|
Need a @grafana/grafana-frontend-platform approval 🙏 |
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
package.json→_package.jsonand removes committedyarn.lockfiles in the three fixture dirs (fixtures/usage/object-properties,fixtures/usage/grafana-plugin,fixtures/imports/package) so Dependabot stops raising false-positive vulnerability alerts for transitive deps in fixtures (e.g.uuidflagged viafixtures/imports/package/yarn.lock).setup-fixturesto copy_package.json→package.jsonandtouch yarn.lock(required for Yarn Berry to recognize each fixture as a standalone project) before runningyarn install..gitignoreentries so the regeneratedpackage.json/yarn.lockinside fixtures never get committed back.Fixes #594
Test plan
yarn setup-fixturessucceeds (installs deps in all three fixtures)yarn vitest run— 121 passed, 1 skippedgit statusconfirms regenerated fixturepackage.json/yarn.lockare ignored