You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tl;dr Removing the VERSION reduces the available footprint that malignant actors or factors to identify flaws in code
Summary
Add a configuration option to control the verbosity of version information disclosed by the /api/v2/updatecheck endpoint, similar to Apache's ServerTokens directive. This addresses security concerns about unauthenticated disclosure of detailed backend version and Git commit information while maintaining update check functionality.
Background
Current Behavior
The /api/v2/updatecheck endpoint currently returns detailed version information to unauthenticated users:
However, this removes all update check functionality, which may not be desirable for administrators who want to monitor for updates while limiting information disclosure.
Proposed Solution
Configuration Option
Add --update-check-version-tokens configuration option with Apache ServerTokens-style verbosity levels:
CLI Flag:
--update-check-version-tokens=Prod
Environment Variable:
CODER_UPDATE_CHECK_VERSION_TOKENS=Prod
YAML Configuration:
updateCheckVersionTokens: Prod
Verbosity Levels
Full (Default - Current Behavior)
Maintains backward compatibility with existing behavior:
tl;dr Removing the VERSION reduces the available footprint that malignant actors or factors to identify flaws in code
Summary
Add a configuration option to control the verbosity of version information disclosed by the
/api/v2/updatecheckendpoint, similar to Apache's ServerTokens directive. This addresses security concerns about unauthenticated disclosure of detailed backend version and Git commit information while maintaining update check functionality.Background
Current Behavior
The
/api/v2/updatecheckendpoint currently returns detailed version information to unauthenticated users:{ "current": true, "version": "v2.25.1-devel+2b14aa3ee", "url": "https://github.com/coder/coder/commit/2b14aa3eecf414cf0b4bbb06a5c7f9066f80d61c" }Security Concern
This detailed information disclosure can enable:
Current Mitigation
The update check can be completely disabled using:
However, this removes all update check functionality, which may not be desirable for administrators who want to monitor for updates while limiting information disclosure.
Proposed Solution
Configuration Option
Add
--update-check-version-tokensconfiguration option with Apache ServerTokens-style verbosity levels:CLI Flag:
Environment Variable:
YAML Configuration:
Verbosity Levels
Full(Default - Current Behavior)Maintains backward compatibility with existing behavior:
{ "current": true, "version": "v2.25.1-devel+2b14aa3ee", "url": "https://github.com/coder/coder/commit/2b14aa3eecf414cf0b4bbb06a5c7f9066f80d61c" }Prod(Production-Safe)Returns clean version without build/commit information:
{ "current": true, "version": "v2.25.1", "url": "https://github.com/coder/coder/releases" }Major(Major Version Only)Returns only major version information:
{ "current": true, "version": "v2", "url": "https://github.com/coder/coder/releases" }Minimal(Repository Reference Only)Returns minimal information with repository link:
{ "url": "https://github.com/coder/coder" }None(No Version Information)Returns empty response or minimal structure:
{}Implementation Considerations
Backward Compatibility
Fullto maintain existing functionalitySecurity Benefits
Operational Benefits
Use Cases
Production Environments
Set to
ProdorMinimalto limit version disclosure while maintaining update awareness:High-Security Environments
Set to
Noneto completely eliminate version information disclosure:Development/Staging
Keep
Fullfor detailed version tracking and debugging:Alternative Approaches Considered
CODER_UPDATE_CHECK=falsebut removes all functionalityReferences
CODER_UPDATE_CHECKenvironment variable/api/v2/updatecheckendpoint behaviorAcceptance Criteria
Full)Priority
Medium-High - Addresses security concerns while maintaining operational functionality. Requested by enterprise customer (Europol) for compliance requirements.