Skip to content

Allow integrations to parse XML responses with fast-xml-parser #6299

Description

@aisstephane

Integration scripts run in a sandboxed runner that only allows a fixed set of npm packages (currently url, crypto, nango, zod, unzipper, soap, botbuilder). Today there's no allowlisted way to parse an XML response inside a sync or action, so any provider whose API returns XML can't be handled cleanly from a template.

fast-xml-parser is already a dependency in the repo (pinned to 5.5.9 in server, shared, cli, and runner), so this doesn't pull in anything new. It just needs to be added to the integration runtime allowlist so scripts can do import { XMLParser } from 'fast-xml-parser'.

Use case

Netvisor's API returns XML rather than JSON. Parsing those responses from a sync/action is currently blocked by the allowlist.

Proposed change

Add fast-xml-parser to the allowlist in the four places a runtime package has to be registered, mirroring how soap and unzipper are already wired up:

  • packages/cli/lib/zeroYaml/constants.ts (allowedPackages)
  • packages/cli/lib/services/compile.service.ts (ALLOWED_IMPORTS)
  • packages/cli/lib/services/dryrun.service.ts (require shim)
  • packages/runner/lib/exec.ts (require shim)

This is being implemented alongside the Netvisor integration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions