Repository navigation
docs(pool): document trusted task function sources - #266
Merged
Merged
Conversation
State that only trusted functions may be passed to addTaskFunction(): the pool captures the functions toString() output and evaluates it as JavaScript in the workers, so that source must never be built from untrusted input. Untrusted input may select a task only through an allowlist of registered names, with the payload carried as task data through execute(). Port of poolifier/poolifier#3452 at 82df056a2 (open upstream). Inserted verbatim after the local capture-time paragraph of the addTaskFunction section; the local api.md paraphrases upstream prose, the inserted paragraph keeps the upstream wording and sits at the upstream position.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
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.



What / Why
Port of poolifier/poolifier#3452 at
82df056a2(merged upstream during this port, head unchanged). One paragraph indocs/api.md: only trusted functions may be passed to `addTaskFunction()` because the pool evaluates the function's `toString()` output as JavaScript in the workers; untrusted input may select a task only through an allowlist of registered names, payload via `execute()`.The paragraph is inserted verbatim (verified: normalized upstream hunk lines vs local lines 184-188 are byte-identical modulo wrapping) at the upstream position, right after the capture-time paragraph. The local `api.md` paraphrases upstream prose elsewhere; the new paragraph keeps upstream wording.
Verification
PR Checklist