File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package common
2
2
3
3
// Secret key constants used in credential files,
4
4
// so as to avoid reliance on corev1.Secret.
5
+ //
6
+ //nolint:gosec // for known Kubernetes secret-type constants, not real credentials
5
7
const (
6
8
BasicAuthUsernameKey = "username"
7
9
BasicAuthPasswordKey = "password"
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package gitcreds
19
19
import (
20
20
"flag"
21
21
"fmt"
22
+
22
23
"github.com/tektoncd/pipeline/pkg/credentials/common"
23
24
credmatcher "github.com/tektoncd/pipeline/pkg/credentials/matcher"
24
25
credwriter "github.com/tektoncd/pipeline/pkg/credentials/writer"
Original file line number Diff line number Diff line change 1
1
/*
2
- Copyright 2024 The Tekton Authors
2
+ Copyright 2025 The Tekton Authors
3
3
4
4
Licensed under the Apache License, Version 2.0 (the "License");
5
5
you may not use this file except in compliance with the License.
@@ -34,8 +34,7 @@ type Secret interface {
34
34
// Matcher is the interface for a credential initializer of any type.
35
35
type Matcher interface {
36
36
// MatchingAnnotations extracts flags for the credential
37
- // helper from the supplied secret and returns a slice (of
38
- // length 0 or greater) of applicable domains.
37
+ // helper from the supplied secret and returns a slice (of length 0 or greater)
39
38
MatchingAnnotations (secret Secret ) []string
40
39
}
41
40
@@ -51,7 +50,6 @@ func GetSecretType(secret Secret) string {
51
50
if v .Kind () == reflect .Ptr {
52
51
v = v .Elem ()
53
52
}
54
- // Grab the field by name
55
53
f := v .FieldByName ("Type" )
56
54
if ! f .IsValid () || ! f .CanInterface () {
57
55
return ""
You can’t perform that action at this time.
0 commit comments