b24jssdk-recipes
Pass
Audited by Gen Agent Trust Hub on Oct 11, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The AI-related recipes (
08-ai-assistant.tsand09-web-search-llm.ts) ingest data from external sources (CRM records and web search results) and interpolate them into prompts for an LLM. - Ingestion points: CRM deal data and activity history are loaded in
08-ai-assistant.ts; external web search content is ingested in09-web-search-llm.ts. - Boundary markers: The skill uses labeled blocks (e.g., 'Deal:', 'Activities:', 'Sources:') to separate untrusted data from the system instructions.
- Capability inventory: The LLM output is used to perform API calls via the Bitrix24 SDK, specifically
tasks.task.addto create tasks andcrm.timeline.comment.addto post comments. - Sanitization: The recipes include defensive
JSON.parseblocks for AI responses and specific HTML escaping (escapefunction in06-telegram-bot.ts) to prevent XSS when sending CRM data to external messaging platforms. - [CREDENTIALS_SAFE]: The skill consistently follows best practices for secret management. It instructs users to load sensitive values like
B24_HOOK,OPENAI_API_KEY, andB24_CLIENT_SECRETfrom environment variables rather than hardcoding them. - [COMMAND_EXECUTION]: The OAuth handshake recipe (
12-oauth-install.ts) implements robust validation of portal URLs viacheckPortalUrlsinlib/portal-url.ts. This logic prevents SSRF and credential redirection by ensuring that endpoints match the expected Bitrix24 domains before the application performs REST calls or token refreshes. - [SAFE]: The skill includes a dedicated crypto helper (
lib/crypto.ts) that implementssafeEqualusingnode:crypto.timingSafeEqual. This is used to verify webhook tokens and application secrets, effectively mitigating timing-based side-channel attacks.
Audit Metadata