Skip to main content

SKY-D413 · Deployment and infrastructure

Envoy HTTP/1 listener accepts ambiguous message framing

MediumCWE-444

A downstream Envoy HTTP connection manager enables allow_chunked_length on a listener that accepts HTTP/1. Envoy accepts requests containing both transfer encoding and content length, and strips the content length.

Languages
Envoy YAML
Quality gate
counted toward the gate limits (full and diff scans)
Finding type
review
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

Another proxy on the same route may interpret the message differently. Review the full route before allowing this compatibility setting.

What Skylos flags

envoy.yaml · YAMLReported on line 12
static_resources:  listeners:  - name: edge    address: {socket_address: {address: 127.0.0.1, port_value: 10000}}    filter_chains:    - filters:      - name: envoy.filters.network.http_connection_manager        typed_config:          '@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager          stat_prefix: edge          http_protocol_options:            allow_chunked_length: true          route_config: {name: local, virtual_hosts: []}          http_filters:          - name: envoy.filters.http.router            typed_config:              '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

What Skylos leaves alone

envoy.yaml · YAML
static_resources:  listeners:  - name: edge    address: {socket_address: {address: 127.0.0.1, port_value: 10000}}    filter_chains:    - filters:      - name: envoy.filters.network.http_connection_manager        typed_config:          '@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager          stat_prefix: edge          http_protocol_options:            allow_chunked_length: false          route_config: {name: local, virtual_hosts: []}          http_filters:          - name: envoy.filters.http.router            typed_config:              '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

Why Skylos leaves it alone

The downstream HTTP/1 parser rejects the conflicting length headers.

How Skylos decides

  1. Reads Envoy v3 static listeners and their regular or default filter chains from a YAML bootstrap. The typed filter must identify an HTTP connection manager configured for HTTP/1 or automatic codec selection.
  2. Reports the specific option when the YAML value is true. Live configuration delivered by Envoy's control plane requires separate review.
  3. Also checks a ConfigMap in the same YAML file as a Pod or Deployment that uses it. The official Envoy container must select the mounted file with a literal -c or --config-path argument. Skylos resolves directory mounts and explicit key-to-path mappings, then points to the option inside the ConfigMap's literal YAML block. Separate manifests, subPath mounts, command-line overlays and rendered templates require review.

How to fix it

Use Envoy's default framing policy by removing the option or setting it to false.

envoy.yaml · YAML · the fix, against the flagged file
static_resources:  listeners:  - name: edge    address: {socket_address: {address: 127.0.0.1, port_value: 10000}}    filter_chains:    - filters:      - name: envoy.filters.network.http_connection_manager        typed_config:          '@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager          stat_prefix: edge          http_protocol_options:Removed:             allow_chunked_length: trueAdded:             allow_chunked_length: false          route_config: {name: local, virtual_hosts: []}          http_filters:          - name: envoy.filters.http.router            typed_config:              '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

When it can be wrong

  • A private listener can intentionally accept a legacy client behind an upstream component that enforces a single framing policy.

Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.

How to silence it

  • A project can suppress this review with SKY-D413 in its Skylos ignore list.

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.