Skip to content

Update RazorSlices sample ESLint tooling to remediate scanning advisories - #390

Merged
damianh merged 1 commit into
mainfrom
dh/sample-dependency-updates
Nov 3, 2026
Merged

damianh merged 1 commit into
mainfrom
dh/sample-dependency-updates

Conversation

@damianh

@damianh damianh commented Nov 3, 2026

Copy link
Copy Markdown
Member

What issue does this PR address?

Remediates the sample npm development dependencies behind all 17 advisories listed in Scorecard code-scanning alert 152. Every listed advisory matched the original lockfile; none matches the updated installed dependency tree.

Updates ESLint from 8.35.0 to 10.14.0 and regenerates the existing v2 lockfile through npm. Adds a minimal recommended flat configuration and npm run lint, excluding vendored and generated assets while preserving the existing copy script. Declares ESLint's required Node versions (^20.19.0 || ^22.13.0 || >=24). Bootstrap 5.2.3 and jQuery 3.6.3 remain unchanged; no production NuGet packages or scanning settings are changed.

Validation performed

  • npm ci: passed.
  • npm run lint: passed. The sample previously had no lint script or ESLint configuration.
  • npm run copyclientlibs: passed; all 50 copied files byte-match the installed distribution assets.
  • dotnet build razor-slices\samples\WebApp\WebApp.csproj -c Release --nologo -v minimal: passed with zero warnings and errors.
  • Exact GitHub Advisory Database semver checks for all 17 listed GHSAs: passed; verified resolved installed versions match the lockfile.
  • git diff --check: passed.
  • npm audit --include=dev: exit 1, reporting five moderate affected-package entries from one separate existing advisory, GHSA-g3hv-75wg-m249, affecting minimatch below 11.0.1. It affects both the original 3.1.2 and updated 10.2.6 versions. Current ESLint and its latest config-array dependency still require minimatch 10.x; no incompatible override or npm-suggested ESLint 4 downgrade was applied.

This addresses the historical alert's dependency matches, not its GitHub state. Scorecard remains intentionally removed; the alert is not dismissed or otherwise modified.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 10:50

Copilot AI left a comment

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.

🔵 Needs a closer look

Code-scanning alert 152 returned 403, leaving its 17 advisory IDs and affected ranges unavailable, so a reviewer with access must confirm the updated dependency tree meets the alert’s full remediation criteria.

No open issues 🎉

1 file not reviewed
  • razor-slices/samples/WebApp/package-lock.json: Generated file
What changed in this PR

Updates the RazorSlices WebApp sample’s JavaScript development tooling to address the dependency advisories identified in Scorecard alert 152, without changing production NuGet packages or scanning settings.

Changes:

  • Upgrades ESLint from 8.35.0 to 10.14.0 and refreshes the v2 npm lockfile.
  • Adds recommended flat configuration and npm run lint, excluding vendored and generated assets.
  • Declares supported Node.js versions while preserving client-library copying and existing Bootstrap/jQuery versions.
File Description
razor-slices/​samples/​WebApp/​package.json Updates lint dependencies, declares Node.js requirements, and adds the lint script.
razor-slices/​samples/​WebApp/​package-lock.json Refreshes resolved development dependencies while retaining lockfile v2.
razor-slices/​samples/​WebApp/​eslint.config.js Configures recommended lint rules, exclusions, and build-script globals.

Review effort: Balanced

Remove dependency matches for all 17 advisories in Scorecard alert 152.
Keep Bootstrap and jQuery locked; add flat-config linting for ESLint 10.
Declare the supported Node versions required by the updated toolchain.

A separate minimatch advisory remains pending a compatible upstream fix.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@damianh
damianh force-pushed the dh/sample-dependency-updates branch from fcceb0c to 524b372 Compare November 3, 2026 10:55
@damianh
damianh merged commit 7f6cd9e into main Nov 3, 2026
6 checks passed
@damianh
damianh deleted the dh/sample-dependency-updates branch November 3, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants