Repository Analysis

casdoor/casdoor

An open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD

4.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of casdoor/casdoor, a Go project with 13,932 GitHub stars. SynthScan v2.0 examined 197,488 lines of code across 843 source files, recording 848 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 4.3 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

4.3
Adjusted Score
4.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
13.9K
Stars
Go
Language
197.5K
Lines of Code
843
Files
848
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 2LOW 846

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 848 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block774 hits · 774 pts
SeverityFileLineSnippetContext
LOWmain.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/theme_filter.go1// Copyright 2025 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/auto_signin_filter.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/mcp_util.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/cors_filter.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/authz_filter.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/static_filter.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/lightweight_auth_filter.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/record.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/request_body_filter.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/timeout_filter.go1// Copyright 2024 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/base.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/content_type_filter.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/router.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWrouters/field_validation_filter.go1// Copyright 2025 The Casdoor Authors. All Rights Reserved.COMMENT
LOWfaceId/provider.go1// Copyright 2025 The Casdoor Authors. All Rights Reserved.COMMENT
LOWfaceId/provider_test.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
LOWfaceId/aliyun.go1// Copyright 2025 The Casdoor Authors. All Rights Reserved.COMMENT
LOWfaceId/local_uniface.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
LOWfaceId/local_uniface_test.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/okta.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/provider.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/kwai.go1// Copyright 2024 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/custom.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/web3onboard.go1// Copyright 2023 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/dingtalk.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/wecom_internal.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/infoflow_internal.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/qq.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/qq.go101// "city": "安道尔城",COMMENT
LOWidp/google.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/alipay.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/douyin.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/lark.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/telegram.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/gitlab.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/adfs.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/linkedin.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/bilibili.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/wecom_third_party.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/twitter.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/twitter.go121//{COMMENT
LOWidp/azuread_b2c.go1// Copyright 2023 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/weibo.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/wechat.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/wechat.go141 }COMMENT
LOWidp/facebook.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/facebook.go101 token := oauth2.Token{COMMENT
LOWidp/wechat_mobile.go1// Copyright 2025 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/wechat_miniprogram.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/gitee.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/casdoor.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/infoflow_third_party.go1// Copyright 2022 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/metamask.go1// Copyright 2023 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/baidu.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/github.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWidp/github.go101// "avatar_url": "https://avatars.githubusercontent.com/u/3781234?v=4",COMMENT
LOWidp/github.go121// "hireable": true,COMMENT
LOWidp/goth.go1// Copyright 2021 The Casdoor Authors. All Rights Reserved.COMMENT
LOWscim/group_handler.go1// Copyright 2026 The Casdoor Authors. All Rights Reserved.COMMENT
714 more matches not shown…
Hyper-Verbose Identifiers39 hits · 39 pts
SeverityFileLineSnippetContext
LOWweb/craco.config.js74 function ignoreSourcemapsloaderWarnings(warning) {CODE
LOWweb/public/ProviderHintRedirect.js48 function isProviderVisibleForSignIn(providerItem) {CODE
LOWweb/public/AuthCallbackHandler.js47 function storeReactFallbackPayload(payload) {CODE
LOWweb/src/Setting.js773export function isProviderVisibleForSignUp(providerItem) {CODE
LOWweb/src/Setting.js781export function isProviderVisibleForSignIn(providerItem) {CODE
LOWweb/src/Setting.js797export function getAllPromptedProviderItems(application) {CODE
LOWweb/src/Setting.js801export function getAllPromptedSignupItems(application) {CODE
LOWweb/src/Setting.js1511export function getCryptoAlgorithmOptions(cryptoAlgorithm) {CODE
LOWweb/src/Setting.js1836export function getApplicationDisplayName(application) {CODE
LOWweb/src/Setting.js1893export function isDefaultOrganizationSelected(account) {CODE
LOWweb/src/Setting.js2117export function getDefaultHtmlEmailContent() {CODE
LOWweb/src/Setting.js2160export function getDefaultInvitationHtmlEmailContent() {CODE
LOWweb/src/ProviderEditPage.js47function isDefaultProviderDisplayName(displayName) {CODE
LOWweb/src/ProviderEditPage.js61function getAutoProviderDisplayName(category, type, subType) {CODE
LOWweb/src/OpenClawSessionGraphViewer.js234function OpenClawSessionGraphCanvas(props) {CODE
LOWweb/src/OpenClawSessionGraphUtils.js20function parseOpenClawBehaviorPayload(message) {CODE
LOWweb/src/OpenClawSessionGraphUtils.js209export function formatOpenClawSessionGraphTimestamp(timestamp) {CODE
LOWweb/src/OpenClawSessionGraphUtils.js409export function buildOpenClawFlowElements(graph) {CODE
LOWweb/src/auth/Util.js205export async function WechatOfficialAccountModal(application, provider, method) {CODE
LOWweb/src/auth/Web3Auth.js133export function checkEthereumSignedTypedData(token) {CODE
LOWweb/src/auth/GoogleLoginButton.js35export function GoogleOneTapLoginVirtualButton(prop) {CODE
LOWweb/src/auth/Obfuscator.js18export function getRandomKeyForObfuscator(obfuscatorType) {CODE
LOWweb/src/auth/Obfuscator.js62export function encryptByPasswordObfuscator(passwordObfuscatorType, passwordObfuscatorKey, password) {CODE
LOWweb/src/provider/LogProviderFields.js22function getStorageProviderOptions(providers, owner) {CODE
LOWweb/src/provider/IDVerificationProviderFields.js21export function renderIDVerificationProviderFields(provider, updateProviderField) {CODE
LOWweb/src/provider/StorageProviderFields.js21export function renderStorageProviderFields(provider, updateProviderField) {CODE
LOWweb/src/provider/EmailProviderFields.js26export function renderEmailProviderFields(provider, updateProviderField, renderEmailMappingInput, account) {CODE
LOWweb/src/provider/OAuthProviderFields.js24export function renderOAuthProviderFields(provider, updateProviderField, renderUserMappingInput, certs = []) {CODE
LOWweb/src/provider/CaptchaProviderFields.js21export function renderCaptchaProviderFields(provider, providerName) {CODE
LOWweb/src/provider/NotificationProviderFields.js24export function renderNotificationProviderFields(provider, updateProviderField, getReceiverRow) {CODE
LOWweb/src/provider/PaymentProviderFields.js23export function renderPaymentProviderFields(provider, updateProviderField, certs) {CODE
LOWweb/src/provider/FaceIDProviderFields.js21export function renderFaceIdProviderFields(provider, updateProviderField) {CODE
LOWweb/src/backend/ApplicationBackend.js27export function getApplicationsByOrganization(owner, organization, page = "", pageSize = "", field = "", value = "", sorCODE
LOWweb/src/backend/UserWebauthnBackend.js17export function registerWebauthnCredential() {CODE
LOWweb/src/backend/UserWebauthnBackend.js64export function deleteUserWebAuthnCredential(credentialID) {CODE
LOWweb/src/backend/EntryBackend.js38export function getOpenClawSessionTranscriptUrl(owner, name) {CODE
LOWweb/src/backend/EntryBackend.js42export function getOpenClawSessionTranscript(owner, name) {CODE
LOWweb/src/backend/PermissionBackend.js27export function getPermissionsBySubmitter() {CODE
LOWweb/src/table/TransactionTableColumns.js22export function getTransactionTableColumns(options = {}) {CODE
Fake / Example Data32 hits · 36 pts
SeverityFileLineSnippetContext
LOWidp/okta.go141 "name" :"John Doe",CODE
LOWidp/casdoor.go103 "email": "admin@example.com",CODE
LOWutil/string_test.go101 {"Should be return lorem_ipsum", "Lorem Ipsum", "lorem_ipsum"},CODE
LOWutil/string_test.go102 {"Should be return Lorem Ipsum", "lorem Ipsum", "lorem_ipsum"},CODE
LOWutil/string_test.go103 {"Should be return lorem_ipsum", "lorem ipsum", "loremipsum"},CODE
LOWutil/string_test.go145 {"Scenery three", []string{"test", "lorem ipsum"}, "test/lorem ipsum"},CODE
LOWutil/string_test.go163 {"Scenery three", "lorem ipsum", "80a751fde577028640c419000e33eba6"},CODE
LOWswagger/swagger-ui.js2!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amCODE
LOWswagger/swagger-ui-es-bundle-core.js2module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[CODE
LOWswagger/swagger.json9223 "placeholder": {CODE
LOWswagger/swagger.json9268 "placeholder": {CODE
LOWswagger/swagger-ui-standalone-preset.js2!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amCODE
LOWweb/src/WebhookEditPage.js72 "email": "admin@example.com",CODE
LOWweb/src/table/SigninTable.js232 dataIndex: "placeholder",CODE
LOWweb/src/table/SigninTable.js233 key: "placeholder",CODE
LOWweb/src/table/SigninTable.js242 this.updateField(table, index, "placeholder", e.target.value);CODE
LOWweb/src/table/SignupTable.js284 dataIndex: "placeholder",CODE
LOWweb/src/table/SignupTable.js285 key: "placeholder",CODE
LOWweb/src/table/SignupTable.js294 this.updateField(table, index, "placeholder", e.target.value);CODE
LOWobject/syncer_googleworkspace_test.go33 FullName: "John Doe",CODE
LOWobject/syncer_googleworkspace_test.go55 if originalUser.DisplayName != "John Doe" {CODE
LOWobject/syncer_googleworkspace_test.go56 t.Errorf("Expected DisplayName to be 'John Doe', got '%s'", originalUser.DisplayName)CODE
LOWobject/syncer_googleworkspace_test.go79 FullName: "Jane Doe",CODE
LOWobject/syncer_googleworkspace_test.go166 Host: "admin@example.com",CODE
LOWobject/application.go40 Placeholder string `json:"placeholder"`CODE
LOWobject/application.go51 Placeholder string `json:"placeholder"`CODE
LOWobject/init.go173 Email: "admin@example.com",CODE
LOWobject/syncer_scim_test.go35 DisplayName: "John Doe",CODE
LOWobject/syncer_scim_test.go39 Formatted: "John Doe",CODE
LOWobject/syncer_scim_test.go54 StreetAddress: "123 Main St",CODE
LOWobject/syncer_scim_test.go78 if originalUser.DisplayName != "John Doe" {CODE
LOWobject/syncer_scim_test.go79 t.Errorf("Expected DisplayName to be 'John Doe', got '%s'", originalUser.DisplayName)CODE
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMobject/device_auth_store.go95// ── in-memory implementation (default) ──────────────────────────────────────COMMENT
MEDIUMobject/device_auth_store.go107// ── Redis implementation ─────────────────────────────────────────────────────COMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWobject/saml_sp.go180 // block.Bytes are DER encoded so the following code block should happily accept itCOMMENT