SenseOn SOC Playbook: AI Coding Assistants
This page gives the process that SenseOn recommends to investigate Observations about AI coding assistants, for example Claude Code. It also gives the remediation actions for each Observation.
Observations
| Observation | Data source | Severity |
|---|---|---|
| Sensitive content detected in an AI chat | The Anthropic (Claude) Enterprise or Microsoft 365 Copilot integration, with content scanning on | Medium |
| Coding LLM CLI Run With Permission Prompts Disabled | Process telemetry from the Universal Sensor | Low |
At this time, no SenseOn detection reads the OpenTelemetry data from Claude Code telemetry. Use that telemetry in Hunt Lab to examine the activity of a user before and after an Observation.
Sensitive Content in an AI Chat
What It Means
A message in a Claude chat, a Claude Code session or a Microsoft 365 Copilot chat contained a credential. We examine the text of each message against our default rules. We examine the text in memory and do not keep it. The Observation records these items:
- The chat or session, and the message
- The user and the product
- The time of the message
- The rule that found the credential
The rules find these credentials:
- AWS access key IDs
- Google API keys and Google OAuth client secrets
- GitHub tokens, which include fine-grained tokens
- Anthropic API keys and OpenAI project keys
- Stripe live secret keys, Slack tokens and SendGrid API keys
- PEM private keys
- Database connection strings that contain a password
In a Claude Code session, the rules do not examine the commands that Claude runs, the files that it reads or writes, or images.
What It Needs
One of these integrations in the SenseOn Platform:
- The Anthropic (Claude) Enterprise integration. This needs a Claude Enterprise plan, with the Compliance API on.
- A Microsoft 365 Copilot integration.
Content scanning must be on in the settings of the integration.
Investigation
Action for provider of SenseOn MDR
- Find the type of credential from the rule name in the Observation.
- Find the account or service that the credential is for, and its owner.
- Read the flagged message. Find the context of the credential in the chat.
- Speak to the user. Find why the credential was in the message.
Read the Flagged Message
You can read the flagged message in the case. The card masks the credential, so you do not see it.
- Open the case and select the policy node of the Observation in the graph.
- In the action menu of the node, under AI content, click View conversation.
- Read the Flagged conversation card in the side panel. The card shows the flagged message with the messages before and after it. The flagged message has a Flagged badge.
Each message shows the speaker and the time. A message that has a masked credential also shows how many matches we masked.
- We fetch the text from the AI provider each time that you open it. SenseOn does not store the text.
- Every credential that the rules find shows as █. This applies to all messages in the window, not only the flagged one.
- A message that is too long to scan is not shown in full. The card shows a notice in its place.
- The card starts with two messages on each side. Click Show earlier messages or Show later messages to see more. The provider can limit how many it returns.
- We record each retrieval. There is a limit on the number of retrievals in each minute. When 3 or fewer retrievals remain, the card shows how many are left.
- The card keeps the text only while the case is open. Click the close button on the card to discard it. The tooltip is Discard the retrieved conversation.
If the card shows an error, use this table.
| Message on the card | What to do |
|---|---|
| You do not have access to conversations | Ask an administrator for access. |
| Conversation access is not enabled | An administrator must enable conversation retrieval on the connector. |
| No provider licence for this user | The provider holds no licence for the user, so you cannot read the chat. Use the other Observation details. |
| This conversation is no longer available | Someone deleted the chat at the provider. Use the other Observation details. |
| The flagged message is no longer available | Someone deleted the message. Use the other Observation details. |
| The flagged message is too far into this conversation | The connector cannot read that far back. Use the other Observation details. |
| Conversation retrieval limit reached | Wait for the countdown on the card, then click Try again. |
| The AI provider could not be reached | The provider returned an error. Click Try again. If the error stays, try later. |
| The data connector service is unavailable | Click Try again. If the error stays, try later. |
Remediation
Action for the customer
- Rotate or revoke the credential. The AI provider received the credential, so you must replace it.
- Examine the logs of the service for use of the credential after the time of the message.
- Tell the user how to keep credentials out of AI chats. If one user has many Observations, help that user to use a secrets store.
Permission Prompts Disabled
What It Means
A user started an AI coding tool with a flag that removes its permission prompts. The tool then runs commands and changes files, and it does not ask the user first. The Observation finds these flags:
| Tool | Flag |
|---|---|
| Claude Code | --dangerously-skip-permissions |
| Amazon Q | --trust-all-tools |
| Gemini CLI | --yolo |
These flags are for automation in a sandbox. On the device of a developer, the flag removes the human check. This Observation shows a risk. It does not show that an attacker is on the device.
Investigation
Action for provider of SenseOn MDR
- Find the user and the device. Find if the user is a developer who uses the tool for their work.
- Examine the process tree and the commands in the same session.
- Look for activity that is not usual development work. Examples are access to credentials, network tools, or changes outside the project folder.
- If you ingest Claude Code telemetry, examine the tool decisions and the permission mode changes of the user. To do this, use the Hunt Lab queries.
Remediation
Action for the customer
- Tell the user to stop the use of the flag.
- To block the flag for all users of Claude Code, set
permissions.disableBypassPermissionsModeto"disable"in the managed settings. Refer to the Claude Code settings guide.