Skip to content

Fix compile_time_options CI failure: apply CommandParser::parse StatusOr change on top of CVE-2026-47220 fix#45819

Closed
yanavlasov with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-github-actions-job-compile-time-options
Closed

Fix compile_time_options CI failure: apply CommandParser::parse StatusOr change on top of CVE-2026-47220 fix#45819
yanavlasov with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-github-actions-job-compile-time-options

Conversation

Copilot AI commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

PR #45752 ("Change CommandParser::parse to return StatusOr") was based on main before the CVE-2026-47220 fix (commit 4a70d8d594) landed. The CVE fix added null guards to RequestedServerNameFormatter::getHostFromHeaders() for Host() and EnvoyOriginalHost() headers. The PR's code removed those guards, causing runtime crashes in compile_time_options CI (which enables UHV and exercises more header edge cases).

Changes

  • API change (envoy/formatter/substitution_formatter.h): CommandParser::parse virtual method now returns absl::StatusOr<FormatterProviderPtr> instead of FormatterProviderPtr
  • Formatter implementations (source/common/formatter/, source/extensions/formatter/): All parse overrides updated to return absl::StatusOr<FormatterProviderPtr>
  • Extension formatters: cel, dynamic_modules, file_content, generic_secret, metadata, req_without_query, xfcc_value, DNS filter access log — all updated
  • CVE fix preserved: getHostFromHeaders() retains null checks from the CVE-2026-47220 fix:
// Safe version (preserved from CVE fix):
case HostOnly: {
  if (auto host = headers->Host(); host != nullptr) {
    result = host->value().getStringView();
  }
  break;
}
case OriginalHostOrHost: {
  if (auto orig = headers->EnvoyOriginalHost(); orig != nullptr) {
    result = orig->value().getStringView();
  } else if (auto host = headers->Host(); host != nullptr) {
    result = host->value().getStringView();
  }
  break;
}
  • Tests: CVE regression tests (stream_info_no_requested_name_no_headers) preserved alongside updated StatusOr call sites

yanavlasov and others added 5 commits June 22, 2026 18:26
Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: yavlasov <yavlasov@google.com>
Signed-off-by: yavlasov <yavlasov@google.com>
@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #45819 was opened by Copilot.

see: more, trace.

- Change CommandParser::parse to return absl::StatusOr<FormatterProviderPtr>
- Update all formatter implementations and extensions
- Update all callers and tests to use new StatusOr return type
- Preserve CVE-2026-47220 fix (null checks in getHostFromHeaders)
- Keep CVE tests for empty headers in substitution_formatter_test.cc

Co-authored-by: yanavlasov <6360027+yanavlasov@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job for compile time options Fix compile_time_options CI failure: apply CommandParser::parse StatusOr change on top of CVE-2026-47220 fix Jun 23, 2026
Copilot AI requested a review from yanavlasov June 23, 2026 23:30
@yanavlasov yanavlasov closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants