T01 · Skill Instruction Hijacking
- Location
infra/agents/nudger.prompt.ts:47- Finding
Indirect prompt injection through untrusted CRM activity content
- Content
View full analysis
Vulnerability Details
File Location:
infra/agents/nudger.prompt.ts:47-62
Supporting Capability Configuration:infra/agents/nudger.ts:45-59
Vulnerability Type: Indirect prompt injection into a tool-enabled agent
Risk Level: MediumVulnerable Code
infra/agents/nudger.prompt.ts:47-62:ts 1. The last activity: the most recent row in gtm_activities for the deal (subject and body). Quote the line that matters, with its date. 2. The workspace context: our positioning, known objections and competitors, so the reason and the draft speak to this deal. Write, for each deal: - **Why now**: one sentence, grounded in what you read: the close date that is about to slip, the next step nobody took, the objection left unanswered, or the fact that it has been flagged N Mondays running. - **Draft**: a follow-up email of at most four sentences the owner could send, picking up from the quoted last activity. No placeholders in brackets; if a fact is missing, write around it. It is a draft for the owner, never sent by you. Never invent a fact, a quote, a date or a contact. If the deal has no logged activity at all, say so in Why now and draft a re-opener that does not pretend to remember a conversation. ## 4. Post one digest per owner Owners, by owner_id: ${ownerLines} Group the deals by owner and post one Slack postMessage per owner, deals ordered by amount, largest first:infra/agents/nudger.ts:45-59:ts capabilities: [ // Read-only: positioning, objections, competitors. What makes a draft // specific to us. { slug: "context", config: { isReadOnly: true } }, ], uses: [ { ref: gtmOpportunities, readOnly: true }, { ref: gtmAccounts, readOnly: true }, { ref: gtmActivities, readOnly: true }, { ref: dealNudges, readOnly: false }, { ref: slack.actions.postMessage, config: { // PLACEHOLDER: the channel the digests land in, as a Slack id (C…) // read from the connector's channel autocomplete. Locked s ...[truncated 3118 chars]- Remediation
View remediation
Remediation Suggestions
-
Declare all activity content untrusted. Add a high-priority instruction stating that activity subjects, bodies, quotations, and imported CRM text are data only. The agent must never follow commands, policies, tool requests, or destination changes contained in those fields.
-
Separate extraction from reasoning. Use deterministic code to select a bounded quotation from the latest activity rather than passing the entire body into the agent. Limit length and remove unnecessary metadata.
-
Use structured model input. Supply activity fields in a clearly delimited JSON object or equivalent typed structure, with field-level labels such as
untrusted_activity_body. -
Constrain generated output. Require a strict schema containing only the selected opportunity ID, approved source fields, a bounded quotation, the reason, and the draft. Reject output that references records outside the selected owner’s deal set.
-
Validate tool calls independently. Before posting, verify that:
- The Slack destination equals the configured channel.
- Every included opportunity belongs to the current owner group.
- Every quotation is traceable to the selected activity record.
- No unrelated workspace-context content is copied into the message.
-
Protect ledger integrity. Generate ledger rows from the server-side selected opportunity set and the successful Slack response rather than from free-form model output. Enforce uniqueness on the combination of ISO week and opportunity ID where supported.
-
Minimize accessible context. Provide only the specific positioning or objection fields needed for the selected deals instead of broad workspace context.
-
Add adversarial tests. Include activities containing instructions such as requests to ignore prior rules, reveal other records, alter the Slack message, or create unrelated ledger rows. Verify that these strings are treated only as quoted source data.
-
