Repository Analysis

cloudreve/cloudreve

🌩 Self-hosted file management and sharing system, supports multiple storage providers

1.4 Likely human-written View on GitHub
1.4
Adjusted Score
1.4
Raw Score
100%
Time Factor
2026-05-10
Last Push
27,937
Stars
Go
Language
160,797
Lines of Code
476
Files
169
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 7HIGH 0MEDIUM 1LOW 161

Pattern Findings

169 matches across 3 categories. Click a row to expand file-level details.

Over-Commented Block160 hits · 160 pts
SeverityFileLineSnippet
LOWrouters/router.go1301 controllers.FromJSON[setting.CreateDavAccountService](setting.CreateDavAccountParamCtx{}),
LOWrouters/controllers/user.go281 // )
LOWrouters/controllers/user.go301 // subService = &user.ThemeChose{}
LOWrouters/controllers/webdav.go61 c.Abort()
LOWrouters/controllers/webdav.go81//func DeleteWebDAVMounts(c *gin.Context) {
LOWrouters/controllers/callback.go101 // queries.Add("msg", res.Msg)
LOWrouters/controllers/callback.go121 // redirect.RawQuery = queries.Encode()
LOWrouters/controllers/admin.go301// service := ParametersFromContext[*admin.HashIDService](c, admin.HashIDParamCtx{})
LOWrouters/controllers/admin.go321// }
LOWrouters/controllers/admin.go341//
LOWent/entity_create.go401// OnConflict(
LOWent/entity_create.go961
LOWent/group_create.go341//
LOWent/group_create.go861// of the `INSERT` statement. For example:
LOWent/metadata_query.go301// Count int `json:"count,omitempty"`
LOWent/setting_create.go201 }
LOWent/setting_create.go561// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
LOWent/entity_query.go361 opt(query)
LOWent/entity_query.go381func (eq *EntityQuery) GroupBy(field string, fields ...string) *EntityGroupBy {
LOWent/task_query.go301// Count int `json:"count,omitempty"`
LOWent/file_query.go541 fq.withDirectLinks = query
LOWent/file_query.go561 grbuild := &FileGroupBy{build: fq}
LOWent/node_create.go341 for _, k := range nodes {
LOWent/node_create.go901// // Update the row with the new values
LOWent/passkey_query.go301// Count int `json:"count,omitempty"`
LOWent/oauthgrant_create.go281}
LOWent/oauthgrant_create.go681func (ogcb *OAuthGrantCreateBulk) ExecX(ctx context.Context) {
LOWent/share_query.go321// the "file" edge. The optional arguments are used to configure the query builder of the edge.
LOWent/share_query.go341// client.Share.Query().
LOWent/passkey.go21 // ID of the ent.
LOWent/davaccount_query.go301// Count int `json:"count,omitempty"`
LOWent/fsevent_create.go261// OnConflict(
LOWent/fsevent_create.go641// sql.ResolveWithNewValues(),
LOWent/task_create.go321}
LOWent/task_create.go761
LOWent/oauthgrant_query.go321func (ogq *OAuthGrantQuery) WithClient(opts ...func(*OAuthClientQuery)) *OAuthGrantQuery {
LOWent/oauthgrant_query.go341// GroupBy(oauthgrant.FieldCreatedAt).
LOWent/directlink_create.go261// ).
LOWent/directlink_create.go661
LOWent/group_query.go321// the "storage_policies" edge. The optional arguments are used to configure the query builder of the edge.
LOWent/group_query.go341// client.Group.Query().
LOWent/oauthclient_create.go361 return _node, _spec
LOWent/oauthclient_create.go881// // Override some of the fields with custom
LOWent/share_create.go361 _node.file_shares = &nodes[0]
LOWent/share_create.go901// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
LOWent/storagepolicy_create.go501// OnConflict(
LOWent/storagepolicy_create.go1241// client.StoragePolicy.CreateBulk(builders...).
LOWent/node_query.go301// CreatedAt time.Time `json:"created_at,omitempty"`
LOWent/user_query.go581}
LOWent/user_query.go601 grbuild.label = user.Label
LOWent/user_create.go641// // Update the row with the new values
LOWent/user_create.go1221// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause
LOWent/fsevent_query.go301// Count int `json:"count,omitempty"`
LOWent/setting_query.go261// Example:
LOWent/setting_query.go281// Select allows the selection one or more fields/columns for the given query,
LOWent/file_create.go561// of the `INSERT` statement. For example:
LOWent/file_create.go1141// ).
LOWent/oauthclient_query.go301// CreatedAt time.Time `json:"created_at,omitempty"`
LOWent/directlink_query.go301// Count int `json:"count,omitempty"`
LOWent/tx.go61 Commit(context.Context, *Tx) error
100 more matches not shown…
Hallucination Indicators7 hits · 70 pts
SeverityFileLineSnippet
CRITICALpkg/filemanager/manager/entity.go78 if file.OwnerID() != m.user.ID && !m.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionIsAdmin)) {
CRITICALpkg/filemanager/manager/entity.go100 reuseExisting := !m.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionUniqueRedirectDirectLink))
CRITICALpkg/filemanager/fs/dbfs/dbfs.go432 if target.OwnerID() == f.user.ID || f.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionIsAdmin)) {
CRITICALpkg/filemanager/fs/dbfs/share_navigator.go159 if n.user.ID != n.owner.ID && !n.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionShareDownload)) {
CRITICALpkg/filemanager/fs/dbfs/my_navigator.go95 if targetUser.Status != user.StatusActive && !n.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionIsAdmin)
CRITICALpkg/filemanager/fs/dbfs/props.go26 if target.OwnerID() != f.user.ID && !f.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionIsAdmin)) {
CRITICALpkg/filemanager/fs/dbfs/manage.go723 if fileModel.OwnerID != f.user.ID && !f.user.Edges.Group.Permissions.Enabled(int(types.GroupPermissionIsAdmin)) {
Excessive Try-Catch Wrapping2 hits · 3 pts
SeverityFileLineSnippet
LOWpkg/filemanager/driver/cos/scf.go34 except Exception as e:
MEDIUMpkg/filemanager/driver/cos/scf.go36 print('Error getting object {} callback url. '.format(key))