Skip to content

Commit

Permalink
Set the security level of Windows named pipes to NoSecurity
Browse files Browse the repository at this point in the history
Communication over named pipes on Windows is local IPC.
  • Loading branch information
irsl committed Feb 8, 2024
1 parent a3f5ed6 commit 0537df0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions credentials/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func getSecurityLevel(network, addr string) (credentials.SecurityLevel, error) {
// Local TCP connection
case strings.HasPrefix(addr, "127."), strings.HasPrefix(addr, "[::1]:"):
return credentials.NoSecurity, nil
// Windows named pipe connection
case network == "pipe" && strings.HasPrefix(addr, `\\.\pipe\`):
return credentials.NoSecurity, nil

Check warning on line 70 in credentials/local/local.go

View check run for this annotation

Codecov / codecov/patch

credentials/local/local.go#L69-L70

Added lines #L69 - L70 were not covered by tests
// UDS connection
case network == "unix":
return credentials.PrivacyAndIntegrity, nil
Expand Down

0 comments on commit 0537df0

Please sign in to comment.