Gemini 3.8 Flash · Balanced

implement-access-token-context-encoding-framework-keycloak

Keycloak · Java · L · 300–799 lines · 6 files

The normal review, with one generalist agent. Judge: Claude Haiku 5.5.

Gold bugs found
0 of 0
Comments published
2
Comments matching a bug
0
Comments not matching
2
Cost of this PR
$0.431

Published comments (2)

mediumbugservices/src/main/java/org/keycloak/protocol/oidc/encode/AccessTokenContext.java:72-74

Duplicate null check on grantType instead of rawTokenId — Passing `null` for `rawTokenId` slips through unvalidated and can cause null dereferences downstream. Update the second `Objects.requireNonNull` call to check `rawTokenId` instead of `grantType`.

mediumbugtestsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AssertEvents.java:482-485

isAccessTokenId inverts grant check and uses wrong substring indices — The inverted condition and shifted substring allow mismatched events to pass tests without asserting the grant shortcut. Update the check to return `false` when `items[0].substring(4, 6)` does not match `expectedGrantShortcut`.

Gold bugs found (0)

None.

Gold bugs missed (0)

None.