kubenetworks/kubevpn

View on GitHub
pkg/ssh/gssapi.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method Krb5InitiatorClient.InitSecContext has 66 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (k *Krb5InitiatorClient) InitSecContext(target string, token []byte, isGSSDelegCreds bool) ([]byte, bool, error) {
    GSSAPIFlags := []int{
        ContextFlagREADY,
        gssapi.ContextFlagInteg,
        gssapi.ContextFlagMutual,
Severity: Minor
Found in pkg/ssh/gssapi.go - About 1 hr to fix

    Method Krb5InitiatorClient.InitSecContext has 9 return statements (exceeds 4 allowed).
    Open

    func (k *Krb5InitiatorClient) InitSecContext(target string, token []byte, isGSSDelegCreds bool) ([]byte, bool, error) {
        GSSAPIFlags := []int{
            ContextFlagREADY,
            gssapi.ContextFlagInteg,
            gssapi.ContextFlagMutual,
    Severity: Major
    Found in pkg/ssh/gssapi.go - About 55 mins to fix

      Function NewKrb5InitiatorClientWithKeytab has 6 return statements (exceeds 4 allowed).
      Open

      func NewKrb5InitiatorClientWithKeytab(username string, krb5Conf, keytabConf string) (kcl Krb5InitiatorClient, err error) {
          c, err := config.Load(krb5Conf)
          if err != nil {
              return
          }
      Severity: Major
      Found in pkg/ssh/gssapi.go - About 40 mins to fix

        Function NewKrb5InitiatorClientWithCache has 6 return statements (exceeds 4 allowed).
        Open

        func NewKrb5InitiatorClientWithCache(krb5Conf, cacheFile string) (kcl Krb5InitiatorClient, err error) {
            c, err := config.Load(krb5Conf)
            if err != nil {
                return
            }
        Severity: Major
        Found in pkg/ssh/gssapi.go - About 40 mins to fix

          There are no issues that match your filters.

          Category
          Status