Preparing report...

Report for github.com/seknox/trasa

A+    Excellent!    Found 148 issues across 280 files

Tweet

gofmt93%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo95%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • trasa/server/api/auth/hTfa.go
    • Line 41: warning: cyclomatic complexity 24 of function TfaHandler() is high (> 15) (gocyclo)
    • Line 379: warning: cyclomatic complexity 19 of function ConfirmTOTPAndSave() is high (> 15) (gocyclo)

golint55%

Golint is a linter for Go source code.

    • trasa/server/api/my/hMy.go
    • Line 35: warning: exported type SingleUserDetailV2 should have comment or be unexported (golint)
    • Line 42: warning: exported function MyAccountDetails should have comment or be unexported (golint)
    • Line 79: warning: exported function GenerateKeyPair should have comment or be unexported (golint)
    • Line 226: warning: exported function GetMyEvents should have comment or be unexported (golint)
    • Line 239: warning: exported function GetMyEventsByPage should have comment or be unexported (golint)
    • Line 278: warning: exported type AuthMetaResp should have comment or be unexported (golint)
    • Line 284: warning: comment on exported function GetAuthMeta should be of the form "GetAuthMeta ..." (golint)
    • Line 328: warning: exported type MyServiceDetail should have comment or be unexported (golint)
    • Line 421: warning: comment on exported function RemoveMyDevice should be of the form "RemoveMyDevice ..." (golint)
    • trasa/server/consts/endpoints.go
    • Line 3: warning: exported type ConstEndpoints should have comment or be unexported (golint)
    • Line 6: warning: exported const ENDPOINT_RDP should have comment (or a comment on this block) or be unexported (golint)
    • trasa/cli/config/utils.go
    • Line 20: warning: exported var Context should have comment or be unexported (golint)
    • Line 32: warning: don't use underscores in Go names; struct field U_ID should be UID (golint)
    • Line 33: warning: don't use underscores in Go names; struct field G_ID should be GID (golint)
    • Line 36: warning: exported function Pipe should have comment or be unexported (golint)
    • Line 42: warning: exported function NormalizeString should have comment or be unexported (golint)
    • Line 99: warning: exported function GetHomeDirAndUID should have comment or be unexported (golint)
    • Line 123: warning: exported function GetHostConfig should have comment or be unexported (golint)
    • Line 193: warning: exported function GetLogLocation should have comment or be unexported (golint)
    • trasa/server/server.go
    • Line 177: warning: exported function ProxyRouter should have comment or be unexported (golint)
    • Line 194: warning: exported function CoreAPIRouter should have comment or be unexported (golint)
    • trasa/server/models/policy.go
    • Line 11: warning: exported type DayAndTimePolicy should have comment or be unexported (golint)
    • Line 17: warning: exported method DayAndTimePolicy.Value should have comment or be unexported (golint)
    • Line 26: warning: exported method DayAndTimePolicy.Scan should have comment or be unexported (golint)
    • Line 39: warning: exported method DevicePolicy.Value should have comment or be unexported (golint)
    • Line 47: warning: exported method DevicePolicy.Scan should have comment or be unexported (golint)
    • Line 57: warning: exported type Policy should have comment or be unexported (golint)
    • Line 76: warning: exported method Policy.Value should have comment or be unexported (golint)
    • Line 83: warning: exported method Policy.Scan should have comment or be unexported (golint)
    • trasa/server/api/users/hUser.go
    • Line 19: warning: exported type UserDetails should have comment or be unexported (golint)
    • Line 26: warning: exported function GetUserDetails should have comment or be unexported (golint)
    • Line 83: warning: exported type CreateUserReq should have comment or be unexported (golint)
    • Line 87: warning: exported type CreateUserResp should have comment or be unexported (golint)
    • Line 92: warning: exported function CreateUser should have comment or be unexported (golint)
    • Line 259: warning: exported function GetGroupsAssignedToUser should have comment or be unexported (golint)
    • trasa/server/api/notif/templateblobs.go
    • Line 1965: warning: comment on exported var SecurityAlertTemplate should be of the form "SecurityAlertTemplate ..." (golint)
    • Line 2962: warning: exported var ResetPassword should have comment or be unexported (golint)
    • Line 3910: warning: exported var AdhocReq should have comment or be unexported (golint)
    • Line 4860: warning: exported var AdhocStatus should have comment or be unexported (golint)
    • Line 5810: warning: exported var DynamicAccess should have comment or be unexported (golint)
    • trasa/tests/server/notiftest/inappnotif.go
    • Line 16: warning: exported function GetPendingNotif should have comment or be unexported (golint)
    • Line 69: warning: exported function AddNotif should have comment or be unexported (golint)
    • Line 89: warning: exported function ResolvNotif should have comment or be unexported (golint)
    • trasa/server/utils/totp.go
    • Line 17: warning: exported type Totp should have comment or be unexported (golint)
    • Line 26: warning: exported function GenerateTotpSecret should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function CalculateTotp should be of the form "CalculateTotp ..." (golint)
    • trasa/tests/server/crudtest/accessmap.go
    • Line 16: warning: exported function CreateUserAccessMap should have comment or be unexported (golint)
    • Line 56: warning: exported function CreateUserGroupAccessMap should have comment or be unexported (golint)
    • Line 97: warning: exported function CreateUserGroupServiceGroupAccessMap should have comment or be unexported (golint)
    • Line 138: warning: exported function GetUserAccessMap should have comment or be unexported (golint)
    • Line 196: warning: exported function GetUserGroupsAssignedToService should have comment or be unexported (golint)
    • Line 253: warning: exported function GetUserGroupsAssignedToServiceGroups should have comment or be unexported (golint)
    • Line 310: warning: exported function GetUserGroupServiceGroupAccessMaps should have comment or be unexported (golint)
    • Line 365: warning: exported function UpdateUserAccessMap should have comment or be unexported (golint)
    • Line 403: warning: exported function UpdateUserGroupAccessMap should have comment or be unexported (golint)
    • Line 441: warning: exported function DeleteUserAccessMap should have comment or be unexported (golint)
    • Line 478: warning: exported function DeleteUserGroupServiceGroupAccessMap should have comment or be unexported (golint)
    • trasa/cli/cmd/root.go
    • Line 78: warning: exported function Execute should have comment or be unexported (golint)
    • Line 105: warning: don't use underscores in Go names; struct field U_ID should be UID (golint)
    • Line 106: warning: don't use underscores in Go names; struct field G_ID should be GID (golint)
    • trasa/tests/server/testutils/consts.go
    • Line 9: warning: exported const MockOrgID should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported var MockPrivateKey2 should have comment or be unexported (golint)
    • Line 101: warning: exported var Mockupgrader should have comment or be unexported (golint)
    • trasa/tests/server/testutils/utils.go
    • Line 15: warning: exported function GetTotpCode should have comment or be unexported (golint)
    • Line 52: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 59: warning: comment on exported function AddTestSelfUserContext should be of the form "AddTestSelfUserContext ..." (golint)
    • Line 91: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 156: warning: exported function GetReqWithBody should have comment or be unexported (golint)
    • trasa/server/api/auth/hPasswordLogin.go
    • Line 26: warning: exported type LoginRequest should have comment or be unexported (golint)
    • Line 168: warning: exported type EnrolDeviceStruct should have comment or be unexported (golint)
    • Line 228: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 254: warning: exported function CheckPassword should have comment or be unexported (golint)
    • trasa/server/models/services.go
    • Line 9: warning: comment on exported type Service should be of the form "Service ..." (with optional leading article) (golint)
    • Line 49: warning: exported method ReverseProxy.Value should have comment or be unexported (golint)
    • Line 53: warning: exported method ReverseProxy.Scan should have comment or be unexported (golint)
    • trasa/server/api/auth/tfa/hU2F.go
    • Line 9: warning: comment on exported type U2f should be of the form "U2f ..." (with optional leading article) (golint)
    • Line 20: warning: comment on exported function U2fHandler should be of the form "U2fHandler ..." (golint)
    • trasa/server/api/accessmap/handlers.go
    • Line 19: warning: exported function GetUserAccessMaps should have comment or be unexported (golint)
    • Line 32: warning: exported function GetUserGroupServiceGroupAccessMaps should have comment or be unexported (golint)
    • Line 47: warning: exported type AssignUserToApp should have comment or be unexported (golint)
    • Line 62: warning: exported function CreateServiceUserMap should have comment or be unexported (golint)
    • Line 111: warning: exported type DeleteServiceUserMapReq should have comment or be unexported (golint)
    • Line 115: warning: exported function DeleteServiceUserMap should have comment or be unexported (golint)
    • Line 144: warning: exported type ServiceGroupUserGroupMapRequest should have comment or be unexported (golint)
    • Line 155: warning: exported function CreateServiceGroupUserGroupMap should have comment or be unexported (golint)
    • Line 230: warning: exported type RmGroupMap should have comment or be unexported (golint)
    • Line 234: warning: exported function DeleteServiceGroupUserGroupMap should have comment or be unexported (golint)
    • Line 263: warning: exported function GetUserGroupsAssignedToServiceGroups should have comment or be unexported (golint)
    • Line 278: warning: exported type UpdatePrivilege should have comment or be unexported (golint)
    • Line 283: warning: exported function UpdateServiceUserMap should have comment or be unexported (golint)
    • Line 304: warning: exported function UpdateServiceGroupUserGroup should have comment or be unexported (golint)
    • Line 326: warning: exported function UserGroupsToAdd should have comment or be unexported (golint)
    • Line 340: warning: exported type UserGroupOfServiceGroup should have comment or be unexported (golint)
    • trasa/server/consts/const.go
    • Line 11: warning: exported const ChangePassword should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type EntityConst should have comment or be unexported (golint)
    • Line 20: warning: exported const ENTITY_USER should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: comment on exported const ALL_USER should be of the form "ALL_USER ..." (golint)
    • Line 47: warning: comment on exported const ADMIN_FORGOT_PASSWORD should be of the form "ADMIN_FORGOT_PASSWORD ..." (golint)
    • Line 50: warning: comment on exported const SUSPICIOUS_LOGIN should be of the form "SUSPICIOUS_LOGIN ..." (golint)
    • Line 53: warning: comment on exported const SYSTEM should be of the form "SYSTEM ..." (golint)
    • Line 59: warning: exported const KEY_DOAPI should have comment (or a comment on this block) or be unexported (golint)
    • Line 67: warning: exported type EmailType should have comment or be unexported (golint)
    • Line 70: warning: exported const EMAIL_ADHOC should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: exported const EMAIL_SMTP should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported type VerifyTokenIntent should have comment or be unexported (golint)
    • Line 85: warning: exported const VERIFY_TOKEN_CHANGEPASS should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: exported type TokenExpiryTime should have comment or be unexported (golint)
    • Line 92: warning: exported const TOKEN_EXPIRY_CHANGEPASS should have comment (or a comment on this block) or be unexported (golint)
    • Line 97: warning: exported const AUTH_RESP_NOTIF_LICENSE should have comment (or a comment on this block) or be unexported (golint)
    • Line 108: warning: exported const AUTH_REQ_DASH_LOGIN should have comment (or a comment on this block) or be unexported (golint)
    • Line 116: warning: exported const DEFAULT_ROOT_PASSWORD should have comment or be unexported (golint)
    • Line 119: warning: exported const SHOW_VAULT_KEYS should have comment (or a comment on this block) or be unexported (golint)
    • trasa/server/consts/sshauthttpe.go
    • Line 3: warning: exported type SSH_AUTH_TYPE should have comment or be unexported (golint)
    • Line 6: warning: exported const SSH_AUTH_TYPE_PUB should have comment (or a comment on this block) or be unexported (golint)
    • trasa/server/middlewares/middleware.go
    • Line 9: warning: exported type Dumper should have comment or be unexported (golint)
    • Line 12: warning: exported method Dumper.Handler should have comment or be unexported (golint)
    • Line 20: warning: exported function Dumpster should have comment or be unexported (golint)
    • Line 36: warning: exported type AuthMiddleware should have comment or be unexported (golint)
    • Line 39: warning: exported method AuthMiddleware.Handler should have comment or be unexported (golint)
    • Line 51: warning: exported method SCIMAuth.Handler should have comment or be unexported (golint)
    • trasa/server/api/auth/hTfa.go
    • Line 25: warning: exported type TfaRequest should have comment or be unexported (golint)
    • Line 372: warning: exported type ConfirmTOTPPreq should have comment or be unexported (golint)
    • Line 377: warning: comment on exported function ConfirmTOTPAndSave should be of the form "ConfirmTOTPAndSave ..." (golint)
    • Line 389: warning: don't use underscores in Go names; var userID_orgID_Totpsec should be userIDOrgIDTotpsec (golint)
    • Line 446: warning: don't use underscores in Go names; var fcm_publick_devHyg should be fcmPublickDevHyg (golint)
    • trasa/server/api/logs/builder.go
    • Line 18: warning: comment on exported type AuthLog should be of the form "AuthLog ..." (with optional leading article) (golint)
    • Line 80: warning: exported function NewEmptyLog should have comment or be unexported (golint)
    • Line 99: warning: exported function NewLog should have comment or be unexported (golint)
    • Line 129: warning: exported method AuthLog.UpdateUser should have comment or be unexported (golint)
    • Line 141: warning: exported method AuthLog.UpdateService should have comment or be unexported (golint)
    • Line 152: warning: exported method AuthLog.UpdateAddr should have comment or be unexported (golint)
    • Line 163: warning: exported method AuthLog.UpdateIP should have comment or be unexported (golint)
    • trasa/cli/api/httpcalls.go
    • Line 19: warning: comment on exported function SendHygiene should be of the form "SendHygiene ..." (golint)
    • Line 93: warning: exported function Auth should have comment or be unexported (golint)
    • trasa/server/utils/filesystem.go
    • Line 22: warning: exported function MoveFile should have comment or be unexported (golint)
    • Line 46: warning: exported function GetETCDir should have comment or be unexported (golint)
    • Line 56: warning: exported function GetVarDir should have comment or be unexported (golint)
    • Line 65: warning: exported function GetTmpDir should have comment or be unexported (golint)
    • trasa/tests/server/crudtest/service.go
    • Line 15: warning: exported function CreateService should have comment or be unexported (golint)
    • Line 51: warning: exported function UpdateService should have comment or be unexported (golint)
    • Line 88: warning: exported function UpdateHTTPConfig should have comment or be unexported (golint)
    • Line 129: warning: exported function UpdateHostCerts should have comment or be unexported (golint)
    • Line 164: warning: exported function UpdateSSLCerts should have comment or be unexported (golint)
    • Line 203: warning: exported function DownloadHostCerts should have comment or be unexported (golint)
    • Line 229: warning: exported function GetAllServices should have comment or be unexported (golint)
    • Line 279: warning: exported function GetService should have comment or be unexported (golint)
    • Line 323: warning: exported function DeleteService should have comment or be unexported (golint)
    • trasa/server/accessproxy/sshproxy/hostkeycallback.go
    • Line 15: warning: exported var ErrVerifyHost should have comment or be unexported (golint)
    • Line 17: warning: exported function HandleHostKeyCallback should have comment or be unexported (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • trasa/tests/server/crudtest/groups.go
    • Line 15: warning: exported function CreateGroup should have comment or be unexported (golint)
    • Line 52: warning: exported function UpdateGroup should have comment or be unexported (golint)
    • Line 87: warning: exported function UpdateServiceGroup should have comment or be unexported (golint)
    • Line 129: warning: exported function UpdateUserGroup should have comment or be unexported (golint)
    • Line 171: warning: exported function GetAllGroups should have comment or be unexported (golint)
    • Line 222: warning: exported function GetUserGroupDetail should have comment or be unexported (golint)
    • Line 278: warning: exported function GetServiceGroupDetail should have comment or be unexported (golint)
    • Line 335: warning: exported function DeleteGroup should have comment or be unexported (golint)
    • trasa/server/api/stats/hndl.go
    • Line 286: warning: exported type PermStats should have comment or be unexported (golint)
    • Line 294: warning: exported function GetServicePermStats should have comment or be unexported (golint)
    • Line 327: warning: exported function HexaEvents should have comment or be unexported (golint)
    • trasa/server/api/stats/models.go
    • Line 3: warning: exported type TotalUsers should have comment or be unexported (golint)
    • Line 17: warning: exported type AllUserDevices should have comment or be unexported (golint)
    • Line 34: warning: exported type AllServices should have comment or be unexported (golint)
    • Line 48: warning: exported type FailedReasonsByType should have comment or be unexported (golint)
    • Line 55: warning: exported type LoginsByHour should have comment or be unexported (golint)
    • Line 91: warning: exported type AggIps should have comment or be unexported (golint)
    • trasa/server/api/adhoc/init.go
    • Line 8: warning: exported function InitStore should have comment or be unexported (golint)
    • Line 12: warning: exported var Store should have comment or be unexported (golint)
    • Line 14: warning: exported type AdhocStore should have comment or be unexported (golint)
    • Line 18: warning: exported type AdhocAdapter should have comment or be unexported (golint)
    • trasa/server/utils/ipfilter.go
    • Line 10: warning: comment on exported type Checker should be of the form "Checker ..." (with optional leading article) (golint)
    • Line 36: warning: exported method Checker.IsAuthorized should have comment or be unexported (golint)
    • trasa/server/consts/inapptrail.go
    • Line 4: warning: exported const CREATE_USER should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: comment on exported const ADMIN_ACTIVITY should be of the form "ADMIN_ACTIVITY ..." (golint)
    • trasa/tests/server/accessproxytest/sshcli.go
    • Line 23: warning: exported function TestSSHAuthWithoutPublicKey should have comment or be unexported (golint)
    • Line 56: warning: exported function TestSSHAuthWithPublicKey should have comment or be unexported (golint)
    • Line 95: warning: exported function TestSSHAuthWithAuthorisedPublicKey should have comment or be unexported (golint)
    • Line 139: warning: exported function TestSSHAuthWithServiceName should have comment or be unexported (golint)
    • trasa/server/api/adhoc/adhocstore.go
    • Line 10: warning: comment on exported method AdhocStore.Create should be of the form "Create ..." (golint)
    • Line 19: warning: exported method AdhocStore.AppendSession should have comment or be unexported (golint)
    • Line 26: warning: comment on exported method AdhocStore.GrantOrReject should be of the form "GrantOrReject ..." (golint)
    • Line 36: warning: comment on exported method AdhocStore.Expire should be of the form "Expire ..." (golint)
    • Line 44: warning: comment on exported method AdhocStore.UpdateReqSessionID should be of the form "UpdateReqSessionID ..." (golint)
    • Line 53: warning: exported method AdhocStore.GetActiveReqOfUser should have comment or be unexported (golint)
    • Line 68: warning: exported method AdhocStore.GetAdhocDetail should have comment or be unexported (golint)
    • Line 113: warning: comment on exported method AdhocStore.GetReqsAssignedToUser should be of the form "GetReqsAssignedToUser ..." (golint)
    • Line 142: warning: exported method AdhocStore.GetAdmins should have comment or be unexported (golint)
    • Line 165: warning: exported method AdhocStore.AppendAdhocSession should have comment or be unexported (golint)
    • trasa/server/api/services/hService.go
    • Line 16: warning: exported function GetServiceDetail should have comment or be unexported (golint)
    • Line 30: warning: exported type AllServicesByType should have comment or be unexported (golint)
    • Line 39: warning: exported function GetAllServices should have comment or be unexported (golint)
    • Line 86: warning: comment on exported function CreateService should be of the form "CreateService ..." (golint)
    • Line 159: warning: exported type ReverseProxyReq should have comment or be unexported (golint)
    • trasa/server/api/devices/hMobile.go
    • Line 27: warning: comment on exported function DeviceDetailPipe should be of the form "DeviceDetailPipe ..." (golint)
    • Line 104: warning: exported type EnrolDeviceStruct should have comment or be unexported (golint)
    • Line 171: warning: exported type DeviceEnrollResp should have comment or be unexported (golint)
    • trasa/server/consts/uidp.go
    • Line 4: warning: exported const IDP_TRASA should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported const SCIM_USER_SCHEMA should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported const SAML_INVALID_POSTFORM should have comment (or a comment on this block) or be unexported (golint)
    • trasa/server/accessproxy/sshproxy/wrappedTunnel.go
    • Line 15: warning: exported const STANDBY_TIMEOUT should have comment or be unexported (golint)
    • Line 29: warning: exported function NewWrappedTunnel should have comment or be unexported (golint)
    • Line 64: warning: exported method WrappedTunnel.ListenToNewGuests should have comment or be unexported (golint)
    • Line 164: warning: exported method WrappedTunnel.Close should have comment or be unexported (golint)
    • trasa/tests/server/vaulttest/vault.go
    • Line 17: warning: exported function InitVault should have comment or be unexported (golint)
    • Line 62: warning: exported function StoreVault should have comment or be unexported (golint)
    • Line 99: warning: exported function GetKey should have comment or be unexported (golint)
    • Line 166: warning: exported function GetStatus should have comment or be unexported (golint)
    • Line 211: warning: exported function StoreSecret should have comment or be unexported (golint)
    • Line 257: warning: exported function GetSecret should have comment or be unexported (golint)
    • Line 314: warning: exported function DeleteSecret should have comment or be unexported (golint)
    • Line 353: warning: exported function GetUpstreamCredsTest should have comment or be unexported (golint)
    • trasa/server/accessproxy/sshproxy/store.go
    • Line 23: warning: exported method Store.GetUserFromPublicKey should have comment or be unexported (golint)
    • Line 102: warning: exported method Store.SetSession should have comment or be unexported (golint)
    • Line 110: warning: exported method Store.GetSession should have comment or be unexported (golint)
    • Line 121: warning: exported method Store.DeleteSession should have comment or be unexported (golint)
    • Line 131: warning: exported method Store.UpdateSessionMeta should have comment or be unexported (golint)
    • Line 183: warning: exported method Store.UpdateSessionUser should have comment or be unexported (golint)
    • Line 212: warning: exported method Store.SetAuthType should have comment or be unexported (golint)
    • Line 228: warning: exported method Store.CreateGuestChannel should have comment or be unexported (golint)
    • Line 233: warning: exported method Store.GetGuestChannel should have comment or be unexported (golint)
    • trasa/server/consts/crypto.go
    • Line 4: warning: exported const KEX_EXPORT_DH should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: comment on exported type CREDPROV should be of the form "CREDPROV ..." (with optional leading article) (golint)
    • Line 13: warning: exported const CREDPROV_TSXVAULT should have comment (or a comment on this block) or be unexported (golint)
    • trasa/server/consts/failedreasons.go
    • Line 3: warning: comment on exported type FailedReason should be of the form "FailedReason ..." (with optional leading article) (golint)
    • Line 7: warning: exported const REASON_MALFORMED_REQUEST_RECEIVED should have comment (or a comment on this block) or be unexported (golint)
    • trasa/server/models/scim.go
    • Line 7: warning: exported type ScimUser should have comment or be unexported (golint)
    • Line 22: warning: exported type ScimListUser should have comment or be unexported (golint)
    • Line 30: warning: exported type ScimListGroup should have comment or be unexported (golint)
    • Line 38: warning: exported type ScimUserName should have comment or be unexported (golint)
    • Line 44: warning: exported type ScimUserEmails should have comment or be unexported (golint)
    • Line 50: warning: exported type ScimUserX509Certificates should have comment or be unexported (golint)
    • Line 54: warning: exported type ScimUserGroups should have comment or be unexported (golint)
    • Line 60: warning: exported type ScimConflict should have comment or be unexported (golint)
    • Line 66: warning: exported method ScimConflict.New should have comment or be unexported (golint)
    • Line 74: warning: exported type ScimGroup should have comment or be unexported (golint)
    • Line 82: warning: exported type ScimGroupMembers should have comment or be unexported (golint)
    • Line 88: warning: exported type ScimMeta should have comment or be unexported (golint)
    • Line 96: warning: exported type ScimGroupPatch should have comment or be unexported (golint)
    • Line 101: warning: exported type ScimGroupPatchOps should have comment or be unexported (golint)
    • trasa/server/api/notif/hndl.go
    • Line 12: warning: exported function GetPendingNotif should have comment or be unexported (golint)
    • Line 29: warning: exported function ResolveNotif should have comment or be unexported (golint)
    • trasa/server/api/groups/hndlGroups.go
    • Line 65: warning: exported function DeleteGroup should have comment or be unexported (golint)
    • Line 78: warning: exported function GetAllGroups should have comment or be unexported (golint)
    • Line 99: warning: exported function GetUserGroup should have comment or be unexported (golint)
    • Line 133: warning: exported type GroupUsers should have comment or be unexported (golint)
    • Line 139: warning: exported function GetServiceGroup should have comment or be unexported (golint)
    • Line 171: warning: exported type GroupApps should have comment or be unexported (golint)
    • Line 177: warning: exported function UpdateServiceGroup should have comment or be unexported (golint)
    • Line 245: warning: exported type UpdateServiceGroupReq should have comment or be unexported (golint)
    • Line 251: warning: exported type UpdateUsersGroupReq should have comment or be unexported (golint)
    • Line 257: warning: exported function UpdateUsersGroup should have comment or be unexported (golint)
    • trasa/server/api/auth/hDevice.go
    • Line 22: warning: exported type RegisterDeviceReq should have comment or be unexported (golint)
    • Line 32: warning: exported type DeviceDetail should have comment or be unexported (golint)
    • Line 295: warning: exported type UpdateHygienereq should have comment or be unexported (golint)
    • trasa/server/consts/certtypes.go
    • Line 3: warning: exported const CERT_TYPE_SSH_CA should have comment or be unexported (golint)
    • Line 4: warning: exported const CERT_TYPE_HTTP_CA should have comment or be unexported (golint)
    • Line 5: warning: exported const CERT_TYPE_SSH_HOST_KEY should have comment or be unexported (golint)
    • Line 6: warning: exported const CERT_TYPE_TLS_KEYS should have comment or be unexported (golint)
    • trasa/server/api/system/hTsxVault.go
    • Line 100: warning: exported type VaultInit should have comment or be unexported (golint)
    • Line 104: warning: exported type VaultInitResp should have comment or be unexported (golint)
    • Line 163: warning: comment on exported function InitTsxvaultAndStoreKeyInLocalConfig should be of the form "InitTsxvaultAndStoreKeyInLocalConfig ..." (golint)
    • Line 208: warning: comment on exported function InitTsxvaultAndGenShardedKey should be of the form "InitTsxvaultAndGenShardedKey ..." (golint)
    • Line 278: warning: exported type VaultStatus should have comment or be unexported (golint)
    • trasa/server/models/org.go
    • Line 23: warning: exported type UserContext should have comment or be unexported (golint)
    • Line 30: warning: exported type TrasaFeatures should have comment or be unexported (golint)
    • Line 37: warning: exported type License should have comment or be unexported (golint)
    • Line 47: warning: exported method License.Value should have comment or be unexported (golint)
    • Line 51: warning: comment on exported method License.Scan should be of the form "Scan ..." (golint)
    • trasa/server/api/auth/tfa/tfa.go
    • Line 29: warning: comment on exported function VerifyTotpCode should be of the form "VerifyTotpCode ..." (golint)
    • Line 47: warning: comment on exported function SendU2F should be of the form "SendU2F ..." (golint)
    • Line 130: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 270: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 423: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • trasa/server/accessproxy/rdpproxy/newguac.go
    • Line 17: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 23: warning: exported const SocketTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported function NewProxy should be of the form "NewProxy ..." (golint)
    • trasa/server/api/adhoc/hAdhoc.go
    • Line 24: warning: exported function AdhocReq should have comment or be unexported (golint)
    • Line 58: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 141: warning: exported function AdhocReqAssignedToMe should have comment or be unexported (golint)
    • Line 154: warning: exported function GrantOrDenyAdhoc should have comment or be unexported (golint)
    • Line 254: warning: exported function GetAllAdhoqRequests should have comment or be unexported (golint)
    • Line 267: warning: exported function GetAdmins should have comment or be unexported (golint)
    • trasa/server/utils/crypto.go
    • Line 30: warning: exported function LoadJSONWebKey should have comment or be unexported (golint)
    • Line 155: warning: exported function GetEcdsaPublicKeyBytes should have comment or be unexported (golint)
    • Line 161: warning: exported function GetEcdsaPublicKeyFromBytes should have comment or be unexported (golint)
    • Line 204: warning: exported var ErrEncrypt should have comment or be unexported (golint)
    • Line 264: warning: exported function AESDecryptHexString should have comment or be unexported (golint)
    • Line 295: warning: exported function EncryptorAndSharder should have comment or be unexported (golint)
    • Line 314: warning: exported function DeducerAndDecryptor should have comment or be unexported (golint)
    • Line 335: warning: exported function NaclEnCrypt should have comment or be unexported (golint)
    • Line 351: warning: exported function NaclDeCrypt should have comment or be unexported (golint)
    • Line 371: warning: exported function ShamirSharder should have comment or be unexported (golint)
    • Line 386: warning: exported function ShamirDeducer should have comment or be unexported (golint)
    • Line 397: warning: exported function HoldVaultRootKryShards should have comment or be unexported (golint)
    • Line 401: warning: exported function EncodeBase64 should have comment or be unexported (golint)
    • Line 406: warning: exported function DecodeBase64 should have comment or be unexported (golint)
    • trasa/tests/server/crudtest/policy.go
    • Line 16: warning: exported function CreatePolicy should have comment or be unexported (golint)
    • Line 70: warning: exported function UpdatePolicy should have comment or be unexported (golint)
    • Line 117: warning: exported function GetPolicy should have comment or be unexported (golint)
    • Line 161: warning: exported function GetPolicies should have comment or be unexported (golint)
    • Line 211: warning: exported function DeletePolicy should have comment or be unexported (golint)
    • trasa/server/global/global.go
    • Line 23: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 35: warning: exported var DBVersion should have comment or be unexported (golint)
    • Line 36: warning: exported var LogToFile should have comment or be unexported (golint)
    • Line 40: warning: exported function GetConfig should have comment or be unexported (golint)
    • Line 44: warning: exported function SetOrgID should have comment or be unexported (golint)
    • Line 48: warning: exported type State should have comment or be unexported (golint)
    • Line 85: warning: exported function InitDBSTORE should have comment or be unexported (golint)
    • Line 97: warning: exported function InitDBSTOREWithConfig should have comment or be unexported (golint)
    • Line 214: warning: exported function DBconn should have comment or be unexported (golint)
    • trasa/server/api/providers/uidp/hLDAP.go
    • Line 91: warning: exported function BindLdap should have comment or be unexported (golint)
    • Line 262: warning: comment on exported function GetAllUsersForIdp should be of the form "GetAllUsersForIdp ..." (golint)
    • Line 283: warning: comment on exported function TransferUserToGivenIdp should be of the form "TransferUserToGivenIdp ..." (golint)
    • trasa/tests/server/accessproxytest/rdp.go
    • Line 15: warning: exported function RDPProxy should have comment or be unexported (golint)
    • Line 98: warning: don't use underscores in Go names; func result err_code should be errCode (golint)
    • Line 98: warning: don't use underscores in Go names; func result err_msg should be errMsg (golint)
    • trasa/server/api/my/hFileBrowser.go
    • Line 21: warning: exported function FileUploadHandler should have comment or be unexported (golint)
    • Line 70: warning: exported function GetDownloadableFileList should have comment or be unexported (golint)
    • Line 89: warning: exported function GetFileDownloadToken should have comment or be unexported (golint)
    • Line 105: warning: exported function FileDownloadHandler should have comment or be unexported (golint)
    • Line 132: warning: exported function FileDeleteHandler should have comment or be unexported (golint)
    • trasa/server/middlewares/session.go
    • Line 36: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 51: warning: comment on exported function SessionValidatorWS should be of the form "SessionValidatorWS ..." (golint)
    • trasa/tests/server/crudtest/user.go
    • Line 16: warning: exported function CreateUser should have comment or be unexported (golint)
    • Line 67: warning: exported function UpdateUser should have comment or be unexported (golint)
    • Line 114: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 167: warning: exported function GetAllUsers should have comment or be unexported (golint)
    • Line 218: warning: exported function DeleteUser should have comment or be unexported (golint)
    • trasa/server/models/device.go
    • Line 26: warning: comment on exported type DeviceFinger should be of the form "DeviceFinger ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported type DeviceHygiene should be of the form "DeviceHygiene ..." (with optional leading article) (golint)
    • Line 56: warning: exported method DeviceHygiene.Value should have comment or be unexported (golint)
    • Line 60: warning: comment on exported method DeviceHygiene.Scan should be of the form "Scan ..." (golint)
    • Line 79: warning: comment on exported type DeviceInfo should be of the form "DeviceInfo ..." (with optional leading article) (golint)
    • Line 89: warning: comment on exported type DeviceOS should be of the form "DeviceOS ..." (with optional leading article) (golint)
    • Line 118: warning: comment on exported type EndpointSecurity should be of the form "EndpointSecurity ..." (with optional leading article) (golint)
    • Line 144: warning: exported type DevicePolicy should have comment or be unexported (golint)
    • Line 165: warning: exported type DevicePolicyMaker should have comment or be unexported (golint)
    • Line 197: warning: exported type BrowserExtensions should have comment or be unexported (golint)
    • Line 243: warning: exported type DeviceAuthFinger should have comment or be unexported (golint)
    • Line 263: warning: comment on exported type MobileDeviceHygiene1 should be of the form "MobileDeviceHygiene1 ..." (with optional leading article) (golint)
    • trasa/server/api/accesscontrol/uac.go
    • Line 32: warning: comment on exported function CheckTrasaUAC should be of the form "CheckTrasaUAC ..." (golint)
    • Line 193: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 218: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 251: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 263: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • trasa/server/accessproxy/sshproxy/session.go
    • Line 22: warning: exported type Session should have comment or be unexported (golint)
    • Line 36: warning: exported type GuestClient should have comment or be unexported (golint)
    • Line 46: warning: exported method Session.UpdateConMeta should have comment or be unexported (golint)
    • Line 62: warning: exported method Session.UpdateService should have comment or be unexported (golint)
    • Line 82: warning: exported function NewSession should have comment or be unexported (golint)
    • trasa/server/accessproxy/rdpproxy/session.go
    • Line 33: warning: exported type Session should have comment or be unexported (golint)
    • Line 153: warning: exported method Session.Start should have comment or be unexported (golint)
    • Line 315: warning: exported function WSToGuacd should have comment or be unexported (golint)
    • Line 342: warning: exported function GuacdToWS should have comment or be unexported (golint)
    • trasa/server/api/services/hKeys.go
    • Line 19: warning: exported type UpdateSSLCertsReq should have comment or be unexported (golint)
    • Line 27: warning: exported function UpdateSSLCerts should have comment or be unexported (golint)
    • Line 66: warning: exported type UpdateHostCertsReq should have comment or be unexported (golint)
    • Line 71: warning: exported function UpdateHostCerts should have comment or be unexported (golint)
    • Line 102: warning: exported function DownloadHostCerts should have comment or be unexported (golint)
    • trasa/server/api/users/userstoremocks/mocks.go
    • Line 8: warning: exported type UserStoreMock should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method UserStoreMock.GetFromWithLimit should be of the form "GetFromWithLimit ..." (golint)
    • Line 36: warning: exported method UserStoreMock.GetFromTRASAID should have comment or be unexported (golint)
    • trasa/server/models/models.go
    • Line 13: warning: exported type GeoLocation should have comment or be unexported (golint)
    • Line 21: warning: exported method GeoLocation.Value should have comment or be unexported (golint)
    • Line 25: warning: comment on exported method GeoLocation.Scan should be of the form "Scan ..." (golint)
    • Line 45: warning: exported type TrasaResponseStruct should have comment or be unexported (golint)
    • Line 53: warning: exported type TrasaResponseStructWIthDataString should have comment or be unexported (golint)
    • Line 61: warning: exported type ScimContext should have comment or be unexported (golint)
    • Line 69: warning: exported type InitSignup should have comment or be unexported (golint)
    • Line 117: warning: exported type IPDetails should have comment or be unexported (golint)
    • Line 123: warning: exported method IPDetails.Value should have comment or be unexported (golint)
    • Line 127: warning: comment on exported method IPDetails.Scan should be of the form "Scan ..." (golint)
    • Line 199: warning: exported type ServiceUserMap should have comment or be unexported (golint)
    • Line 209: warning: exported type ServiceGroupUserGroupMap should have comment or be unexported (golint)
    • Line 220: warning: exported type InAppNotification should have comment or be unexported (golint)
    • Line 232: warning: exported type VaultCredStorageEvent should have comment or be unexported (golint)
    • Line 240: warning: exported type VaultAccessLogs should have comment or be unexported (golint)
    • Line 248: warning: exported type TRASAFeaturesStatus should have comment or be unexported (golint)
    • Line 272: warning: exported type BackupPlan should have comment or be unexported (golint)
    • Line 284: warning: exported type Backup should have comment or be unexported (golint)
    • Line 292: warning: exported type MyService should have comment or be unexported (golint)
    • Line 347: warning: exported type AlertPolicy should have comment or be unexported (golint)
    • Line 359: warning: exported type SecurityRule should have comment or be unexported (golint)
    • Line 375: warning: exported type SecurityRuleViolationAction should have comment or be unexported (golint)
    • Line 382: warning: exported type Entity should have comment or be unexported (golint)
    • Line 389: warning: exported type Intent should have comment or be unexported (golint)
    • Line 404: warning: exported type ErrorStrings should have comment or be unexported (golint)
    • Line 413: warning: exported type ResponseStruct should have comment or be unexported (golint)
    • Line 429: warning: exported type ServiceSecretVault should have comment or be unexported (golint)
    • Line 481: warning: exported type KeysHolderReq should have comment or be unexported (golint)
    • Line 500: warning: exported type EncryptionKeyLog should have comment or be unexported (golint)
    • Line 509: warning: exported type AccessMapDetail should have comment or be unexported (golint)
    • Line 523: warning: exported type GlobalEmailSetting should have comment or be unexported (golint)
    • Line 531: warning: exported type EmailIntegrationConfig should have comment or be unexported (golint)
    • Line 542: warning: exported type GlobalTrasaSshAuth should have comment or be unexported (golint)
    • Line 546: warning: exported type EmailAdhoc should have comment or be unexported (golint)
    • Line 560: warning: exported type EmailDynamicAccess should have comment or be unexported (golint)
    • Line 569: warning: exported type EmailSecurityAlert should have comment or be unexported (golint)
    • Line 577: warning: exported type EmailUserCrud should have comment or be unexported (golint)
    • Line 585: warning: comment on exported type DBVersion should be of the form "DBVersion ..." (with optional leading article) (golint)
    • Line 608: warning: exported type AdhocDetails should have comment or be unexported (golint)
    • Line 616: warning: exported type MyServiceDetails should have comment or be unexported (golint)
    • trasa/server/middlewares/inapptrail.go
    • Line 10: warning: comment on exported type InAppTrail should be of the form "InAppTrail ..." (with optional leading article) (golint)
    • Line 14: warning: exported method InAppTrail.Handler should have comment or be unexported (golint)
    • trasa/tests/server/providerstest/ca.go
    • Line 17: warning: exported function CreateHTTPCA should have comment or be unexported (golint)
    • Line 49: warning: exported function CreateSSHCA should have comment or be unexported (golint)
    • Line 83: warning: exported function CreateSSHSystemCA should have comment or be unexported (golint)
    • Line 117: warning: exported function GetAllCAs should have comment or be unexported (golint)
    • Line 184: warning: exported function GetHttpCADetail should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign91%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words