Skip to content

fix(authz): add [Authorize] to sample DeleteAsync action - #211

Closed
Daniel Kristiansen (dakristia) wants to merge 2 commits into
mainfrom
fix/authz-sample
Closed

fix(authz): add [Authorize] to sample DeleteAsync action#211
Daniel Kristiansen (dakristia) wants to merge 2 commits into
mainfrom
fix/authz-sample

Conversation

@dakristia

@dakristia Daniel Kristiansen (dakristia) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Resolves CodeQL alert #51 (IDOR) and CodeQL alert #52 (missing function-level access control).

Adds [Authorize]\ to the \DeleteAsync\ action in the sample ContractApi controller, plus wires up \AddAuthentication/\AddAuthorization/\UseAuthentication/\UseAuthorization\ in \Program.cs\ with a test auth handler that always authenticates. Applied at the action level — GET actions are intentionally public for contract tests.

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