Repository navigation
Gateway: harden cron.runs jobId path handling - #24038
Merged
Merged
Conversation
Takhoffman
force-pushed
the
fix/cron-runs-path-safety
branch
from
February 23, 2026 01:34
347da47 to
6993183
Compare
Contributor
Author
|
PR #24038 - Gateway: harden cron.runs jobId path handling (#24038) Merged via squash.
Thanks @Takhoffman! |
carlosrivera
pushed a commit
to myascendai/meshiclaw
that referenced
this pull request
Feb 23, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
gabrielkoo
pushed a commit
to gabrielkoo/openclaw
that referenced
this pull request
Feb 23, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
mreedr
pushed a commit
to mreedr/openclaw-custom
that referenced
this pull request
Feb 24, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
xianfeng92
pushed a commit
to xianfeng92/openclaw
that referenced
this pull request
Feb 24, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 259d863)
speculatingwook
pushed a commit
to Pronto-Lab/prontoclaw
that referenced
this pull request
Feb 24, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 259d863)
mylukin
pushed a commit
to mylukin/openclaw
that referenced
this pull request
Feb 26, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
desertstackdev
pushed a commit
to desertstackdev/openclaw
that referenced
this pull request
Feb 28, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
…Takhoffman Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe the problem and fix in 2–5 bullets:
cron.runsaccepted arbitrary non-emptyid/jobIdvalues and used them in run-log path resolution.../,/,\\) could escape the intendedruns/directory scope.cron.runsschema validation, added defensive runtime job-id/path checks, and added regression tests.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
cron.runsnow rejectsid/jobIdvalues containing path separators.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) YesYes, explain risk + mitigation:cron.runsaccess is constrained to canonical per-job run-log files under<cron-dir>/runs.Repro + Verification
Environment
Steps
cron.runsparams with traversal-like IDs.Expected
id/jobIdinputs are rejected.<cron-dir>/runs.Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
validateCronRunsParamsrejects path separators;resolveCronRunLogPaththrows on unsafe IDs./and\\separators, and..traversal segments.Compatibility / Migration
Yes/No) Yes (for valid IDs)Yes/No) NoYes/No) NoFailure Recovery (if this breaks)
347da47b3.src/gateway/protocol/schema/cron.ts,src/cron/run-log.ts,src/gateway/server-methods/cron.ts.cron.runsrejecting unexpected legacy IDs containing path separators.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.cron.runsidentifiers could reject unusual legacy IDs.Greptile Summary
Hardened
cron.runsAPI to prevent path traversal attacks by validating jobId parameters at both schema and runtime levels.CronRunLogJobIdSchemawith regex pattern^[^/\\]+$to reject path separators incron.runsAPI paramsassertSafeCronRunLogJobId()runtime check blocking/,\\, and null bytes<cron-dir>/runs/resolveCronRunLogPath()in try-catch in gateway handler to return proper error responsesThe fix correctly targets only the
cron.runsAPI (read-only path) while leaving other cron operations unchanged, since internal job IDs are safely generated viacrypto.randomUUID()and never contain path separators.Confidence Score: 5/5
cron.runsendpoint while internal operations remain unchanged.Last reviewed commit: 347da47