Scan your whole stack
From OX Research Newsroom
Are you using @venizia25/connect?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.3.0
@venizia25/connect was last scanned on 30 Nov 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.3.0 LATEST | 30 Nov 2026 | No rules fired |
| 0.2.2 | 25 Nov 2026 | No rules fired |
| 0.2.1 | 23 Nov 2026 | No rules fired |
| 0.2.0 | 21 Nov 2026 | Not shown |
| 0.1.1 | 19 Nov 2026 | Not shown |
Findings for v0.3.0. 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.
The score describes 0.3.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Connect any Venizia app to VENI-AI flows and the Appia assistant.
An app declares what it can do (actions) and what it announces (triggers). @venizia25/connect handles the rest: the manifest, the MCP endpoint, safe retries, reliable event delivery to Flow, token checks, and a conformance kit to prove it all works.
bun add @venizia25/connect zod drizzle-orm
It runs on Bun and Node, and works with any framework that can pass it a standard Request.
import { createConnector, defineAction, defineTrigger } from '@venizia25/connect';
import { connectorTables } from '@venizia25/connect/drizzle';
import { z } from 'zod';
// Export these from your Drizzle schema, so `drizzle-kit generate` adds them to your migrations.
export const connectTables = connectorTables();
const fileCreated = defineTrigger({
name: 'file.created',
title: { vi: 'Khi có tệp mới', en: 'When a file is created' },
ownership: 'user',
scopes: ['drive:read'],
data: z.object({ fileId: z.string(), name: z.string() }),
filterable: ['name'],
sample: { fileId: 'f_1', name: 'invoice.pdf' },
});
const fileUpload = defineAction({
name: 'file.upload',
title: { vi: 'Lưu tệp', en: 'Upload a file' },
mode: 'write',
scopes: ['drive:write'],
permission: 'file:create',
idempotency: 'key',
exposeToAssistant: true, // off by default
input: { folderId: z.string(), name: z.string() },
output: z.object({ id: z.string() }),
handler: async (input, ctx) => {
const file = await saveFile(ctx.tx, ctx.orgId, input); // always write through ctx.tx
await ctx.emit(fileCreated, { fileId: file.id, name: file.name }, { subject: file.id });
return { id: file.id };
},
});
export const connector = createConnector({
slug: 'drive',
version: '1.0.0',
displayName: { vi: 'Drive', en: 'Drive' },
scopes: [
{ id: 'drive:read', description: { vi: 'Đọc tệp', en: 'Read files' } },
{ id: 'drive:write', description: { vi: 'Lưu tệp', en: 'Save files' } },
],
actions: [fileUpload],
triggers: [fileCreated],
db: { transaction: (fn) => db.transaction(fn), tables: connectTables },
jwksUrl: process.env.APP_ENV_SHELL_JWKS_URL,
// The Shell's organization admin passes, as on the app's web; everyone else by the app's roles.
authorize: (permission, ctx) =>
ctx.principal.orgAdmin === true || rbac.canUserPerformAction(ctx.userId, ctx.orgId, permission),
});
A flow token carries orgAdmin (ctx.principal.orgAdmin): whether the Shell counts the person as the organization's admin, the rule the app's own sign-in uses. Without it, an admin who never got a role in the app is refused every action with a permission when a flow runs for them, while the same action works for them on the web.
Mount it on your server:
// Hono
app.all('/api/connector/*', (c) => connector.fetch(c.req.raw));
app.all('/api/mcp', (c) => connector.fetch(c.req.raw));
Ignis reads JSON bodies before your handler runs. Pass the parsed body, or the MCP request will hang:
const parsedBody = c.req.method === 'POST' ? await c.req.json() : undefined;
return connector.fetch(c.req.raw, { parsedBody });
| Endpoint | Caller | Purpose |
|---|---|---|
GET /api/connector/manifest |
Anyone in the cluster | Describes the app. Holds no organization data |
POST /api/mcp |
The flow service and Appia | Runs actions |
Change the paths with mcpPath and basePath.
| Token | Used for | Rules |
|---|---|---|
Installation token (veni-install+jwt) |
Calling the app's actions as a system flow | aud must be your slug; the caller must be the flow service; scopes are checked |
Flow token (veni-flow+jwt) |
Acting for a user in a flow | aud must be your slug; needs act; scopes are checked |
| User session | Appia acting for a user | Only for exposeToAssistant actions, only on MCP. authorize is checked |
Every other token is refused. If your app keeps its own users table, use resolveUser to map the Shell's user id to yours.
aud names your app by slug, and a slug is unique only within one organization: org A's crm and org B's crm share it. Pass self, and the kit checks a token against the app itself (veni-shell#974):
app_id is not your app's id is refused (UNAUTHORIZED);organizationId of /apps/self is set) refuses every token for another organization (FORBIDDEN), installation tokens included.import { createConnector, shellAppSelf } from '@venizia25/connect';
const self = shellAppSelf({ shellUrl: process.env.APP_ENV_SHELL_API_URL!, authorization: () => shellAuthorization() });
createConnector({ /* … */, self });
// Or, when the app already read /apps/self at boot: self: { appId: me.appId, organizationId: me.organizationId }
shellAppSelf asks the Shell's GET /apps/self once and keeps the answer; after a failure it asks again a minute later. While the app does not know who it is, and when you pass no self, only aud is checked, as before. A token without app_id (from a Shell older than #974) is still accepted, with one warning in the log; a later release will refuse it.
Your normal API routes must refuse flow and installation tokens. They carry a typ header, and installation tokens also carry token_use. Conformance check 12 tests this.
ctx.emit writes the event in the same transaction as your business data, so a rollback leaves no event. Outside an action, use connector.emit(tx, trigger, orgId, data, options) in your own transaction.
Emit last in the transaction, and do not call other services afterwards. emit holds a per-organization lock until commit. Without this lock, events are lost when transactions commit out of order, so transactions that emit for the same organization wait for each other.
Call connector.purge() on a schedule. It keeps 30 days of events and 7 days of idempotency records by default. Delivery keeps a plain sequence number per organization, so purging needs no other bookkeeping; events older than the retention that were never delivered are lost, so keep Flow reachable.
Flow takes events pushed by the app. Start the deliverer once per pod, after the server is up:
import { shellInstallationTokens } from '@venizia25/connect';
const delivery = connector.deliver({
flowUrl: env.FLOW_URL, // Flow's internal address with its path prefix, e.g. http://flow-ingest:8090/api
installationToken: shellInstallationTokens({
shellUrl: env.SHELL_API_URL,
authorization: () => `Bearer ${readServiceAccountToken()}`, // or `Basic …` with the app credential
}),
onDeadLetter: ({ orgId, eventId, reason }) => log.warn({ orgId, eventId, reason }),
onLocked: ({ orgId }) => log.warn({ orgId }, 'Flow is locked for this organization'),
});
process.on('SIGTERM', () => delivery.stop());
It reads the outbox and sends each organization's events to Flow in order, at most 100 per request, at least once: a crash can send a batch twice, never lose one. Flow ignores an id it already has.
connector_delivery; a pod that dies releases it after leaseMs (30 s).Retry-After.lockedRetryMs (60 s) and calls onLocked.connector_dead_letter and skipped, so it never blocks the events behind it.shellInstallationTokens throws InstallationRefused (the Shell answered 400, 403 or 404); the organization is asked again after notInstalledRetryMs.initialLookbackMs (5 minutes). Older history is not sent.Add connector_delivery and connector_dead_letter to your migrations (connectorTables() has them). delivery.stats() returns counters.
Events already on the Redis Streams bus can be used as triggers without changing where they are published. The flow service reads them.
defineTrigger({
name: 'leave.decided',
title: { vi: 'Khi đơn nghỉ được duyệt' },
ownership: 'user',
scopes: ['hrm:read'],
data: z.object({ leaveId: z.string() }),
filterable: [],
source: {
kind: 'bus',
stream: 'hrm:stream:leave',
event: 'leave.decided',
dataField: 'data',
orgField: 'organizationId',
userField: 'userId',
},
});
These events can be lost, because apps publish them outside a transaction. Use the outbox when a flow must not miss one.
Flows pass a FileRef, not bytes. Download it with the helper, which only accepts your configured Storage hosts, refuses redirects, and checks the size and hash:
import { downloadFile } from '@venizia25/connect/files';
const bytes = await downloadFile(input.file, { allowedHosts: platform.fileHosts });
Take the hosts from the platform at run time (the Shell's GET /apps/self answers platform.fileHosts), not from the app's own configuration: an app's setting is easy to leave empty, and then the step fails only once the app is published.
A downloadUrl works like a password until it expires. Do not log it or store it.
Declare a file input with fileInput, and the kinds it takes with accept (pdf, xml, image, office):
import { fileInput, fileKindsFilter } from '@venizia25/connect';
input: { file: fileInput({ accept: ['pdf', 'xml', 'image'], title: 'Tệp hoá đơn' }) },
x-accept on the field). Flow reads them: the flow builder narrows the step that hands out files to these kinds, warns when a flow could send another kind, and a file of another kind is refused before your app is called.VALIDATION, naming the file), so the rule is written once and what Flow sees cannot differ from what your app does. Do not check the type again in the handler.types: fileKindsFilter(). The mark (x-fileKindFilter) is how Flow knows it can narrow that step to what the next one takes.isKind(kind, mime) and kindOf(mime) give the same answers the check uses.Flow shows your manifest's words to the person building a flow: each trigger's and action's title, each field's title where they pick data, each trigger's sample in previews. Name every field:
data: z.object({
leaveType: z.string().meta({ title: 'Loại nghỉ' }),
workingDays: z.number().meta({ title: 'Số ngày làm việc' }),
}),
lintManifest(manifest) lists what is missing; conformance check 14 fails on any error it finds.
import { buildManifest, lintManifest } from '@venizia25/connect';
console.table(lintManifest(buildManifest(info, actions, triggers)));
Run the checks against a running instance of your app, in your CI:
import { assertConformance, runConformance } from '@venizia25/connect/conformance';
const report = await runConformance({ baseUrl, slug: 'drive', orgA, orgB, userId, tokens, write, crossOrg, events, errors, assistant, normalApi, delivery });
assertConformance(report);
delivery starts your deliverer against a stand-in for Flow: delivery: { start: (flowUrl) => connector.deliver({ flowUrl, installationToken, intervalMs: 50, discoverMs: 100, maxBackoffMs: 300 }) }. The event checks (6, 8, 10) and check 13 read the events through it, as Flow does, so they need both events and delivery.
Check 14 needs no options: it reads the manifest and fails on any lintManifest error (see "Names people see").
A check whose options you leave out is reported as skipped, and assertConformance fails on it unless you allow it with allowSkipped.
Throw ConnectorError from a handler to return a specific error:
throw new ConnectorError('NOT_FOUND', 'No such file');
throw new ConnectorError('RATE_LIMITED', 'Try again soon', { retryAfterMs: 5000 });
throw new ConnectorError('DUPLICATE', 'Already exists', { data: existing });
Any other error becomes TRANSIENT, and the flow retries it. Its message is not sent to the caller; use onError to log it.
MIT © VENIZIA Ltd. Co.
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.