Skip to content

Fix code-scanning alerts and the NuGet audit failure that keeps CI red - #23

Merged
nrzz merged 3 commits into
mainfrom
fix/code-scanning-alerts
Oct 14, 2026
Merged

nrzz merged 3 commits into
mainfrom
fix/code-scanning-alerts

Conversation

@nrzz

@nrzz nrzz commented Oct 14, 2026

Copy link
Copy Markdown
Owner

What

Fixes the serious open code-scanning alerts and the restore failure that has kept CI red since the workflows were re-enabled.

  • CI restore (NU1902/NU1903 as errors). Microsoft.SourceLink.GitHub 8.0.0 -> 10.0.402 (its Microsoft.Build.Tasks.Git 8.0.0 is flagged by GHSA-23fw-v26w-5fgq and has no patched 8.x). SSH.NET, which arrives through Testcontainers 4.1.0, is pinned to 2026.0.0 through central transitive pinning (GHSA-q939-rpr3-3284, GHSA-mggc-4xg6-vcxf).
  • build(deps): Bump actions/upload-artifact from 4 to 7 #2 js/clear-text-storage-of-sensitive-data (dashboard/src/services/api.ts). The Settings page persisted the whole settings object, API key included, to localStorage. Only the API base URL and refresh interval are persisted now. The key is kept in memory for the page's lifetime (the build-time VITE_API_KEY is the fallback, read when a request is made), and a key saved by an earlier build is scrubbed from localStorage on first read. The SignalR access token factory reads the key at call time.
  • build(deps): Bump actions/setup-dotnet from 4 to 5 #3-Bump AWSSDK.SQS from 3.7.400.57 to 4.0.100.2 #6 cs/log-forging (MeshObservationService.cs). The topic and queue creation log lines now pass request values through LogSanitizer.Sanitize, which strips CR/LF, other control characters and the Unicode line/paragraph separators and caps the value at 256 characters. Unit tests cover it.

Notes for reviewers

  • The dashboard key is no longer remembered across reloads. That is the point of the fix; the Settings page says so.
  • VITE_API_KEY is inlined into the public JS bundle by Vite, so it should not hold a production secret. Not changed here.
  • The integration test project now references EventMesh.Management.Api (with InternalsVisibleTo) so the sanitizer can be unit tested.

Checked locally

  • dotnet build EventMesh.slnx -c Release: 0 warnings, 0 errors.
  • dotnet test for Abstractions, Core and Integration test projects: 11 + 28 + 31 passed (the Compatibility tests need Docker brokers and are left to CI).
  • dotnet format EventMesh.slnx --verify-no-changes: clean. TODO/FIXME scan: clean.
  • cd dashboard && npm ci && npm run build: succeeds.

🤖 Generated with Claude Code

nrzz and others added 3 commits October 15, 2026 02:51
Restore fails on main because TreatWarningsAsErrors turns the NU1902 and
NU1903 audit warnings into errors:

- Microsoft.SourceLink.GitHub 8.0.0 brings in Microsoft.Build.Tasks.Git 8.0.0
  (GHSA-23fw-v26w-5fgq), which has no patched 8.x release. Move to 10.0.402.
- Testcontainers 4.1.0 brings in SSH.NET 2024.1.0 (GHSA-q939-rpr3-3284,
  GHSA-mggc-4xg6-vcxf). Pin the transitive package to 2026.0.0, the first
  patched release, through central transitive pinning.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Settings page persisted the whole settings object, API key included, to
localStorage (CodeQL js/clear-text-storage-of-sensitive-data). Persist only the
API base URL and refresh interval. The key now lives in memory for the life of
the page, with the build-time VITE_API_KEY as the fallback, and is read when a
request is made. A key saved to localStorage by an earlier build is scrubbed the
first time the settings are read. The SignalR access token factory reads the key
at call time so a key entered on the Settings page applies on the next
(re)connect.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The topic and queue creation log lines wrote request values straight into the
log entry (CodeQL cs/log-forging), so a name containing CR/LF could forge extra
log lines. Route them through LogSanitizer, which strips CR, LF, every other
control character and the Unicode line and paragraph separators, and caps the
value at 256 characters. Covered by unit tests in the integration test project,
which now references the management API and sees its internals.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@nrzz
nrzz merged commit 07397aa into main Oct 14, 2026
7 checks passed
@nrzz
nrzz deleted the fix/code-scanning-alerts branch October 14, 2026 21:27
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.

1 participant