fix: remove unnecessary entry from default denylist (#12294)

# Which Problems Are Solved

The updated default denylist added an entry for IPv4-mapped IPv6
addresses to prevent IPv6 encapsulation bypasses.
This is not necessary since the IP already gets resolved into v4 and now
blocks them all.

# How the Problems Are Solved

Removed the entry.

# Additional Changes

None

# Additional Context

None
This commit is contained in:
Livio Spring
2026-06-16 16:52:26 +02:00
committed by GitHub
parent 0973b074b4
commit dbb0da71af
2 changed files with 13 additions and 2 deletions
-1
View File
@@ -1095,7 +1095,6 @@ HTTPClient:
- "198.18.0.0/15" # Benchmark/inter-network communication testing - "198.18.0.0/15" # Benchmark/inter-network communication testing
- "::/128" # Unspecified IPv6 address - "::/128" # Unspecified IPv6 address
- "::1/128" # IPv6 loopback address - "::1/128" # IPv6 loopback address
- "::ffff:0:0/96" # IPv4-mapped IPv6 addresses (Prevents IPv6 encapsulation bypasses)
- "fc00::/7" # Unique local addresses / IPv6 equivalent to private IPv4 subnets - "fc00::/7" # Unique local addresses / IPv6 equivalent to private IPv4 subnets
- "fe80::/10" # Link-local addresses / IPv6 equivalent to cloud metadata subnets - "fe80::/10" # Link-local addresses / IPv6 equivalent to cloud metadata subnets
+13 -1
View File
@@ -936,6 +936,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx context.Context ctx context.Context
deviceCode string deviceCode string
backChannelLogoutURI string backChannelLogoutURI string
clientID string
} }
tests := []struct { tests := []struct {
name string name string
@@ -955,6 +956,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"device1", "device1",
"", "",
"",
}, },
wantErr: io.ErrClosedPipe, wantErr: io.ErrClosedPipe,
}, },
@@ -980,6 +982,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
wantErr: DeviceAuthStateError(domain.DeviceAuthStateInitiated), wantErr: DeviceAuthStateError(domain.DeviceAuthStateInitiated),
}, },
@@ -994,6 +997,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"",
}, },
wantErr: zerrors.ThrowNotFound(nil, "COMMAND-ua1Vo", "Errors.DeviceAuth.NotFound"), wantErr: zerrors.ThrowNotFound(nil, "COMMAND-ua1Vo", "Errors.DeviceAuth.NotFound"),
}, },
@@ -1023,6 +1027,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
wantErr: DeviceAuthStateError(domain.DeviceAuthStateExpired), wantErr: DeviceAuthStateError(domain.DeviceAuthStateExpired),
}, },
@@ -1055,6 +1060,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
wantErr: DeviceAuthStateError(domain.DeviceAuthStateExpired), wantErr: DeviceAuthStateError(domain.DeviceAuthStateExpired),
}, },
@@ -1087,6 +1093,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
wantErr: DeviceAuthStateError(domain.DeviceAuthStateDenied), wantErr: DeviceAuthStateError(domain.DeviceAuthStateDenied),
}, },
@@ -1125,6 +1132,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
wantErr: DeviceAuthStateError(domain.DeviceAuthStateDone), wantErr: DeviceAuthStateError(domain.DeviceAuthStateDone),
}, },
@@ -1189,6 +1197,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
wantErr: zerrors.ThrowPreconditionFailed(nil, "OIDCS-kj3g2", "Errors.User.NotActive"), wantErr: zerrors.ThrowPreconditionFailed(nil, "OIDCS-kj3g2", "Errors.User.NotActive"),
}, },
@@ -1268,6 +1277,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
want: &OIDCSession{ want: &OIDCSession{
TokenID: "V2_oidcSessionID-at_accessTokenID", TokenID: "V2_oidcSessionID-at_accessTokenID",
@@ -1372,6 +1382,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"backChannelLogoutURI", "backChannelLogoutURI",
"clientID",
}, },
want: &OIDCSession{ want: &OIDCSession{
TokenID: "V2_oidcSessionID-at_accessTokenID", TokenID: "V2_oidcSessionID-at_accessTokenID",
@@ -1472,6 +1483,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
ctx, ctx,
"123", "123",
"", "",
"clientID",
}, },
want: &OIDCSession{ want: &OIDCSession{
TokenID: "V2_oidcSessionID-at_accessTokenID", TokenID: "V2_oidcSessionID-at_accessTokenID",
@@ -1506,7 +1518,7 @@ func TestCommands_CreateOIDCSessionFromDeviceAuth(t *testing.T) {
keyAlgorithm: tt.fields.keyAlgorithm, keyAlgorithm: tt.fields.keyAlgorithm,
authAlgorithm: &mockAuthCrypto{}, authAlgorithm: &mockAuthCrypto{},
} }
got, err := c.CreateOIDCSessionFromDeviceAuth(tt.args.ctx, tt.args.deviceCode, tt.args.backChannelLogoutURI) got, err := c.CreateOIDCSessionFromDeviceAuth(tt.args.ctx, tt.args.deviceCode, tt.args.backChannelLogoutURI, tt.args.clientID)
c.jobs.Wait() c.jobs.Wait()
require.ErrorIs(t, err, tt.wantErr) require.ErrorIs(t, err, tt.wantErr)