Skip to content

Commit

Permalink
hide more credentials from the updater (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecoffman authored Jan 2, 2024
1 parent f8419d2 commit a104d64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/dependabot/internal/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func processInput(input *model.Input, flags *UpdateFlags) {
entry := make(map[string]any)
for k, v := range credential {
// Updater does not get credentials.
if k != "token" && k != "password" {
if k != "token" && k != "password" && k != "key" && k != "auth-key" {
entry[k] = v
}
}
Expand Down
7 changes: 6 additions & 1 deletion cmd/dependabot/internal/cmd/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ func Test_processInput(t *testing.T) {
"url": "https://example.com",
"python-index": "https://example.com",
"replaces-base": "true",
"password": "password",

// These values will not propagate to the metadata
"password": "password",
"token": "token",
"key": "key",
"auth-key": "auth-key",
},
}

Expand Down

0 comments on commit a104d64

Please sign in to comment.