OpenAI ChatGPT Enterprise Assistant Advises Credential Rotation After Suspected Exposure


Description

Detects ChatGPT Enterprise assistant messages that recognize likely exposed secrets in chat and advise rotating, revoking, regenerating, invalidating, or deactivating credentials (API keys, access keys, passwords, tokens, and similar). Users or adversaries who paste live secrets into conversations create credential-exposure risk; the assistant's rotation advice is a strong signal that a secret was present in the prior turns.

Query · esql

from logs-openai_chatgpt_enterprise.conversation_message-* metadata _id, _version, _index
| where
    data_stream.dataset == "openai_chatgpt_enterprise.conversation_message" and
    openai_chatgpt_enterprise.conversation_message.message.author.type == "assistant" and
    message is not null
| eval Esql.message_text = to_lower(message)
| where
    (
        Esql.message_text like "*rotate*" or
        Esql.message_text like "*revoke*" or
        Esql.message_text like "*regenerate*" or
        Esql.message_text like "*invalidate*" or
        Esql.message_text like "*deactivate*"
    ) and
    (
        Esql.message_text like "*api key*" or
        Esql.message_text like "*access key*" or
        Esql.message_text like "*secret access key*" or
        Esql.message_text like "*aws secret*" or
        Esql.message_text like "*credential*" or
        Esql.message_text like "*password*" or
        Esql.message_text like "*secret key*" or
        Esql.message_text like "*auth token*"
    ) and
    (
        Esql.message_text like "*looks like*" or
        Esql.message_text like "*appears to be*" or
        Esql.message_text like "*you shared*" or
        Esql.message_text like "*you pasted*" or
        Esql.message_text like "*you posted*" or
        Esql.message_text like "*you provided*" or
        Esql.message_text like "*exposed*" or
        Esql.message_text like "*leaked*" or
        Esql.message_text like "*compromised*" or
        Esql.message_text like "*for security*" or
        Esql.message_text like "*treat them as exposed*" or
        Esql.message_text like "*treat it as exposed*"
    )
| keep
    _id,
    _version,
    _index,
    @timestamp,
    message,
    user.id,
    user.email,
    organization.id,
    openai_chatgpt_enterprise.conversation_message.conversation.id,
    openai_chatgpt_enterprise.conversation_message.conversation.title,
    openai_chatgpt_enterprise.conversation_message.message.author.type,
    openai_chatgpt_enterprise.conversation_message.message.id,
    data_stream.*

Investigation fields

Pivot points the source recommends for triage.

  • @timestamp
  • user.id
  • user.email
  • organization.id
  • message
  • openai_chatgpt_enterprise.conversation_message.conversation.id
  • openai_chatgpt_enterprise.conversation_message.conversation.title

Implementation guide

This rule requires the OpenAI ChatGPT Enterprise integration to collect conversation message compliance logs into Elasticsearch.

https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise

Known false positives

  • Users drafting security guidance, runbooks, or support replies that quote rotate or revoke advice without an in-chat exposure. Confirm the assistant is reacting to a secret in the conversation.
  • Discussions of certificate or TLS rotation can match loosely worded replies; this rule requires secret-family terms plus exposure or recognition phrasing to reduce those cases.

Analyst notes

Investigating OpenAI ChatGPT Enterprise Assistant Advises Credential Rotation After Suspected Exposure

An assistant reply indicated a likely secret in the conversation and advised rotating or revoking it. This often follows a user pasting an API key, cloud access key, password, or token into chat.

Escalate when the prior user message contains a live secret, the conversation is shared, or Codex or connector activity follows. Close as a false positive when the assistant is only helping draft generic security guidance with no in-chat exposure.

Possible investigation steps

  • Read message and the surrounding user turns for openai_chatgpt_enterprise.conversation_message.conversation.id.
  • Determine whether a live credential was pasted; if so, identify the credential type and owning system.
  • Correlate with other credential-in-conversation alerts and any subsequent shares or downloads.
  • Check whether the same user repeated exposures across conversations.

False positive analysis

  • Drafting support replies or security runbooks that mention rotate or revoke guidance for API keys.
  • Hypothetical examples that do not include a real secret.

Response and remediation

  • If a live credential was exposed, rotate or revoke it, remove residual copies from shared conversations where possible, and review use of that credential after the message time.
  • Limit access to alerts and compliance logs that retain message text.
Raw source OpenAI ChatGPT Enterprise Assistant Advises Credential Rotation After Suspected Exposure · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2026/10/08"
integration = ["openai_chatgpt_enterprise"]
maturity = "production"
updated_date = "2026/10/09"

[rule]
author = ["Elastic"]
description = """
Detects ChatGPT Enterprise assistant messages that recognize likely exposed secrets in chat and advise rotating,
revoking, regenerating, invalidating, or deactivating credentials (API keys, access keys, passwords, tokens, and
similar). Users or adversaries who paste live secrets into conversations create credential-exposure risk; the
assistant's rotation advice is a strong signal that a secret was present in the prior turns.
"""
false_positives = [
    """
    Users drafting security guidance, runbooks, or support replies that quote rotate or revoke advice without an in-chat
    exposure. Confirm the assistant is reacting to a secret in the conversation.
    """,
    """
    Discussions of certificate or TLS rotation can match loosely worded replies; this rule requires secret-family terms
    plus exposure or recognition phrasing to reduce those cases.
    """,
]
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "OpenAI ChatGPT Enterprise Assistant Advises Credential Rotation After Suspected Exposure"
note = """## Triage and analysis

### Investigating OpenAI ChatGPT Enterprise Assistant Advises Credential Rotation After Suspected Exposure

An assistant reply indicated a likely secret in the conversation and advised rotating or revoking it. This often
follows a user pasting an API key, cloud access key, password, or token into chat.

Escalate when the prior user message contains a live secret, the conversation is shared, or Codex or connector activity
follows. Close as a false positive when the assistant is only helping draft generic security guidance with no in-chat
exposure.

#### Possible investigation steps

- Read `message` and the surrounding user turns for
  `openai_chatgpt_enterprise.conversation_message.conversation.id`.
- Determine whether a live credential was pasted; if so, identify the credential type and owning system.
- Correlate with other credential-in-conversation alerts and any subsequent shares or downloads.
- Check whether the same user repeated exposures across conversations.

### False positive analysis

- Drafting support replies or security runbooks that mention rotate or revoke guidance for API keys.
- Hypothetical examples that do not include a real secret.

### Response and remediation

- If a live credential was exposed, rotate or revoke it, remove residual copies from shared conversations where
  possible, and review use of that credential after the message time.
- Limit access to alerts and compliance logs that retain message text.
"""
references = [
    "https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise",
    "https://platform.openai.com/docs/compliance",
]
risk_score = 73
rule_id = "b9e9dd60-a028-4171-999d-4222b938bc46"
setup = """## Setup

This rule requires the OpenAI ChatGPT Enterprise integration to collect conversation message compliance logs into
Elasticsearch.

https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise
"""
severity = "high"
tags = [
    "Domain: GenAI",
    "Platform: OpenAI",
    "Data Source: OpenAI ChatGPT Enterprise",
    "Service: OpenAI ChatGPT Enterprise",
    "Use Case: Threat Detection",
    "Resources: Investigation Guide",
    "Rule Type: ES|QL",
    "Tactic: Credential Access",
    "Mitre Atlas: AML.T0055",
    "Mitre Atlas: AML.T0057",
]
timestamp_override = "event.ingested"
type = "esql"

query = '''
from logs-openai_chatgpt_enterprise.conversation_message-* metadata _id, _version, _index
| where
    data_stream.dataset == "openai_chatgpt_enterprise.conversation_message" and
    openai_chatgpt_enterprise.conversation_message.message.author.type == "assistant" and
    message is not null
| eval Esql.message_text = to_lower(message)
| where
    (
        Esql.message_text like "*rotate*" or
        Esql.message_text like "*revoke*" or
        Esql.message_text like "*regenerate*" or
        Esql.message_text like "*invalidate*" or
        Esql.message_text like "*deactivate*"
    ) and
    (
        Esql.message_text like "*api key*" or
        Esql.message_text like "*access key*" or
        Esql.message_text like "*secret access key*" or
        Esql.message_text like "*aws secret*" or
        Esql.message_text like "*credential*" or
        Esql.message_text like "*password*" or
        Esql.message_text like "*secret key*" or
        Esql.message_text like "*auth token*"
    ) and
    (
        Esql.message_text like "*looks like*" or
        Esql.message_text like "*appears to be*" or
        Esql.message_text like "*you shared*" or
        Esql.message_text like "*you pasted*" or
        Esql.message_text like "*you posted*" or
        Esql.message_text like "*you provided*" or
        Esql.message_text like "*exposed*" or
        Esql.message_text like "*leaked*" or
        Esql.message_text like "*compromised*" or
        Esql.message_text like "*for security*" or
        Esql.message_text like "*treat them as exposed*" or
        Esql.message_text like "*treat it as exposed*"
    )
| keep
    _id,
    _version,
    _index,
    @timestamp,
    message,
    user.id,
    user.email,
    organization.id,
    openai_chatgpt_enterprise.conversation_message.conversation.id,
    openai_chatgpt_enterprise.conversation_message.conversation.title,
    openai_chatgpt_enterprise.conversation_message.message.author.type,
    openai_chatgpt_enterprise.conversation_message.message.id,
    data_stream.*
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"


[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat_mappings]]
framework = "MITRE ATLAS"
version = "2026.08"
[[rule.threat_mappings.threat]]
framework = "MITRE ATLAS"
[[rule.threat_mappings.threat.technique]]
id = "AML.T0057"
name = "LLM Data Leakage"
reference = "https://atlas.mitre.org/techniques/AML.T0057/"


[rule.threat_mappings.threat.tactic]
id = "AML.TA0010"
name = "Exfiltration"
reference = "https://atlas.mitre.org/tactics/AML.TA0010/"
[[rule.threat_mappings.threat]]
framework = "MITRE ATLAS"
[[rule.threat_mappings.threat.technique]]
id = "AML.T0055"
name = "Unsecured Credentials"
reference = "https://atlas.mitre.org/techniques/AML.T0055/"


[rule.threat_mappings.threat.tactic]
id = "AML.TA0013"
name = "Credential Access"
reference = "https://atlas.mitre.org/tactics/AML.TA0013/"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.id",
    "user.email",
    "organization.id",
    "message",
    "openai_chatgpt_enterprise.conversation_message.conversation.id",
    "openai_chatgpt_enterprise.conversation_message.conversation.title",
]

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.