Skip to content

fix(deps): pin AngleSharp 1.4.0 → 1.5.2 to resolve GHSA-pgww-w46g-26qg (#18), release v1.1.1#19

Merged
moisesja merged 1 commit into
mainfrom
fix/anglesharp-1.5.2-issue-18
Jul 20, 2026
Merged

fix(deps): pin AngleSharp 1.4.0 → 1.5.2 to resolve GHSA-pgww-w46g-26qg (#18), release v1.1.1#19
moisesja merged 1 commit into
mainfrom
fix/anglesharp-1.5.2-issue-18

Conversation

@moisesja

Copy link
Copy Markdown
Owner

Closes #18.

Problem

The build fails under TreatWarningsAsErrors=true with NU1902: AngleSharp 1.4.0 carries the moderate-severity advisory GHSA-pgww-w46g-26qg (annotation-xml elements), fixed in AngleSharp 1.5.0+.

AngleSharp is not referenced directly anywhere — it arrives transitively through the opt-in RDFC library:

Credentials.Rdfc → DataProofsDotnet.Rdfc → dotNetRdf.Core 3.5.1 → AngleSharp 1.4.0

Because of that single chain, the advisory surfaces in every project downstream of Credentials.Rdfc — not just the two the issue names. Credentials.Core / Credentials.Extensions.DependencyInjection are clean (they don't reference Rdfc).

Fix

A single security-forcing pin at the source:

  • Directory.Packages.props — declare AngleSharp 1.5.2 centrally (CPM).
  • Credentials.Rdfc.csproj — add a versionless direct PackageReference in the one project that owns the dotNetRDF chain; the promotion flows to every downstream project.

1.5.2 is the latest patch on the 1.5 line and >= dotNetRdf.Core 3.5.1's AngleSharp floor. Chosen over solution-wide CentralPackageTransitivePinningEnabled (which pins every centrally-versioned transitive) so the blast radius is only AngleSharp, only in the Rdfc subtree.

This is a dependency-only change with no public API delta.

Release v1.1.1

  • Directory.Build.propsCredentialsVersion 1.1.0 → 1.1.1.
  • CHANGELOG.mdv1.1.1 Security entry.

release.yml is tag-driven (version derived from the pushed tag), so no workflow edit is needed — publishing 1.1.1 is triggered by pushing tag v1.1.1 after merge.

Verification (all green, locally)

  • dotnet list … --vulnerable --include-transitive: 0 vulnerable packages across all 29 projects (was AngleSharp 1.4.0 in the Rdfc subtree). Credentials.Rdfc and Credentials.Conformance.VcApi (both named in the issue) confirmed clean, resolving AngleSharp 1.5.2.
  • dotnet build -c Release: 0 warnings / 0 errors (NU1902 gone).
  • dotnet test --filter "Category!=Conformance": all pass — Core 172, DI 161, Rdfc 21, RoundTrip 9, SampleSmoke 14, Interop 5, Architecture 9. The Rdfc/RoundTrip suites exercise the dotNetRDF canonicalization path against AngleSharp 1.5.2 → runtime-compatible.
  • tools/check-no-newtonsoft-closure.sh: NFR-002 OK (default closure Newtonsoft-free; unaffected).
  • tools/check-api-compat.sh: no breaking changes for Core / DI / Rdfc vs the published 1.1.0 baseline.
  • dotnet pack -p:CredentialsVersion=1.1.1: all 3 packages + snupkg pack; the Rdfc nuspec declares <dependency id="AngleSharp" version="1.5.2" />.

🤖 Generated with Claude Code

… (#18), bump to v1.1.1

AngleSharp 1.4.0 carries moderate advisory GHSA-pgww-w46g-26qg, failing the
build under TreatWarningsAsErrors (NU1902). It is a transitive-only dependency
arriving via Credentials.Rdfc -> DataProofsDotnet.Rdfc -> dotNetRdf.Core ->
AngleSharp, so the advisory surfaced in every project downstream of
Credentials.Rdfc.

Fix with a single security-forcing pin: declare AngleSharp 1.5.2 centrally
(Directory.Packages.props) and add a direct PackageReference only in
Credentials.Rdfc (the sole owner of the dotNetRDF chain), which promotes the
resolved version across all downstream projects. 1.5.2 satisfies dotNetRdf.Core
3.5.1's AngleSharp floor.

Dependency-only change, no public API delta (ApiCompat clean vs 1.1.0). Bumps
CredentialsVersion 1.1.0 -> 1.1.1; the tag-driven release pipeline needs no
edit (version is derived from the pushed v1.1.1 tag).

Verified: 0 vulnerable packages across the solution; Release build 0/0;
full test suite green (incl. the dotNetRDF/RDFC paths); no-Newtonsoft closure
holds; ApiCompat no breaking changes for Core/DI/Rdfc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@moisesja moisesja self-assigned this Jul 20, 2026
@moisesja moisesja added this to the 1.1.1 milestone Jul 20, 2026
@moisesja
moisesja merged commit 3d8b0ff into main Jul 20, 2026
3 checks passed
@moisesja
moisesja deleted the fix/anglesharp-1.5.2-issue-18 branch July 20, 2026 13:13

@moisesja moisesja left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Reviewed the diff and independently checked the two claims that matter most for a security-pin PR:

  • Compatibility floor: dotNetRdf.Core 3.5.1's NuGet metadata declares AngleSharp: [1.4.0, ) (no upper bound), so 1.5.2 satisfies it cleanly — confirms the "≥ dotNetRDF's floor" claim in the PR body.
  • No breaking changes 1.4.0 → 1.5.2: AngleSharp's 1.5.0 and 1.5.2 release notes are bug-fix/spec-compliance only (the GHSA-pgww-w46g-26qg fix, DOM Range/NodeIterator corrections, SVG style detection) — nothing that should affect dotNetRDF's usage surface, consistent with the green Rdfc/RoundTrip canonicalization test runs reported.

Scope is tight and well-targeted: single CPM version pin (Directory.Packages.props) + a versionless PackageReference at the one project that actually owns the dotNetRDF chain (Credentials.Rdfc), rather than a blanket CentralPackageTransitivePinningEnabled or per-project pins. Directory.Build.props version bump and CHANGELOG.md entry are consistent with a patch release. Confirmed release.yml is genuinely tag-driven (version=${GITHUB_REF_NAME#v}), so no workflow changes are needed to ship this, as claimed.

One nit, non-blocking: tasks/todo-2026-07-20-issue-18-anglesharp.md references a local absolute path (/Users/moises/.claude/plans/floofy-knitting-wall.md) that won't resolve for anyone else — harmless since it's just a planning artifact, but worth dropping or making relative in future task docs.

No test/critical-path/scope concerns. Would approve if I weren't the PR author's own review restriction — looks good to merge (CI pending as of this review).


Generated by Claude Code

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.

Upgrade AngleSharp to 1.5.0 to fix security vulnerability

1 participant