Skip to content

build(deps): bump spec to v0.22.7 and swag to v0.27.3 - #155

Merged
fredbi merged 1 commit into
go-openapi:masterfrom
fredbi:feat/confined-ref-loading
Jul 20, 2026
Merged

build(deps): bump spec to v0.22.7 and swag to v0.27.3#155
fredbi merged 1 commit into
go-openapi:masterfrom
fredbi:feat/confined-ref-loading

Conversation

@fredbi

@fredbi fredbi commented Jul 20, 2026

Copy link
Copy Markdown
Member

Pulls the go-openapi/spec security release (v0.22.7): the $ref expansion node cap against amplification, the option-aware PathLoaderWithOptions loader, IsValidURI no longer performing a network request, and the unsandboxed-loader security documentation. Also moves the swag modules to v0.27.3, whose loading.WithRoot now confines local reads correctly for the absolute paths spec normalizes references to (including the Windows file-URL path form).

Together these make loads' restricted loaders (SpecRestricted, JSONSpecRestricted, SetRestrictedLoaders, backed by RestrictedHTTPClient) fully effective for expanding untrusted specifications: local reads are confined to a root and remote fetches are filtered, across every $ref resolved by Document.Expanded.

loads keeps assigning its option-bound loader.Load to spec.ExpandOptions.PathLoader; the new PathLoaderWithOptions field is not needed here, since the loader chain already pre-binds loading options.

Change type

Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update

Short description

Fixes

Full description

Checklist

  • I have signed all my commits with my name and email (see DCO. This does not require a PGP-signed commit
  • I have rebased and squashed my work, so only one commit remains
  • I have added tests to cover my changes.
  • I have properly enriched go doc comments in code.
  • I have properly documented any breaking change.

Pulls the go-openapi/spec security release (v0.22.7): the $ref expansion node
cap against amplification, the option-aware PathLoaderWithOptions loader,
IsValidURI no longer performing a network request, and the unsandboxed-loader
security documentation. Also moves the swag modules to v0.27.3, whose
loading.WithRoot now confines local reads correctly for the absolute paths spec
normalizes references to (including the Windows file-URL path form).

Together these make loads' restricted loaders (SpecRestricted,
JSONSpecRestricted, SetRestrictedLoaders, backed by RestrictedHTTPClient) fully
effective for expanding untrusted specifications: local reads are confined to a
root and remote fetches are filtered, across every $ref resolved by
Document.Expanded.

loads keeps assigning its option-bound loader.Load to spec.ExpandOptions.PathLoader;
the new PathLoaderWithOptions field is not needed here, since the loader chain
already pre-binds loading options.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.86%. Comparing base (d0a7a9b) to head (359ee72).
⚠️ Report is 3 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #155   +/-   ##
=======================================
  Coverage   82.86%   82.86%           
=======================================
  Files           5        5           
  Lines         286      286           
=======================================
  Hits          237      237           
  Misses         31       31           
  Partials       18       18           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@fredbi
fredbi merged commit 32e167a into go-openapi:master Jul 20, 2026
21 checks passed
@fredbi
fredbi deleted the feat/confined-ref-loading branch July 20, 2026 15:43
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