Review Protocol Buffers enum type naming

Use TitleCase for enum type names.

Description

The Protocol Buffers style guide recommends TitleCase, such as JobStatus, for enum type names. This is a code-consistency convention; the name format alone is not a security vulnerability.

Potential impact

Inconsistent naming can make generated code and documentation harder to read and maintain.

Remediation

Use TitleCase for enum type names. Before renaming an existing type, check and update references in code using the generated API.

Examples

Only the type name changes to JobStatus; enum values and numbers remain unchanged. The two snippets are independent examples.

Before

proto
syntax = "proto3";

enum NOT_CAMEL_CASE {
  UNKNOWN = 0;
  STARTED = 1;
  RUNNING = 2;
}

After

proto
syntax = "proto3";

enum JobStatus {
  UNKNOWN = 0;
  STARTED = 1;
  RUNNING = 2;
}

References