Code health of keycloak/keycloak
Repowise scores keycloak/keycloak at 8.3 out of 10 for code health, which reads as good, alongside maintainability 8.9 and static performance 9.9 on the same scale. There are 8,583 open findings across the three pillars, and the lowest-scoring file is RepresentationToModel.java at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.
Findings by severity
623 critical, 1,811 high, 2,709 medium, 3,440 low.
Hotspots
340 files are flagged as hotspots. The top 5:
- scim/tests/base/src/test/java/org/keycloak/tests/scim/tck/UserTest.java: 20 commits in the last 90 days from 10 contributors with 6 recent bug fixes
- services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OID4VCIssuerEndpoint.java: 10 commits in the last 90 days from 24 contributors with 9 recent bug fixes
- tests/base/src/test/java/org/keycloak/tests/oauth/tokenexchange/TokenExchangeDelegationTest.java: 10 commits in the last 90 days from 2 contributors
- tests/base/src/test/java/org/keycloak/tests/oid4vc/OID4VCIssuerTestBase.java: 5 commits in the last 90 days from 13 contributors with 4 recent bug fixes
- tests/base/src/test/java/org/keycloak/tests/admin/authz/rbac/RealmAdminAccessTest.java: 7 commits in the last 90 days from 5 contributors with 1 recent bug fix
Lowest-scoring files
- server-spi-private/src/main/java/org/keycloak/models/utils/RepresentationToModel.java: 1.0 out of 10 with 5 bug fixes in the last 180 days
- model/storage-private/src/main/java/org/keycloak/storage/datastore/DefaultExportImportManager.java: 1.0 out of 10 with 4 bug fixes in the last 180 days
- services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java: 1.0 out of 10 with 5 bug fixes in the last 180 days
- services/src/main/java/org/keycloak/protocol/saml/SamlService.java: 1.0 out of 10 with 3 bug fixes in the last 180 days
- adapters/saml/core/src/main/java/org/keycloak/adapters/saml/profile/AbstractSamlAuthenticationHandler.java: 1.0 out of 10
Checked against bug fixes
Of the 20 files Repowise scores lowest, 17 had a bug fix in the last 180 days. Across all 9,834 scored files, 9.5% had a bug fix in that window.
Dead code and refactoring
Repowise found 9 unused exports. 313 refactoring targets across 313 files would raise the score.
More on keycloak: summary and FAQ, codebase overview, architecture.