You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #1454 from oasdiff/checks-ignore-exclude-options
breaking, changelog: ignore the options that leave parts of the specs out of the diff
Apply the external-refs policy in the capture reader
kin-openapi applies IsExternalRefsAllowed only when no custom
ReadFromURIFunc is installed; with one it hands the policy to the reader.
The capture reader that --open installs did not apply it, so
--allow-external-refs=false had no effect on file, URL and glob sources:
a spec could read any local file or reach any URL, and the full bytes of
what it read went into the uploaded review bundle.
Both custom readers now go through one check. The git-revision reader
keeps its own, since an allowed $ref there carries a "<rev>:" prefix
rather than naming a file, and passes no root so that check stands alone.
With external refs disallowed a spec must be self-contained, so only the
document the load was asked for may be read. That is what kin-openapi
refuses on its own: any $ref to another document, a sibling included.
The explanation now sits with the shared check rather than in git.go,
where the reader added later never saw it.
Reported-by: Zachariah Mithani (AploSec)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017e285CvofYf6joqC98gTXz