Skip to content

Security: Phala-Network/chatwoot-workers

SECURITY.md

Security policy

Reporting a vulnerability

Please report vulnerabilities privately through GitHub's private vulnerability reporting: open the repository's Security tab and choose Report a vulnerability. Do not open a public issue. Include the affected version or commit, steps to reproduce, and the impact you expect. We aim to acknowledge reports within a few working days.

Supported versions

Only the latest release of each package and the latest commit on main receive security fixes.

Scope and design notes

These Workers hold credentials that can act in Chatwoot and Discord, so please pay particular attention to:

  • Request authentication: Chatwoot webhook HMAC signatures (shared/chatwoot/signature.ts) and Discord interaction Ed25519 signatures (packages/chatwoot-discord-relay/src/index.ts).

  • Authorization of commands: the Discord user must be linked in config and have their own Chatwoot token, whose user must still belong to the account; the ticket comes from the stored post mapping (packages/chatwoot-discord-relay/src/commands/handler.ts, packages/chatwoot-discord-relay/src/commands/actions.ts).

  • Outbound requests: attachment downloads are restricted to Discord's CDN (packages/chatwoot-discord-relay/src/commands/attachments.ts).

  • Mentions: relayed messages set allowed_mentions so only linked agents can be pinged (the assignee, and agents mentioned in a private note), and customer text is defused so it cannot mention or pass for relay lines (packages/chatwoot-discord-relay/src/relay/format.ts, packages/chatwoot-discord-relay/src/relay/notify.ts).

  • Routing: packages/chatwoot-router/src/routing.ts redacts common identifiers before calling TypeSafe, but is not an anonymizer. Its independently authenticated Worker writes conversation custom attributes with merging; a Chatwoot administrator can change them, so they are trusted account state, not signatures.

  • Shared persistence and settings: shared/store.ts and shared/settings.ts run separately in each Worker. Do not share their Durable Objects or introduce cross-Worker credentials.

Secrets must only be provided as Worker secrets (or .dev.vars locally), never in cloudflare.config.ts or the repository. Logs must not contain message bodies, tokens, or secrets.

There aren't any published security advisories