OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed
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.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/10/06"
3integration = ["openai_chatgpt_enterprise"]
4maturity = "production"
5updated_date = "2026/10/06"
6
7[rule]
8author = ["Elastic"]
9description = """
10Detects ChatGPT Enterprise Codex security-log events that create or update a repository scan configuration. Changing
11scan scope, lookback, or notification rules can weaken secrets scanning coverage or redirect findings.
12"""
13false_positives = [
14 "Security engineering teams legitimately onboard repositories and tune scan lookback windows.",
15]
16from = "now-9m"
17language = "esql"
18license = "Elastic License v2"
19name = "OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed"
20note = """## Triage and analysis
21
22### Investigating OpenAI ChatGPT Enterprise Codex Security Scan Configuration Changed
23
24A Codex security scan configuration was created or updated. Changes to repository scope, lookback, or notification rules can weaken secrets-scanning coverage or redirect findings.
25
26Escalate 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.
27
28#### Possible investigation steps
29
30- Identify the actor and the scan configuration fields on the alert (repository URL, scan type, state, lookback).
31- Confirm repository ownership and whether the change matches an approved security-engineering request.
32- Review related Codex security findings or follow-on activity after the configuration change.
33- Compare with other admin or security-configuration changes by the same actor.
34
35### False positive analysis
36
37- Security engineering teams legitimately onboard repositories and tune scan lookback windows during rollout.
38
39### Response and remediation
40
41- Revert unauthorized scan configuration changes and review related findings.
42- If coverage was reduced, restore the prior configuration and investigate why it was changed.
43"""
44references = [
45 "https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise",
46 "https://platform.openai.com/docs/compliance",
47]
48risk_score = 47
49rule_id = "6c634405-3880-4354-8fea-925ec7eadd9b"
50setup = """## Setup
51
52This rule requires the OpenAI ChatGPT Enterprise integration to collect compliance logs into Elasticsearch.
53
54https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise
55"""
56severity = "medium"
57tags = [
58 "Domain: GenAI",
59 "Platform: OpenAI",
60 "Data Source: OpenAI ChatGPT Enterprise",
61 "Service: OpenAI ChatGPT Enterprise",
62 "Use Case: Threat Detection",
63 "Resources: Investigation Guide",
64 "Rule Type: ES|QL",
65 "Tactic: Defense Evasion",
66 "Mitre Atlas: AML.T0081",
67]
68timestamp_override = "event.ingested"
69type = "esql"
70
71query = '''
72from logs-openai_chatgpt_enterprise.codex_security_log-* metadata _id, _version, _index
73| where
74 data_stream.dataset == "openai_chatgpt_enterprise.codex_security_log" and
75 event.action in ("scan_configuration_created", "scan_configuration_updated")
76| keep
77 _id, _version, _index, @timestamp, event.action, user.id, user.email,
78 openai_chatgpt_enterprise.codex_security_log.client_id,
79 openai_chatgpt_enterprise.codex_security_log.workspace_id,
80 openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_id,
81 openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.repo_url,
82 openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.scan_type,
83 openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.state,
84 openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.lookback_days,
85 data_stream.*
86'''
87
88
89[[rule.threat]]
90framework = "MITRE ATT&CK"
91[[rule.threat.technique]]
92id = "T1562"
93name = "Impair Defenses"
94reference = "https://attack.mitre.org/techniques/T1562/"
95[[rule.threat.technique.subtechnique]]
96id = "T1562.001"
97name = "Disable or Modify Tools"
98reference = "https://attack.mitre.org/techniques/T1562/001/"
99
100
101[rule.threat.tactic]
102id = "TA0005"
103name = "Defense Evasion"
104reference = "https://attack.mitre.org/tactics/TA0005/"
105
106[[rule.threat_mappings]]
107framework = "MITRE ATLAS"
108version = "2026.08"
109[[rule.threat_mappings.threat]]
110framework = "MITRE ATLAS"
111[[rule.threat_mappings.threat.technique]]
112id = "AML.T0081"
113name = "Modify AI Agent Configuration"
114reference = "https://atlas.mitre.org/techniques/AML.T0081/"
115
116
117[rule.threat_mappings.threat.tactic]
118id = "AML.TA0007"
119name = "Defense Evasion"
120reference = "https://atlas.mitre.org/tactics/AML.TA0007/"
121
122[rule.investigation_fields]
123field_names = [
124 "@timestamp",
125 "event.action",
126 "user.id",
127 "openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.repo_url",
128 "openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.scan_type",
129 "openai_chatgpt_enterprise.codex_security_log.event_details.scan_configuration_fields.state",
130]
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
Related rules
- OpenAI ChatGPT Enterprise Workspace Feature Toggled
- OpenAI ChatGPT Enterprise App Authentication Linked
- OpenAI ChatGPT Enterprise Custom Agent Published
- OpenAI ChatGPT Enterprise Custom Agent Trigger Changed
- OpenAI ChatGPT Enterprise Excessive Conversation Deletion