Language: Go
Label: safe
CWE: CWE-287 \u2014 Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

Code:
func MakeFilterGenerators(serviceInfo *ci.ServiceInfo) ([]FilterGenerator, error) {
	return []FilterGenerator{
		&filtergen.HeaderSanitizerGenerator{},
		filtergen.NewCORSGenerator(serviceInfo),

		// Health check filter is behind Path Matcher filter, since Service Control
		// filter needs to get the corresponding rule for health check in order to skip Report
		filtergen.NewHealthCheckGenerator(serviceInfo),
		filtergen.NewCompressorGenerator(serviceInfo, filtergen.GzipCompressor),
		filtergen.NewCompressorGenerator(serviceInfo, filtergen.BrotliCompressor),
		filtergen.NewJwtAuthnGenerator(serviceInfo),
		filtergen.NewServiceControlGenerator(serviceInfo),

		// grpc-web filter should be before grpc transcoder filter.
		// It converts content-type application/grpc-web to application/grpc and
		// grpc transcoder will bypass requests with application/grpc content type.
		// Otherwise grpc transcoder will try to transcode a grpc-web request which
		// will fail.
		filtergen.NewGRPCWebGenerator(serviceInfo),
		filtergen.NewGRPCTranscoderGenerator(serviceInfo),

		filtergen.NewBackendAuthGenerator(serviceInfo),
		filtergen.NewPathRewriteGenerator(serviceInfo),
		filtergen.NewGRPCMetadataScrubberGenerator(serviceInfo),

		// Add Envoy Router filter so requests are routed upstream.
		// Router filter should be the last.
		&filtergen.RouterGenerator{},
	}, nil
}