MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / AddSecretEnv

Method AddSecretEnv

cli/internal/secrets/secrets.go:41–54  ·  view source on GitHub ↗
(envs []string)

Source from the content-addressed store, hash-verified

39}
40
41func (s *SecretAwareRedactor) AddSecretEnv(envs []string) {
42 for _, v := range envs {
43 if slices.ContainsFunc(allowedEnvPrefixes, func(prefix string) bool { return strings.HasPrefix(v, prefix) }) {
44 continue
45 }
46
47 parts := strings.SplitN(v, "=", 2)
48 if len(parts) != 2 || len(parts[1]) < minRedactingLength {
49 continue
50 }
51
52 s.secrets[parts[1]] = parts[0]
53 }
54}
55
56type SecretAwareWriter struct {
57 out io.Writer

Callers 3

TestRedactionFunction · 0.95
testConnectionFunction · 0.80
syncFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestRedactionFunction · 0.76