Scan your whole stack
From OX Research Newsroom
Are you using @workglow/tasks?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.6.17
@workglow/tasks was last scanned on 13 Nov 2026 at version 0.6.17. Risk score 45 of 100 (medium). High-severity rules fired.
| Version | Published | Status |
|---|---|---|
| 0.6.17 LATEST | 13 Nov 2026 | 1 rule fired |
| 0.6.16 | 7 Nov 2026 | No rules fired |
| 0.6.15 | 2 Nov 2026 | No rules fired |
| 0.6.14 | 27 Oct 2026 | Not shown |
| 0.6.13 | 14 Oct 2026 | Not shown |
Findings for v0.6.17. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
A DNS lookup command (nslookup, dig or host) takes its query name from a subshell that first encodes the data, for example with base64 or xxd. Encoding the name turns a lookup into a way to send data to the nameserver of the queried domain. Ordinary diagnostic lookups have no encoding step.
HIGHThe score describes 0.6.17; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A package of task types for common operations, workflow management, and data processing. This package provides building blocks for creating complex task graphs with support for HTTP requests, JavaScript execution, delays, logging, and dynamic task creation.
bun add @workglow/tasks
import { Workflow, fetch, debugLog, delay } from "@workglow/tasks";
// Simple workflow example (fluent API)
const workflow = new Workflow()
.fetch({ url: "https://api.example.com/data", response_type: "json" })
.debugLog(undefined, { log_level: "info" })
.delay(undefined, { delay: 1000 });
const results = await workflow.run();
import { FetchUrlTask, DebugLogTask, DelayTask } from "@workglow/tasks";
// Simple sequence using Task classes directly
const fetchResult = await new FetchUrlTask({
url: "https://api.example.com/data",
response_type: "json",
}).run();
await new DebugLogTask({ console: fetchResult.json }, { log_level: "info" }).run();
await new DelayTask({}, { delay: 1000 }).run();
import { fetch, debugLog, delay } from "@workglow/tasks";
const data = await fetch({
url: "https://example.com/readme.txt",
response_type: "text",
});
await debugLog({ console: data.text }, { log_level: "info" });
Makes HTTP requests with built-in retry logic, progress tracking, and multiple response types.
Input Schema:
url (string, required): The URL to fetch frommethod (string, optional): HTTP method ("GET", "POST", "PUT", "DELETE", "PATCH"). Default: "GET"headers (object, optional): Headers to send with the requestbody (string, optional): Request body for POST/PUT requestsresponse_type (string, required): What to materialize from the response — "stream", "json", "text", "blob", or "arraybuffer". "stream" materializes nothing: the bytes still reach the body port and the output cache, and metadata.contentType says what they are. The other values additionally populate the matching derived port. The schema declares no default and there is no Content-Type inference — whether a caller wants the body buffered into memory is theirs to state. (A directly constructed task that states nothing falls back to "stream", because Task synthesizes an enum's first member as its default; a queued job payload carrying no response_type is rejected outright.)timeout (number, optional): Request timeout in millisecondsqueue (boolean|string, optional): Queue handling (false runs inline when possible, true uses the task's default queue, strings target a specific registered queue). Default: trueOutput Schema:
json (any, optional): JSON response datatext (string, optional): Text response datablob (Blob, optional): Blob response dataarraybuffer (ArrayBuffer, optional): ArrayBuffer response dataExamples:
// Simple GET request
const response = await new FetchUrlTask({
url: "https://api.example.com/users",
response_type: "json",
}).run();
console.log(response.json);
// POST request with headers
const postResponse = await new FetchUrlTask({
url: "https://api.example.com/users",
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer token",
},
body: JSON.stringify({ name: "John", email: "john@example.com" }),
response_type: "json",
}).run();
// Text response
const textResponse = await new FetchUrlTask({
url: "https://example.com/readme.txt",
response_type: "text",
}).run();
console.log(textResponse.text);
Features:
@workglow/job-queue instance)@workglow/job-queue instance)Provides console logging functionality with multiple log levels for debugging task graphs.
Input Schema:
Config Schema:
log_level (string, optional): Log level ("dir", "log", "debug", "info", "warn", "error"). Default: "log"Output Schema:
Examples:
// Basic logging
await new DebugLogTask({ console: "Processing user data" }, { log_level: "info" }).run();
// Object inspection with dir
await new DebugLogTask(
{ console: { user: { id: 1, name: "John" }, status: "active" } },
{ log_level: "dir" }
).run();
// In workflow with data flow
const workflow = new Workflow()
.fetch({ url: "https://api.example.com/data", response_type: "json" })
.debugLog(undefined, { log_level: "dir" }) // Logs the fetched data
.delay(undefined, { delay: 1000 });
Features:
dir levelIntroduces timed delays in workflows with progress tracking and cancellation support.
Input Schema:
Config Schema:
delay (number, optional): Delay duration in milliseconds. Default: 1Output Schema:
Examples:
// Simple delay
await new DelayTask({}, { delay: 5000 }).run(); // 5 second delay
// Delay with data pass-through
const result = await new DelayTask(
{ message: "Data preserved through delay" },
{ delay: 3000 }
).run();
console.log(result); // { message: "Data preserved through delay" }
// In workflow
const workflow = new Workflow()
.fetch({ url: "https://api.example.com/data", response_type: "json" })
.delay(undefined, { delay: 2000 }) // 2 second delay
.debugLog(undefined, { log_level: "info" });
Features:
Executes JavaScript code strings using a safe interpreter with input/output handling.
Input Schema:
code (string, required): JavaScript code to executeinput (any, optional): Input data available to the codeOutput Schema:
output (any): The result of the JavaScript executionExamples:
// Simple calculation
const result = await JavaScript({
code: "2 + 3 * 4",
});
console.log(result.output); // 14
// Using input data
const processed = await new JavaScriptTask({
code: `
const numbers = input.values;
const sum = numbers.reduce((a, b) => a + b, 0);
const average = sum / numbers.length;
return { sum, average, count: numbers.length };
`,
input: { values: [1, 2, 3, 4, 5] },
}).run();
console.log(processed.output); // { sum: 15, average: 3, count: 5 }
// In workflow
const workflow = new Workflow()
.fetch({ url: "https://api.example.com/data", response_type: "json" })
.javaScript({
code: `
const data = input.json;
return data.filter(item => item.active === true);
`,
})
.debugLog({ log_level: "info" });
Features:
Executes custom JavaScript functions with full access to task context and configuration.
Input Schema:
Output Schema:
Configuration:
execute: Function for standard executionexecutePreview: Function for lightweight preview executionExamples:
// Function with execute pattern
const result = await Lambda(
{ numbers: [1, 2, 3, 4, 5] },
{
execute: async (input, context) => {
const sum = input.numbers.reduce((a, b) => a + b, 0);
await context.updateProgress(50, "Calculating sum");
const average = sum / input.numbers.length;
await context.updateProgress(100, "Complete");
return { sum, average };
},
}
);
// Preview pattern (lightweight, fast — used by runPreview)
const previewResult = await new LambdaTask(
{ message: "Hello" },
{
executePreview: async (input, _context) => {
return {
processed: input.message.toUpperCase(),
timestamp: new Date().toISOString(),
};
},
}
).runPreview();
// Data transformation function
const transformer = await new LambdaTask(
{
data: [
{ name: "John", age: 30 },
{ name: "Jane", age: 25 },
],
},
{
execute: async (input) => {
return {
users: input.data.map((user) => ({
...user,
isAdult: user.age >= 18,
category: user.age < 30 ? "young" : "mature",
})),
};
},
}
).run();
// Async operation with external API
const apiProcessor = await new LambdaTask(
{ userId: 123 },
{
execute: async (input, context) => {
await context.updateProgress(25, "Fetching user data");
const userData = await fetch(`/api/users/${input.userId}`).then((r) => r.json());
await context.updateProgress(75, "Processing data");
const enrichedData = {
...userData,
processedAt: new Date().toISOString(),
isActive: userData.lastLogin > Date.now() - 86400000, // 24 hours
};
await context.updateProgress(100, "Complete");
return enrichedData;
},
}
).run();
Features:
Creates and executes task graphs from JSON configurations, enabling dynamic workflow creation.
Input Schema:
json (string, required): JSON string defining tasks and their dependenciesOutput Schema:
output (any): Output depends on the generated task graphJSON Format:
interface JsonTaskItem {
id: string; // Unique task identifier
type: string; // Task type (e.g., "FetchUrlTask", "DelayTask")
input?: any; // Task input data
config?: any; // Task configuration
dependencies?: {
// Input dependencies from other tasks
[inputField: string]:
| {
id: string; // Source task ID
output: string; // Output field from source task
}
| Array<{ id: string; output: string }>;
};
}
Examples:
// Simple linear workflow
const linearWorkflow = await new JsonTask({
json: JSON.stringify([
{
id: "fetch-data",
type: "FetchUrlTask",
input: {
url: "https://api.example.com/users",
response_type: "json",
},
},
{
id: "log-data",
type: "DebugLogTask",
config: { log_level: "info" },
dependencies: {
console: { id: "fetch-data", output: "json" },
},
},
{
id: "delay",
type: "DelayTask",
config: { delay: 1000 },
},
]),
}).run();
// Complex workflow with data dependencies
const complexWorkflow = await new JsonTask({
json: JSON.stringify([
{
id: "fetch-users",
type: "FetchUrlTask",
input: {
url: "https://api.example.com/users",
response_type: "json",
},
},
{
id: "fetch-posts",
type: "FetchUrlTask",
input: {
url: "https://api.example.com/posts",
response_type: "json",
},
},
{
id: "combine-data",
type: "JavaScriptTask",
input: {
code: `
const users = input.users;
const posts = input.posts;
return users.map(user => ({
...user,
posts: posts.filter(post => post.userId === user.id)
}));
`,
},
dependencies: {
input: [
{ id: "fetch-users", output: "json" },
{ id: "fetch-posts", output: "json" },
],
},
},
{
id: "log-result",
type: "DebugLogTask",
config: { log_level: "dir" },
dependencies: {
console: { id: "combine-data", output: "output" },
},
},
]),
}).run();
// Dynamic task creation from external config
const configResponse = await fetch("/api/workflow-config");
const workflowConfig = await configResponse.json();
const dynamicWorkflow = await new JsonTask({
json: JSON.stringify(workflowConfig.tasks),
}).run();
Features:
A compound task that processes arrays by either executing directly for non-array inputs or creating parallel task instances for array inputs. Supports parallel processing of array elements and combination generation when multiple inputs are arrays.
Key Features:
maxIterationsx-replicate annotation to mark array-capable inputsExamples:
import { ArrayTask, TypeReplicateArray } from "@workglow/tasks";
import type { DataPortSchema } from "@workglow/util/schema";
class UpperCaseTask extends ArrayTask<{ text: string | string[] }, { result: string }> {
static readonly type = "UpperCaseTask";
static inputSchema() {
return {
type: "object",
properties: { text: TypeReplicateArray({ type: "string" }) },
required: ["text"],
additionalProperties: false,
} as const satisfies DataPortSchema;
}
static outputSchema() {
return {
type: "object",
properties: { result: { type: "string" } },
required: ["result"],
additionalProperties: false,
} as const satisfies DataPortSchema;
}
// Runs once per value: `text` is always a single string here.
async execute(input: { text: string }) {
return { result: input.text.toUpperCase() };
}
}
// One task per value. maxIterations is required: the most combinations to run,
// or "unbounded" to opt out of the limit.
const task = new UpperCaseTask({
maxIterations: 100,
defaults: { text: ["hello", "world", "foo", "bar"] },
});
const result = await task.run();
// { result: ["HELLO", "WORLD", "FOO", "BAR"] }
Features:
The Node and Electron builds ship three tasks that read the local filesystem —
FileGrepTask, FileLoaderTask and FileSedTask.
Every host says whether it wants them. registerCommonTasks() takes a
required fileSystemTasks flag, because the registry is what a deserialized
graph resolves a task type through, and a serialized node supplies its own
config — so a graph naming FileGrepTask also names its own roots, and no
default this package picks can constrain it. The only control that survives
untrusted graph JSON is the task not being resolvable at all. There is no
default either way: a default would hand every host the filesystem tasks, or
take them from a host whose stored workflows already name them, with nothing at
the call site to say so.
import { registerCommonTasks } from "@workglow/tasks";
// A server that runs graph JSON it did not author:
registerCommonTasks({ fileSystemTasks: false });
// A local CLI or desktop app, where every graph reaching the registry is trusted:
registerCommonTasks({ fileSystemTasks: true }); Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.