Skip to content

fix(scan): flag openapi operations reachable without authentication#175

Open
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:fix/openapi-security-override-detection
Open

fix(scan): flag openapi operations reachable without authentication#175
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:fix/openapi-security-override-detection

Conversation

@TBX3D

@TBX3D TBX3D commented Jun 20, 2026

Copy link
Copy Markdown

specToResult computed an operation's auth status with len(op.Security) == 0, which a value slice cannot tell apart from an absent block: an operation that overrides the global requirement with an empty array (security: []) or an empty requirement object (security: [{}]) decoded the same as one that simply inherits the global default, so those deliberately-public endpoints were reported as authenticated. decode the operation security into a pointer to keep absent distinct from explicit-empty, and treat both empty forms as anonymous-reachable.

specToResult computed an operation's auth status with len(op.Security) == 0,
which a value slice cannot tell apart from an absent block: an operation that
overrides the global requirement with an empty array (security: []) or an
empty requirement object (security: [{}]) decoded the same as one that simply
inherits the global default, so those deliberately-public endpoints were
reported as authenticated. decode the operation security into a pointer to
keep absent distinct from explicit-empty, and treat both empty forms as
anonymous-reachable.
@TBX3D TBX3D requested a review from vmfunc as a code owner June 20, 2026 22:49
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