How the attack works
Audit event streaming sends every audit event as JSON to an HTTP endpoint, Google Cloud Logging or an Amazon S3 bucket. Streams exist for a top-level group (GitLab.com, GitLab Self-Managed and GitLab Dedicated) and for a whole instance (GitLab Self-Managed and GitLab Dedicated). Top-level group Owners manage group streams (the Security Manager role, in beta, can too where it is enabled) and administrators manage instance streams.
An attacker with one of those roles can delete the destination, point it at another URL, remove a custom header the receiver needs for authentication, or add an event type or namespace filter that leaves out the events they are about to cause. Most audit events are still saved in GitLab, but the copy your detections depend on stops. GitLab records each of these changes as its own audit event type.
What an attacker needs
- The Owner role on the top-level group (or the Security Manager role where enabled), or administrator access for instance streams.
- Log collection: audit event streaming (Ultimate) to an HTTP destination, received as JSON. GitLab does not document whether the event for a deletion is still delivered to the destination being deleted, so do not rely on a single stream to report its own removal: keep a second destination or poll the audit events API.
Impact
Loss of the external audit trail for the group or instance. Later steps such as new Owners, new access tokens or removed branch protection never reach the SIEM, and are found only by someone who reads the audit events inside GitLab.
Detection rules
GitLab Audit Event Streaming Destination Changed or Filtered
Detects changes that can reduce what a GitLab audit event stream delivers without deleting it: the destination is updated, a custom HTTP header is removed, or an event type or namespace filter is added.
title: GitLab Audit Event Streaming Destination Changed or Filtered
id: ba96900f-a0a4-4754-877c-15e4305787d6
status: experimental
description: >-
Detects changes that can reduce what a GitLab audit event stream delivers
without deleting it: the destination is updated, a custom HTTP header is
removed, or an event type or namespace filter is added.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/compliance/audit_event_streaming/
- https://attack.mitre.org/techniques/T1685/002/
author: Forestall
date: 2026-11-11
tags:
- attack.defense-impairment
- attack.t1685.002
logsource:
product: gitlab
service: audit
detection:
selection:
event_type:
- updated_group_audit_event_streaming_destination
- updated_instance_audit_event_streaming_destination
- update_event_streaming_destination
- update_instance_event_streaming_destination
- amazon_s3_configuration_updated
- instance_amazon_s3_configuration_updated
- google_cloud_logging_configuration_updated
- instance_google_cloud_logging_configuration_updated
- audit_events_streaming_headers_destroy
- audit_events_streaming_instance_headers_destroy
- event_type_filters_created
- create_http_namespace_filter
- created_group_namespace_filter
- created_instance_namespace_filter
condition: selection
falsepositives:
- Routine maintenance of the SIEM integration, such as rotating the receiver's token header or tuning noisy event types.
level: medium
False positives
- Routine maintenance of the SIEM integration, such as rotating the receiver's token header or tuning noisy event types.
GitLab Audit Event Streaming Destination Deleted
Detects the deletion of a GitLab audit event streaming destination for a top-level group or an instance: HTTP destinations (current and legacy event type names), Amazon S3 configurations and Google Cloud Logging configurations.
title: GitLab Audit Event Streaming Destination Deleted
id: 941b72a6-f348-4df3-9502-c96a06658122
status: experimental
description: >-
Detects the deletion of a GitLab audit event streaming destination for a
top-level group or an instance: HTTP destinations (current and legacy event
type names), Amazon S3 configurations and Google Cloud Logging
configurations.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/compliance/audit_event_streaming/
- https://attack.mitre.org/techniques/T1685/002/
author: Forestall
date: 2026-11-11
tags:
- attack.defense-impairment
- attack.t1685.002
logsource:
product: gitlab
service: audit
detection:
selection:
event_type:
- deleted_group_audit_event_streaming_destination
- deleted_instance_audit_event_streaming_destination
- destroy_event_streaming_destination
- destroy_instance_event_streaming_destination
- amazon_s3_configuration_deleted
- instance_amazon_s3_configuration_deleted
- google_cloud_logging_configuration_deleted
- instance_google_cloud_logging_configuration_deleted
condition: selection
falsepositives:
- Planned replacement of a SIEM endpoint or bucket. A new destination should be created in the same change.
level: high
False positives
- Planned replacement of a SIEM endpoint or bucket. A new destination should be created in the same change.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Events saved in GitLab that never arrived through the stream
A deleted destination, a new filter or a removed header stops events at the receiver, and the event that records the change may not arrive either. Most audit events are also saved in GitLab and can be read through the audit events API, which stream changes do not affect. Every event carries an id that GitLab describes as unique and useful for deduplication, so events that the API returns and the stream never delivered show where and when the stream was cut.
- Poll the audit events API of the top-level group or the instance on a schedule and keep the
id,created_atand, where present,event_typeof each event. - Look each
idup among the events the stream delivered. - Alert when events older than the normal delivery delay are in the API copy but not in the stream.
- Among the missing events and just before them, look for
deleted_group_audit_event_streaming_destination,deleted_instance_audit_event_streaming_destinationand the update event types of destinations, headers and filters, and read the author.
Eventsdeleted_group_audit_event_streaming_destinationdeleted_instance_audit_event_streaming_destinationupdated_group_audit_event_streaming_destinationupdated_instance_audit_event_streaming_destination
LimitsEvent types that GitLab marks as not saved to the database, such as repository_git_operation, never appear in the API, so the check cannot cover them. A filter you configured leaves events out on purpose, and retries make the newest events look missing for a while. Confirm on a few events that the API and the stream carry the same id. The polling interval and the delay are starting points.
Triage
- Identify the actor (
author_name,ip_address) and the scope.entity_pathholds the group, orgitlab_instancefor an instance stream. - Check in Secure > Audit events > Streams (group) or Admin > Monitoring > Audit events > Streams (instance) which destinations, headers and filters exist now.
- Pull the audit events for the gap from the audit events API and replay your detections over them.
- Treat an unexplained deletion as a sign that the acting account is compromised and review everything it did before and after.
Response
Once the attack is confirmed:
- Recreate the destination, or restore its URL, custom headers and filters from your record, and confirm at the receiver that events arrive again.
- If the destination URL was changed, treat the header value that GitLab sends with each event as disclosed to the other endpoint and replace it at your receiver.
- Take stream management away from the acting account until the change is explained. Lower it from Owner on the top-level group or remove its administrator access, reset its credentials and revoke its tokens.
- Reverse what the replay of the gap brings up, such as new Owners, new access tokens or removed branch protection, each as an incident of its own.
- Compare the destinations, headers and filters of every other top-level group and of the instance with your record, because the same account may manage more than one stream.
Mitigation
- Keep the roles that can manage streams small. These are top-level group Owners, members with the Security Manager role, and administrators.
- Configure two destinations of different types, for example an HTTP endpoint and an S3 bucket, so one deletion does not blind you.
- Alert in the SIEM when the stream goes silent for longer than a normal quiet period.
- Reconcile periodically with the audit events API, which is not affected by stream changes.
Frequently asked questions
Will the SIEM receive the event that reports the deletion of its own destination?
Do not count on it. GitLab does not document whether the event for a deletion is still delivered to the destination that is being deleted. Keep a second destination, poll the audit events API, or alert in the SIEM when the stream goes silent for longer than a normal quiet period.
Are audit events lost for good while the stream is down?
Mostly not. Most audit events are still saved in GitLab, and the audit events API is not affected by stream changes. Pull the events for the gap from that API and replay your detections over them. What stops is the copy your alerts depend on.
Why alert on a new filter or a removed header when the destination still exists?
Both can stop events without deleting anything. An event type or namespace filter can leave out the events an attacker is about to cause, and a receiver that needs a custom header for authentication no longer gets it once the header is removed. Routine maintenance produces the same events, which is why the rule for them is at medium level.
Who is able to delete or change a stream?
Top-level group Owners manage the streams of their group, and the Security Manager role, in beta, can too where it is enabled. Administrators manage instance streams on GitLab Self-Managed and GitLab Dedicated. Keep these roles small, because each of them can remove the external audit trail.