Skip to content

Hide secret function arguments in EXPLAIN when the value comes from another plan step - #120371

Merged
vdimir merged 17 commits into
masterfrom
vdimir/fix-explain-secret-mask-across-steps
Oct 6, 2026
Merged

vdimir merged 17 commits into
masterfrom
vdimir/fix-explain-secret-mask-across-steps

Conversation

@vdimir

@vdimir vdimir commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

EXPLAIN PLAN actions = 1 masks the secret arguments of functions like HMAC, encrypt and decrypt by flagging the constant nodes the planner sees while building the function. When the secret argument is a column of a derived table or of the opposite side of a JOIN, the argument is an INPUT node at planning time, and later optimizations (mergeExpressions via deduplicateSubtrees, the join filter push-down via inlineConstantInputs) bind it to a fresh, unflagged constant. The pretty formatter then printed its value in cleartext. A non-constant argument in the same position was rendered through the expression its child step computed it from, which could contain the secret as well.

The pretty formatter now re-derives the secret argument positions from the function node itself, using the existing FunctionSecretArgumentsFinderActionsDAG, and renders everything inside such a position fail-closed: any node carrying a value prints [HIDDEN], a column reference prints its name only, nested expressions keep their structure. This does not depend on which optimization rewrote the node. The is_masked_secret flag keeps working as before for constants the planner flags directly.

Scope: only the secret argument positions are masked. The result of a function like decrypt is treated as an ordinary computed value and is still displayed, in line with SHOW CREATE which hides the arguments only.

Tests: 05213_explain_hide_secrets_across_steps covers the derived-table, JOIN-side constant, JOIN-side column and nested-expression shapes with viewExplain assertions. 05218_explain_hide_secrets_definer_view_join.sh reproduces the reported scenario verbatim: SQL SECURITY DEFINER views whose HMAC key is a decrypt result computed on the other side of a JOIN or in a derived table, queried by a user holding only SELECT on the view, across every EXPLAIN flavour.

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix EXPLAIN PLAN actions = 1 printing a secret function argument (for example the key of HMAC or encrypt) in cleartext when its value came from a subquery or from the other side of a JOIN.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/120371]

Version info

  • Merged into: 26.10.1.1666-master (included in 26.10 and later)
  • Backported to: 26.9.13.16, 26.8.22.6, 26.7.26.4

vdimir and others added 9 commits September 15, 2026 14:55
…utput

`is_masked_secret` is set by the planner only on the constant nodes it sees
while building a function's arguments. When the secret argument of `HMAC`,
`encrypt` etc. is a column of a derived table or of the opposite side of a
JOIN, the argument is an INPUT node at planning time; `mergeExpressions`
(via `deduplicateSubtrees`) or the join filter push-down (via
`inlineConstantInputs`) later bind it to an unflagged constant, and
`QueryPlanFormat::formatConstant` printed its value in cleartext. A user
with only `SELECT` on a `SQL SECURITY DEFINER` view could read a decrypted
key out of `EXPLAIN PLAN actions = 1`.

Re-derive the secret argument positions in `formatNodePretty` from the
function node itself with `FunctionSecretArgumentsFinderActionsDAG`, and
render everything inside such a slot fail-closed: any node carrying a value
is `[HIDDEN]`, a column reference shows its name only (never the expression
a child step computes it from), nested functions keep their structure.

Related: ClickHouse/clickhouse-private#72525

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The analyzer folds `decrypt('mode', ciphertext, key)` with constant
arguments into a `ConstantNode` holding the plaintext. The arguments are
masked, but the folded result was not, so the planner named the action
node after its value (`_CAST('plaintext'_String, 'String'_String)`) and
EXPLAIN showed it: in the legacy `actions = 1` dump as the node name, in
the pretty dump as the constant value, and in `EXPLAIN QUERY TREE` as the
constant. A `SQL SECURITY DEFINER` view that only uses the decrypted value
internally leaked it to any user with `SELECT` on the view.

Mask the folded result whenever the function has secret arguments and
secrets are hidden, so it is named and displayed as `[HIDDEN id: N]` like
the arguments it was derived from. Execution is unaffected.

Related: ClickHouse/clickhouse-private#72525

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Review feedback: the flag only matters inside the recursion, so it lives on
a static `formatNodePrettyImpl`, and the declared `formatNodePretty` keeps
its original signature and forwards with `false`. Also document why the
flag is inherited by the whole subtree of a secret argument.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…nition

The declaration moved into the .cpp kept the old five-argument signature,
so it was a second, undefined overload. Declare the single function with
`in_secret_slot = false` as default.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…aliases

A masked constant leaves its plan step as a header column, which carries
only name, type and value, so the node the next step rebuilds from it had
no mask. `Project names` then aliased it to the user's name and
`removeUnusedActions` folded the alias into a plain COLUMN, and EXPLAIN
printed the plaintext in `Output:` for `SELECT decrypt(...) AS k`.

- `addInput(ColumnWithTypeAndName)` and the `duplicate_const_columns`
  constructor restore the mask from the placeholder name the planner gives
  every masked constant (`isMaskedSecretName`).
- `createAlias` inherits the mask; `project` and `addAliases` build their
  aliases through it instead of by hand.
- A function folded to a constant inherits the mask from its children.

Only one hop is covered: once an alias renamed the constant, the header
name no longer carries the placeholder, so a projected secret behind a
subquery or JOIN still shows in `Output:`. Carrying the mask in
`ColumnWithTypeAndName` itself would close that.

Related: ClickHouse/clickhouse-private#72525

Co-Authored-By: Claude Fable 5.1 <[email protected]>
`05213` gains the report's exact JOIN shape (the `HMAC` key is
`decrypt('aes-128-cbc', unhex(...), key, iv)` on the opposite side) and
its `WITH` alias control.

`05218` reproduces the privilege scenario: the four views from the report
are created by a definer user, a second user holding only `SELECT` on them
runs every EXPLAIN flavour and must not see the plaintext, `SHOW CREATE`
keeps hiding the arguments, `SELECT` stays usable, and a user without the
grant gets `ACCESS_DENIED`. Only leak counts and the presence of the
`[HIDDEN]` placeholder go into the reference, so it does not depend on the
plan layout.

Related: ClickHouse/clickhouse-private#72525

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [1f071a4]

Summary: ✅


AI Review

Summary

This PR hardens pretty EXPLAIN PLAN rendering so secret function arguments stay masked even when the value is introduced by another plan step, and the new stateless coverage exercises the cross-step shapes that originally leaked. I still see one correctness gap in EXPLAIN ANALYZE: the new show_secrets plumbing snapshots the permission/setting gate from the outer session context instead of the query-local context, so EXPLAIN ANALYZE ... SETTINGS format_display_secrets_in_show_and_select = ... can still disagree with EXPLAIN PLAN on the same query.

Findings

⚠️ Majors

  • [src/Interpreters/InterpreterExplainQuery.cpp:1014] getAnalyzedInnerQuery caches query_plan_options.show_secrets from getContext() before the EXPLAIN query's own SETTINGS are consulted. executeImpl applies the query-local settings to planning_context / query_context, but EXPLAIN ANALYZE later builds precomputed_pretty_names from this cached bit at src/Interpreters/InterpreterExplainQuery.cpp:1416, so EXPLAIN ANALYZE ... SETTINGS format_display_secrets_in_show_and_select = 1 still hides secret slots and ... = 0 can still show column-driven secret arguments when the session default is 1. That breaks the new contract that the secret-display gate is honored uniformly across EXPLAIN entrypoints. Derive show_secrets from planning_context after InterpreterSetQuery::applySettingsFromQuery, or from result->context once the interpreter is created, so EXPLAIN ANALYZE and EXPLAIN PLAN use the same effective setting.
Tests
  • ⚠️ Add one focused regression around EXPLAIN ANALYZE with query-local SETTINGS format_display_secrets_in_show_and_select = 0/1. The current tests/queries/0_stateless/05219_explain_show_secrets_with_privilege.sh only flips the session-level clickhouse-local setting, so it cannot catch the stale-context bug above.
Final Verdict
  • Status: ⚠️ Request changes
  • Minimum required: make EXPLAIN ANALYZE read the effective secret-display gate from the query-local context, then cover that path with a focused regression test.

LLVM Coverage Report

Measured on commit 1f071a4.

Metric Baseline Current Δ
Lines 88.20% 88.20% +0.00%
Functions 92.10% 92.20% +0.10%
Branches 79.70% 79.70% +0.00%

Changed lines: Changed C/C++ lines covered: 174/176 (98.86%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Sep 16, 2026
The pretty formatter hid the values in secret argument positions unconditionally, while the legacy
format, `SHOW CREATE` and `EXPLAIN SYNTAX` follow `canDisplaySecrets`. Thread a `show_secrets` option
from `InterpreterExplainQuery` into `buildPrettyNamesPerPlan`; every other caller keeps the default
and hides. The test uses clickhouse-local, since the stateless server does not enable
`display_secrets_in_show_and_select`.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added the comp-query-optimizer Query plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa... label Sep 16, 2026
auto result = std::make_unique<AnalyzedInnerQuery>();

result->query_plan_options = checkAndGetSettings<QueryAnalyzeSettings>(ast.getSettings()).query_plan_options;
result->query_plan_options.show_secrets = canDisplaySecrets(getContext());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAnalyzedInnerQuery snapshots show_secrets from getContext() here, before the EXPLAIN query's own SETTINGS are applied to planning_context above. That makes the new pretty-plan behavior diverge by entrypoint: EXPLAIN PLAN ... SETTINGS format_display_secrets_in_show_and_select = 1 uses the updated query_context and shows secrets, but EXPLAIN ANALYZE reuses this cached false and still builds precomputed_pretty_names with [HIDDEN] (and the reverse SETTINGS ... = 0 override is ignored too).

Please derive this from planning_context after InterpreterSetQuery::applySettingsFromQuery, or from result->context once the interpreter is built, and add coverage for the query-local SETTINGS path in EXPLAIN ANALYZE. The current 05219 test only exercises the session-level clickhouse-local flag, so it would not catch this mismatch.

@clickhouse-gh

clickhouse-gh Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 1f071a4fd with master d9597c12c (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of c86d32b12; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

72 object files changed (+131.25 KiB total), 0 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Storages/MergeTree/MutateTask.cpp.o 1.15 MiB 1.23 MiB +83.64 KiB (+7.11%)
src/CMakeFiles/dbms.dir/Processors/QueryPlan/QueryPlanFormat.cpp.o 298.00 KiB 334.05 KiB +36.05 KiB (+12.10%)

719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

304 translation units recompiled, 2578 s compile time in total, 304 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×1.07 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost +178.7 s (+7%) in total before that adjustment.

Job report

vdimir and others added 2 commits September 17, 2026 14:23
`EVP_MD_fetch` returns a reference-counted handle that `FunctionHMAC::executeImpl`
never released. Under ASan the leaked handle keeps the OpenSSL provider state alive
past `OPENSSL_cleanup`, and LeakSanitizer prints a "Suppressions used" summary at
exit of every `clickhouse-local` process that executed `HMAC`, including the
empty-block execution done by `EXPLAIN`. The stateless harness treats that summary
as stderr output, which failed `05219_explain_show_secrets_with_privilege` in the
ASan flaky check.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=120371&sha=39f9c0d2399f78e7f651b864d7d0fafcb025c645&name_0=PR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20flaky%20check%29
PR: #120371

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@Fgrtue Fgrtue self-assigned this Sep 21, 2026

@Fgrtue Fgrtue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since in the future we plan to add more printers for EXPLAIN, I would suggest we find a place in the code, somewhere after the optimizations of the plan, where we check all the nodes of the plan, and mark the ones that have secrets as secrets. This would allow us to hide the secrets uniformly.

Comment on lines +334 to +350
static std::vector<bool> getSecretArgumentSlots(const ActionsDAG::Node & function)
{
std::vector<bool> slots(function.children.size(), false);
auto secret_arguments = FunctionSecretArgumentsFinderActionsDAG(function).getResult();
if (!secret_arguments.hasSecrets())
return slots;

for (size_t i = secret_arguments.start; i < secret_arguments.start + secret_arguments.count && i < slots.size(); ++i)
slots[i] = true;
for (const auto & [index, _] : secret_arguments.masked_arguments)
if (index < slots.size())
slots[index] = true;
for (const auto & [index, _] : secret_arguments.replaced_arguments)
if (index < slots.size())
slots[index] = true;
return slots;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic decides which nodes of a DAG are secret, and it is placed inside one printer. A future printer of DAG values would have to copy it, and would leak until someone remembers to.

I think we should have a dedicated method next to ActionsDAG so we can reuse the methods at least.

Something like:

  • ActionsDAG::markSecretArguments(), that sets is_masked_secret on those nodes. Run once at the end of QueryPlan::optimize when is_explain is set.

Then the printers only check the flag, and the flag-based and slot-based paths collapse into one.

hasSecretsInActionsDAG in InterpreterExplainQuery.cpp:338 could then also use the same helper instead of a third copy of the walk.

Comment on lines +341 to +350
for (size_t i = secret_arguments.start; i < secret_arguments.start + secret_arguments.count && i < slots.size(); ++i)
slots[i] = true;
for (const auto & [index, _] : secret_arguments.masked_arguments)
if (index < slots.size())
slots[index] = true;
for (const auto & [index, _] : secret_arguments.replaced_arguments)
if (index < slots.size())
slots[index] = true;
return slots;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the third copy of "is argument n secret?": the same loop over start/count, masked_arguments and replaced_arguments exists in markFoldedSecretConstants
(PlannerActionsVisitor.cpp:1246) and in forEachSecretArgumentNode (FunctionSecretArgumentsFinderTreeNode.cpp:44).

Result owns this knowledge, so the check belongs on it. One method in Parsers/FunctionSecretArgumentsFinder.h:

bool isSecretArgument(size_t n) const
{
    return (start <= n && n < start + count)
        || masked_arguments.contains(n)
        || replaced_arguments.contains(n);
}

Then all three callers become one call each. forEachSecretArgumentNode keeps its nested_maps branch, since only table functions have those. If a fourth kind of masking is ever added to Result, it is fixed in one place.

{
ShowAll,
HideSecrets,
InSecretSlot,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to hide arguments withing a function. I.e. it improves the granularity of what we are actually hiding and what we don't. I am thinking -- why don't we just fail closed, if the argument of the function (like HMAC or similar) is a secret? I think this would be safer.

clickgapai pushed a commit to clickgapai/ClickHouse that referenced this pull request Oct 1, 2026
…n it themselves

The plan of a `SQL SECURITY DEFINER` or `NONE` view runs with the view's privileges and can hold
values folded from data the invoker cannot read: a scalar subquery over a private table, a key
decrypted on the other side of a JOIN. `EXPLAIN` printed them to any user with `SELECT` on the view.

`ReadFromSealedViewStep` is now opaque in `EXPLAIN` unless the user could have created the same view
(the definer, a user with `SET DEFINER` on the definer, a user with `ALLOW SQL SECURITY NONE` for a
`NONE` view) or may display secrets (the server setting `display_secrets_in_show_and_select`, the
format setting and the `displaySecretsInShowAndSelect` privilege). The child plan is hidden from the
plan and pipeline dumps only; the optimizations keep seeing it through `getChildPlans`. In the hidden
case the inner processors are attributed to the sealed step, so `EXPLAIN PIPELINE graph = 1` and
`system.processors_profile_log` do not show the inner steps either.

Related: ClickHouse/clickhouse-private#72525
Related: ClickHouse#120371

Co-Authored-By: Claude Fable 5.1 <[email protected]>
vdimir and others added 5 commits October 2, 2026 14:47
# Conflicts:
#	src/Interpreters/InterpreterExplainQuery.cpp
A secret argument position (the key of `HMAC`, everything after the mode of `encrypt`) is
rendered as a single `[HIDDEN]` instead of its structure with the constants hidden, as the
AST formatter does for `SHOW CREATE`. Rendering the structure had to catch every place a
value can surface, and the `IN` operator formatted its literal set directly, so
`HMAC('sha256', msg, if(x IN ('a', 'b'), k1, k2))` printed the set elements in cleartext.

The `InSecretSlot` rendering state is gone. `05213` pins the whole-slot rendering for a
column reference and for the `encrypt` span and adds the `IN` set shape; `05057` changes
accordingly, the plaintext column of `encrypt` is hidden together with the key.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The check "is argument `n` hidden" over the span, `masked_arguments` and
`replaced_arguments` was written three times: in the pretty plan formatter, in
`markFoldedSecretConstants` of the planner and in `forEachSecretArgumentNode` of the
query tree. `Result` owns that knowledge, so the three callers become one call each,
and a new kind of masking added to `Result` is handled in one place.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@vdimir
vdimir requested a review from Fgrtue October 5, 2026 13:35

@Fgrtue Fgrtue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!

@vdimir
vdimir added this pull request to the merge queue Oct 6, 2026
@vdimir vdimir added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Oct 6, 2026
Merged via the queue into master with commit 245617c Oct 6, 2026
294 of 295 checks passed
@vdimir
vdimir deleted the vdimir/fix-explain-secret-mask-across-steps branch October 6, 2026 13:39
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 6, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Oct 6, 2026
vdimir added a commit that referenced this pull request Oct 6, 2026
Resolve the conflicts of the cherry-pick of #120371 (`InterpreterExplainQuery.cpp`): the EXPLAIN
options `time` do not exist in 26.9, so only `show_secrets` is added
next to the release's fields. `BlockNestedLoopJoinStep.cpp` does not exist in 26.9 and is dropped.

The sealed-view check of `05218_explain_hide_secrets_definer_view_join` is removed: `ReadFromSealedView`
does not exist in 26.9, so the plan of a `SQL SECURITY DEFINER` view is shown and the test only asserts
that no secret reaches the output.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
vdimir added a commit that referenced this pull request Oct 6, 2026
Resolve the conflicts of the cherry-pick of #120371 (`InterpreterExplainQuery.cpp`, `QueryPlan.cpp`, `QueryPlanFormat.h`): the EXPLAIN
options `inside_explain_analyze` do not exist in 26.8, so only `show_secrets` is added
next to the release's fields. `BlockNestedLoopJoinStep.cpp` does not exist in 26.8 and is dropped.

The sealed-view check of `05218_explain_hide_secrets_definer_view_join` is removed: `ReadFromSealedView`
does not exist in 26.8, so the plan of a `SQL SECURITY DEFINER` view is shown and the test only asserts
that no secret reaches the output.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
vdimir added a commit that referenced this pull request Oct 6, 2026
Resolve the conflicts of the cherry-pick of #120371 (`InterpreterExplainQuery.cpp`, `QueryPlan.cpp`, `QueryPlan.h`, `QueryPlanFormat.h`): the EXPLAIN
options `inside_explain_analyze`, `estimates`, `time` and `matches` do not exist in 26.7, so only `show_secrets` is added
next to the release's fields. `BlockNestedLoopJoinStep.cpp` does not exist in 26.7 and is dropped.

The sealed-view check of `05218_explain_hide_secrets_definer_view_join` is removed: `ReadFromSealedView`
does not exist in 26.7, so the plan of a `SQL SECURITY DEFINER` view is shown and the test only asserts
that no secret reaches the output.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
robot-clickhouse added a commit that referenced this pull request Oct 6, 2026
Cherry pick #120371 to 26.7: Hide secret function arguments in EXPLAIN when the value comes from another plan step
robot-clickhouse added a commit that referenced this pull request Oct 6, 2026
…hen the value comes from another plan step
robot-clickhouse added a commit that referenced this pull request Oct 6, 2026
Cherry pick #120371 to 26.8: Hide secret function arguments in EXPLAIN when the value comes from another plan step
robot-clickhouse added a commit that referenced this pull request Oct 6, 2026
…hen the value comes from another plan step
robot-clickhouse added a commit that referenced this pull request Oct 6, 2026
Cherry pick #120371 to 26.9: Hide secret function arguments in EXPLAIN when the value comes from another plan step
robot-clickhouse added a commit that referenced this pull request Oct 6, 2026
…hen the value comes from another plan step
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 7, 2026
clickhouse-gh Bot pushed a commit that referenced this pull request Oct 8, 2026
Edited by the nightly changelog CI job following .claude/skills/edit-changelog/SKILL.md.

Changelog-revert: 119270 115343 Revert "Resume a NATS JetStream subscription after a reconnect"
Changelog-revert: 119301 119270 Revert "Revert "Resume a NATS JetStream subscription after a reconnect""
Changelog-revert: 121075 120923 Revert "Revert "Join reordering: FK->PK heuristic for equi joins without NDV statistics""
Changelog-revert: 124272 120371 Revert "Hide secret function arguments in EXPLAIN when the value comes from another plan step"
Changelog-deleted-entry: 120371 [Bug Fix (user-visible misbehavior in an official stable release)] [section] * Fix `EXPLAIN PLAN actions = 1` printing a secret function argument (for example the key of `HMAC` or `encrypt`) in cleartext when its value came from a subquery or from the other side of a `JOIN`. [#120371](#120371) ([Vladimir Cherkasov](https://github.com/vdimir)).
clickhouse-gh Bot added a commit that referenced this pull request Oct 8, 2026
Backport #120371 to 26.9: Hide secret function arguments in EXPLAIN when the value comes from another plan step
clickhouse-gh Bot added a commit that referenced this pull request Oct 8, 2026
Backport #120371 to 26.8: Hide secret function arguments in EXPLAIN when the value comes from another plan step
vdimir added a commit that referenced this pull request Oct 9, 2026
Backport #120371 to 26.7: Hide secret function arguments in EXPLAIN when the value comes from another plan step
@clickhouse-gh clickhouse-gh Bot added comp-explain EXPLAIN and query profiling output: EXPLAIN PLAN / PIPELINE / AST / SYNTAX / ESTIMATE, pretty EXP... and removed comp-query-optimizer Query plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa... labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-explain EXPLAIN and query profiling output: EXPLAIN PLAN / PIPELINE / AST / SYNTAX / ESTIMATE, pretty EXP... pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants