OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed


Description

Detects ChatGPT Enterprise Codex security-log events that create or update a repository scan configuration. Changing scan scope, lookback, or notification rules can weaken secrets scanning coverage or redirect findings.

Query · esql

from logs-openai_chatgpt_enterprise.codex_security_log-* metadata _id, _version, _index
| where
    data_stream.dataset == "openai_chatgpt_enterprise.codex_security_log" and
    event.action in ("scan_configuration_created", "scan_configuration_updated")
| keep
    _id, _version, _index, @timestamp, event.action, user.id, user.email,
    openai_chatgpt_enterprise.codex_security_log.client_id,
    openai_chatgpt_enterprise.codex_security_log.workspace_id,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_id,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.repo_url,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.scan_type,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.state,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.lookback_days,
    data_stream.*

Investigation fields

Pivot points the source recommends for triage.

  • @timestamp
  • event.action
  • user.id
  • openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.repo_url
  • openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.scan_type
  • openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.state

Implementation guide

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

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

Known false positives

  • Security engineering teams legitimately onboard repositories and tune scan lookback windows.

Analyst notes

Investigating OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed

A Codex security scan configuration was created or updated. Changes to repository scope, lookback, or notification rules can weaken secrets-scanning coverage or redirect findings.

Escalate when the repository is unexpected, notification targets change, or the actor is not on the security engineering team. Close as a false positive for documented onboarding or tuning of approved repositories.

Possible investigation steps

  • Identify the actor and the scan configuration fields on the alert (repository URL, scan type, state, lookback).
  • Confirm repository ownership and whether the change matches an approved security-engineering request.
  • Review related Codex security findings or follow-on activity after the configuration change.
  • Compare with other admin or security-configuration changes by the same actor.

False positive analysis

  • Security engineering teams legitimately onboard repositories and tune scan lookback windows during rollout.

Response and remediation

  • Revert unauthorized scan configuration changes and review related findings.
  • If coverage was reduced, restore the prior configuration and investigate why it was changed.
Raw source OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2026/10/06"
integration = ["openai_chatgpt_enterprise"]
maturity = "production"
updated_date = "2026/10/06"

[rule]
author = ["Elastic"]
description = """
Detects ChatGPT Enterprise Codex security-log events that create or update a repository scan configuration. Changing
scan scope, lookback, or notification rules can weaken secrets scanning coverage or redirect findings.
"""
false_positives = [
    "Security engineering teams legitimately onboard repositories and tune scan lookback windows.",
]
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed"
note = """## Triage and analysis

### Investigating OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed

A Codex security scan configuration was created or updated. Changes to repository scope, lookback, or notification rules can weaken secrets-scanning coverage or redirect findings.

Escalate when the repository is unexpected, notification targets change, or the actor is not on the security engineering team. Close as a false positive for documented onboarding or tuning of approved repositories.

#### Possible investigation steps

- Identify the actor and the scan configuration fields on the alert (repository URL, scan type, state, lookback).
- Confirm repository ownership and whether the change matches an approved security-engineering request.
- Review related Codex security findings or follow-on activity after the configuration change.
- Compare with other admin or security-configuration changes by the same actor.

### False positive analysis

- Security engineering teams legitimately onboard repositories and tune scan lookback windows during rollout.

### Response and remediation

- Revert unauthorized scan configuration changes and review related findings.
- If coverage was reduced, restore the prior configuration and investigate why it was changed.
"""
references = [
    "https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise",
    "https://platform.openai.com/docs/compliance",
]
risk_score = 47
rule_id = "6c634405-3880-4354-8fea-925ec7eadd9b"
setup = """## Setup

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

https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise
"""
severity = "medium"
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: Defense Evasion",
    "Mitre Atlas: AML.T0081",
]
timestamp_override = "event.ingested"
type = "esql"

query = '''
from logs-openai_chatgpt_enterprise.codex_security_log-* metadata _id, _version, _index
| where
    data_stream.dataset == "openai_chatgpt_enterprise.codex_security_log" and
    event.action in ("scan_configuration_created", "scan_configuration_updated")
| keep
    _id, _version, _index, @timestamp, event.action, user.id, user.email,
    openai_chatgpt_enterprise.codex_security_log.client_id,
    openai_chatgpt_enterprise.codex_security_log.workspace_id,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_id,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.repo_url,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.scan_type,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.state,
    openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.lookback_days,
    data_stream.*
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[rule.threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"


[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[[rule.threat_mappings]]
framework = "MITRE ATLAS"
version = "2026.08"
[[rule.threat_mappings.threat]]
framework = "MITRE ATLAS"
[[rule.threat_mappings.threat.technique]]
id = "AML.T0081"
name = "Modify AI Agent Configuration"
reference = "https://atlas.mitre.org/techniques/AML.T0081/"


[rule.threat_mappings.threat.tactic]
id = "AML.TA0007"
name = "Defense Evasion"
reference = "https://atlas.mitre.org/tactics/AML.TA0007/"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "event.action",
    "user.id",
    "openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.repo_url",
    "openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.scan_type",
    "openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.state",
]

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.