Title: Feature Request: Configurable Version Information Verbosity for /api/v2/updatecheck · Issue #20149 · coder/coder · GitHub
Open Graph Title: Feature Request: Configurable Version Information Verbosity for /api/v2/updatecheck · Issue #20149 · coder/coder
X Title: Feature Request: Configurable Version Information Verbosity for /api/v2/updatecheck · Issue #20149 · coder/coder
Description: 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...
Open Graph Description: 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 informat...
X Description: 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 informat...
Opengraph URL: https://github.com/coder/coder/issues/20149
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature Request: Configurable Version Information Verbosity for /api/v2/updatecheck","articleBody":"# tl;dr Removing the VERSION reduces the available footprint that malignant actors or factors to identify flaws in code\n\n## Summary\n\nAdd 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.\n\n## Background\n\n### Current Behavior\n\nThe `/api/v2/updatecheck` endpoint currently returns detailed version information to unauthenticated users:\n\n```json\n{\n \"current\": true,\n \"version\": \"v2.25.1-devel+2b14aa3ee\",\n \"url\": \"https://github.com/coder/coder/commit/2b14aa3eecf414cf0b4bbb06a5c7f9066f80d61c\"\n}\n```\n\n### Security Concern\n\nThis detailed information disclosure can enable:\n- **Version fingerprinting**: Attackers can identify exact versions and build commits\n- **Targeted reconnaissance**: Knowledge of specific commits allows vulnerability mapping\n- **Development workflow insights**: Exposure of internal build identifiers and CI/CD structure\n- **Accelerated exploitation**: Direct links to source code and changelogs\n\n### Current Mitigation\n\nThe update check can be completely disabled using:\n```yaml\ncoder:\n env:\n - name: CODER_UPDATE_CHECK\n value: \"false\"\n```\n\nHowever, this removes all update check functionality, which may not be desirable for administrators who want to monitor for updates while limiting information disclosure.\n\n## Proposed Solution\n\n### Configuration Option\n\nAdd `--update-check-version-tokens` configuration option with Apache ServerTokens-style verbosity levels:\n\n**CLI Flag:**\n```bash\n--update-check-version-tokens=Prod\n```\n\n**Environment Variable:**\n```bash\nCODER_UPDATE_CHECK_VERSION_TOKENS=Prod\n```\n\n**YAML Configuration:**\n```yaml\nupdateCheckVersionTokens: Prod\n```\n\n### Verbosity Levels\n\n#### `Full` (Default - Current Behavior)\nMaintains backward compatibility with existing behavior:\n```json\n{\n \"current\": true,\n \"version\": \"v2.25.1-devel+2b14aa3ee\",\n \"url\": \"https://github.com/coder/coder/commit/2b14aa3eecf414cf0b4bbb06a5c7f9066f80d61c\"\n}\n```\n\n#### `Prod` (Production-Safe)\nReturns clean version without build/commit information:\n```json\n{\n \"current\": true,\n \"version\": \"v2.25.1\",\n \"url\": \"https://github.com/coder/coder/releases\"\n}\n```\n\n#### `Major` (Major Version Only)\nReturns only major version information:\n```json\n{\n \"current\": true,\n \"version\": \"v2\",\n \"url\": \"https://github.com/coder/coder/releases\"\n}\n```\n\n#### `Minimal` (Repository Reference Only)\nReturns minimal information with repository link:\n```json\n{\n \"url\": \"https://github.com/coder/coder\"\n}\n```\n\n#### `None` (No Version Information)\nReturns empty response or minimal structure:\n```json\n{}\n```\n\n## Implementation Considerations\n\n### Backward Compatibility\n- Default behavior remains `Full` to maintain existing functionality\n- Existing deployments continue to work without configuration changes\n- API response structure remains consistent across verbosity levels\n- Do we remove the UI parts, login screen, end-user Settings visibility?\n\n### Security Benefits\n- **Reduced attack surface**: Limits information available for reconnaissance\n- **Flexible security posture**: Organizations can choose appropriate disclosure level\n- **Compliance alignment**: Helps meet security requirements for minimal information disclosure\n\n### Operational Benefits\n- **Maintained functionality**: Update checks continue to work at reduced verbosity levels\n- **Administrative visibility**: Admins can still monitor for updates while limiting public disclosure\n- **Configuration flexibility**: Easy to adjust based on environment requirements (dev/staging/prod)\n\n## Use Cases\n\n### Production Environments\nSet to `Prod` or `Minimal` to limit version disclosure while maintaining update awareness:\n```yaml\nupdateCheckVersionTokens: Prod\n```\n\n### High-Security Environments\nSet to `None` to completely eliminate version information disclosure:\n```yaml\nupdateCheckVersionTokens: None\n```\n\n### Development/Staging\nKeep `Full` for detailed version tracking and debugging:\n```yaml\nupdateCheckVersionTokens: Full\n```\n\n## Alternative Approaches Considered\n\n1. **Complete endpoint disabling**: Already available via `CODER_UPDATE_CHECK=false` but removes all functionality\n2. **Authentication requirement**: Would break existing update check workflows\n3. **Response filtering**: Current proposal provides granular control while maintaining API structure\n\n## References\n\n- **Apache ServerTokens**: Industry standard for controlling server version disclosure\n- **Original Security Report**: Issue #5 - Unauthenticated Disclosure of Backend Version and Git Commit\n- **Existing Configuration**: `CODER_UPDATE_CHECK` environment variable\n- **Endpoint Documentation**: `/api/v2/updatecheck` endpoint behavior\n\n## Acceptance Criteria\n\n- [ ] Configuration option accepts all specified verbosity levels\n- [ ] Default behavior remains unchanged (`Full`)\n- [ ] API response structure maintained across all levels\n- [ ] Documentation updated with new configuration option\n- [ ] Backward compatibility preserved\n- [ ] Security testing validates reduced information disclosure\n\n## Priority\n\n**Medium-High** - Addresses security concerns while maintaining operational functionality. Requested by enterprise customer (Europol) for compliance requirements.","author":{"url":"https://github.com/bjornrobertsson","@type":"Person","name":"bjornrobertsson"},"datePublished":"2025-10-02T16:07:26Z","url":"https://github.com/coder/coder/issues/20149"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eb40732b-290a-e2c1-be05-9b5ee59d1f94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B656:EA09B:19D0DFE:223543B:6B01505B |
| html-safe-nonce | e2461144a051870a90af06db841ff4026f16788326a50bbc8bfe411561c611c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjU2OkVBMDlCOjE5RDBERkU6MjIzNTQzQjo2QjAxNTA1QiIsInZpc2l0b3JfaWQiOiI3ODU5Mzg5Njk1MDE5NTM2NDc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 54eab744e520d611b6d8b6560591590e9cca38a580a5be4d3136fb155816ccdc |
| hovercard-subject-tag | issue:3478084014 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/20149/issue_layout |
| twitter:image | https://opengraph.githubassets.com/434e79c2d57b57fbdff2826eb9fdc1618e38067fb5e0455eac9e4aaeedd9c929/coder/coder/issues/20149 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/434e79c2d57b57fbdff2826eb9fdc1618e38067fb5e0455eac9e4aaeedd9c929/coder/coder/issues/20149 |
| og:image:alt | 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 informat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bjornrobertsson |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width