Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@workglow/tasks

Latest version: v0.6.17

Overview

Last scanned
13 Nov 2026
Published
13 Nov 2026
npm package Publisher: sroussey
16 Stars
4 Forks
37 Versions
1.3K Downloads
TypeScript Repo language

Scan summary

@workglow/tasks was last scanned on 13 Nov 2026 at version 0.6.17. Risk score 45 of 100 (medium). High-severity rules fired.

  • Releases: 37 versions; the latest 2 were published within 7 days (7–13 Nov 2026).
  • Findings: 1 rule fired in version 0.6.17 (2 instances: 2 high). The score describes this version only.
  • Downloads: 1,338 downloads.

Versions

37 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

Rules fired in 0.6.17: 1

Findings

2 High

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.

Encoded data placed in a DNS lookup

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.

HIGH
Checking access…

🔒 Create a free account to see all 2 findings with descriptions and instance counts

The score describes 0.6.17; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@workglow/tasks

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.

Table of Contents

  • Table of Contents
  • Installation
  • Quick Start
  • Available Tasks
    • FetchUrlTask
    • DebugLogTask
    • DelayTask
    • JavaScriptTask
    • LambdaTask
    • JsonTask
    • ArrayTask
  • Filesystem Tasks (server builds)
  • Workflow Integration
  • Error Handling
  • Configuration
  • Testing
  • License

Installation

bun add @workglow/tasks

Quick Start

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" });

Available Tasks

FetchUrlTask

Makes HTTP requests with built-in retry logic, progress tracking, and multiple response types.

Input Schema:

  • url (string, required): The URL to fetch from
  • method (string, optional): HTTP method ("GET", "POST", "PUT", "DELETE", "PATCH"). Default: "GET"
  • headers (object, optional): Headers to send with the request
  • body (string, optional): Request body for POST/PUT requests
  • response_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 milliseconds
  • queue (boolean|string, optional): Queue handling (false runs inline when possible, true uses the task's default queue, strings target a specific registered queue). Default: true

Output Schema:

  • json (any, optional): JSON response data
  • text (string, optional): Text response data
  • blob (Blob, optional): Blob response data
  • arraybuffer (ArrayBuffer, optional): ArrayBuffer response data

Examples:

// 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:

  • Automatic retry on 429/503 status codes with Retry-After header support (requires creation of a @workglow/job-queue instance)
  • Progress tracking for large downloads
  • Request timeout handling
  • Queue-based rate limiting (requires creation of a @workglow/job-queue instance)
  • Comprehensive error handling
DebugLogTask

Provides console logging functionality with multiple log levels for debugging task graphs.

Input Schema:

  • Any inputs are accepted and passed through to outputs unchanged.

Config Schema:

  • log_level (string, optional): Log level ("dir", "log", "debug", "info", "warn", "error"). Default: "log"

Output Schema:

  • All inputs passed through unchanged.

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:

  • Multiple log levels for different debugging needs
  • Deep object inspection with dir level
  • Pass-through functionality preserves data flow
  • Non-cacheable for real-time debugging
DelayTask

Introduces timed delays in workflows with progress tracking and cancellation support.

Input Schema:

  • Any inputs are accepted and passed through to outputs unchanged.

Config Schema:

  • delay (number, optional): Delay duration in milliseconds. Default: 1

Output Schema:

  • All inputs passed through unchanged.

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:

  • Progress tracking for delays over 100ms
  • Cancellation support via AbortSignal
  • Chunked delay execution for responsiveness
  • All inputs passed through to outputs
JavaScriptTask

Executes JavaScript code strings using a safe interpreter with input/output handling.

Input Schema:

  • code (string, required): JavaScript code to execute
  • input (any, optional): Input data available to the code

Output Schema:

  • output (any): The result of the JavaScript execution

Examples:

// 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:

  • Safe JavaScript execution using interpreter
  • Access to input data within code
  • Error handling and logging
  • Suitable for data transformation and filtering
LambdaTask

Executes custom JavaScript functions with full access to task context and configuration.

Input Schema:

  • Accepts any input data (flexible schema)

Output Schema:

  • Returns whatever the provided function outputs

Configuration:

  • execute: Function for standard execution
  • executePreview: Function for lightweight preview execution

Examples:

// 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:

  • Full access to execution context and progress tracking
  • Support for both committed run and live preview execution patterns
  • Async/await support
  • Flexible input/output schemas
  • Cacheable by default
JsonTask

Creates and executes task graphs from JSON configurations, enabling dynamic workflow creation.

Input Schema:

  • json (string, required): JSON string defining tasks and their dependencies

Output Schema:

  • output (any): Output depends on the generated task graph

JSON 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:

  • Dynamic task graph creation from JSON
  • Support for complex dependency relationships
  • All registered task types are available
  • Automatic data flow between tasks
  • Enables configuration-driven workflows
ArrayTask

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:

  • Automatically handles single values or arrays
  • Parallel execution for array inputs
  • Generates all combinations when multiple inputs are arrays, refusing more than maxIterations
  • Uses x-replicate annotation to mark array-capable inputs

Examples:

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:

  • Parallel processing of array elements
  • Automatic task instance creation per array element
  • Combination generation for multiple array inputs
  • Seamless single-value and array handling

Filesystem Tasks (server builds)

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 });

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @workglow/tasks

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229