1. Resources
  2. Detection rules
  3. Projects or Groups Deleted in Bulk in GitLab

Projects or Groups Deleted in Bulk in GitLab detection rules

An account with the Owner role marks many GitLab projects or a whole group for deletion, or deletes them permanently. Code, issues and merge requests are gone once the retention period ends or is skipped.

Platform
GitLab
Severity
High
Log source
GitLab audit events
Last updated
MITRE ATT&CK technique
T1485Data Destruction
Tactic
Impact
Rule formats
Sigmaand queries for: Splunk
What an attacker needs
The Owner role on the projects or on a group that contains them, or administrator access where deletion is restricted to administrators.
Impact
The projects become read-only at once and are removed for good, with their issues and merge requests, after the retention period or a permanent deletion.
Response
Take the Owner role from the account or block it, and restore every project and group that is still pending deletion.
Mitigation
Restrict project deletion to administrators where the instance allows it, and keep the retention period long enough to notice a deletion.
Audit events
group_deletion_markedgroup_permanent_deletion_requestedgroup_destroyedproject_destroyedproject_deletion_marked

How the attack works

A user with the Owner role can delete a project, and the Owner of a group can delete the group with its subgroups and projects. By default the first deletion only marks the project or group for deletion. It becomes read-only, its scheduled pipelines stop, and it can be restored during the retention period, which is 30 days on GitLab.com and a value between 1 and 90 days on GitLab Self-Managed. A second step, Delete permanently, removes a project or group that is already scheduled for deletion at once, together with all related resources such as issues and merge requests.

One Owner account is therefore enough to destroy the work of a team. An attacker who wants to cause damage, or to press an organization after taking a copy of its code, deletes what the account owns: many projects one after the other, or one group that holds them all. GitLab records a project being marked for deletion as project_deletion_marked and its destruction as project_destroyed. For groups the event types are group_deletion_marked, group_destroyed and, from GitLab 19.5, group_permanent_deletion_requested. A single deleted project is routine, so two rules on this page count project events per account, and a third reads the group events, because one deleted group already is a deletion in bulk.

What an attacker needs

  • The Owner role on the projects, or on a group that contains them. On instances that restrict project deletion to administrators, administrator access.
  • Log collection: audit event streaming (Ultimate) for the top-level group or the instance, to an HTTP destination, received as JSON.

Impact

Work on the deleted projects stops at once, because a project that is marked for deletion is read-only and its scheduled pipelines no longer run. After the retention period, or immediately when the deletion is made permanent, the project and all related resources, including issues and merge requests, are removed for good. The code can then only come back from a backup or from the clones that developers still have. A deleted group takes its subgroups and all their projects with it.

Detection rules

GitLab Group Marked for Deletion or Destroyed

Detects a group being marked for deletion (audit event type group_deletion_marked), a request to delete a group permanently (group_permanent_deletion_requested, GitLab 19.5 and later) and a group being destroyed (group_destroyed). Deleting a group deletes its subgroups, its projects and all related resources, so one event of this kind can stand for many projects. The group becomes read-only when it is marked, and an Owner can restore it during the retention period. The event type reference lists these events without their fields. The group is the entity of the event, in entity_path.

LevelMediumStatusExperimentalLog sourceGitLab audit events
title: GitLab Group Marked for Deletion or Destroyed
id: 39aa7aa6-b45c-48d6-9363-7c28e022c45c
status: experimental
description: >-
  Detects a group being marked for deletion (audit event type
  group_deletion_marked), a request to delete a group permanently
  (group_permanent_deletion_requested, GitLab 19.5 and later) and a
  group being destroyed (group_destroyed). Deleting a group deletes its
  subgroups, its projects and all related resources, so one event of
  this kind can stand for many projects. The group becomes read-only
  when it is marked, and an Owner can restore it during the retention
  period. The event type reference lists these events without their
  fields. The group is the entity of the event, in entity_path.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/user/group/
  - https://attack.mitre.org/techniques/T1485/
author: Forestall
date: 2026-11-18
tags:
  - attack.impact
  - attack.t1485
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type:
      - group_deletion_marked
      - group_permanent_deletion_requested
      - group_destroyed
  condition: selection
falsepositives:
  - Owners who remove an empty group, a test group or a group that was replaced after a reorganization. Confirm with the Owner, and check how many projects the group held.
  - The destroyed event at the end of the retention period of a deletion that was reviewed when it was marked.
level: medium

False positives

  • Owners who remove an empty group, a test group or a group that was replaced after a reorganization. Confirm with the Owner, and check how many projects the group held.
  • The destroyed event at the end of the retention period of a deletion that was reviewed when it was marked.

Many GitLab Projects Destroyed Under One Account

Counts, per author, the projects that were destroyed (audit event type project_destroyed, counted by author_id). Destruction is the end of a deletion: it follows the retention period, or it follows at once when an Owner uses Delete permanently on a project that is already scheduled for deletion. Five or more destroyed projects for one account within an hour mean that a set of deletions has become final. When the marks for these projects are only minutes old, the retention period was skipped by hand. GitLab does not document which account is the author of the event when the scheduled job deletes a project, so check on your version whether it is the user who scheduled the deletion. The count and the window are starting points to tune.

Fires when one author_id has at least 5 matching events within 1 hour.

Threshold ruleLevelHighStatusExperimentalLog sourceGitLab audit events
title: GitLab Project Destroyed (Bulk Destruction Base Event)
id: 6121776a-7090-4d0c-b61c-7a7ef37845cf
name: gitlab_project_destroyed
status: experimental
description: >-
  Base event of the threshold rule in this file. The audit event type
  project_destroyed, which GitLab writes when a project is destroyed.
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: project_destroyed
  condition: selection
level: low
---
title: Many GitLab Projects Destroyed Under One Account
id: f90cc235-296e-4a95-88ec-ee06745ee56d
status: experimental
description: >-
  Counts, per author, the projects that were destroyed (audit event type
  project_destroyed, counted by author_id). Destruction is the end of a
  deletion: it follows the retention period, or it follows at once when
  an Owner uses Delete permanently on a project that is already
  scheduled for deletion. Five or more destroyed projects for one
  account within an hour mean that a set of deletions has become final.
  When the marks for these projects are only minutes old, the retention
  period was skipped by hand. GitLab does not document which account is
  the author of the event when the scheduled job deletes a project, so
  check on your version whether it is the user who scheduled the
  deletion. The count and the window are starting points to tune.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/user/compliance/audit_event_schema/
  - https://docs.gitlab.com/user/project/working_with_projects/
  - https://attack.mitre.org/techniques/T1485/
author: Forestall
date: 2026-11-18
tags:
  - attack.impact
  - attack.t1485
correlation:
  type: event_count
  rules:
    - gitlab_project_destroyed
  group-by:
    - author_id
  timespan: 1h
  condition:
    gte: 5
falsepositives:
  - The end of the retention period for projects that were marked on the same day in a planned cleanup. The marks are then weeks old and were reviewed at the time.
  - A group that is deleted with its projects, if your version writes one event per project. Read the group event of the same hour.
  - The values of 5 projects and one hour are starting points, not tested limits.
level: high

False positives

  • The end of the retention period for projects that were marked on the same day in a planned cleanup. The marks are then weeks old and were reviewed at the time.
  • A group that is deleted with its projects, if your version writes one event per project. Read the group event of the same hour.
  • The values of 5 projects and one hour are starting points, not tested limits.

One User Marked Many GitLab Projects for Deletion

Counts, per author, the projects that were marked for deletion (audit event type project_deletion_marked, counted by author_id). A project that is marked for deletion becomes read-only at once and is removed after the retention period, which is 30 days by default. An Owner who deletes one project is routine. Five or more in an hour from one account are a cleanup, a migration or a destruction run, and the retention period is the time left to tell which. The event type has the Group and Instance scopes and the reference lists it without its fields, so the rule counts events per author and does not count different projects. The count and the window are starting points to tune.

Fires when one author_id has at least 5 matching events within 1 hour.

Threshold ruleLevelHighStatusExperimentalLog sourceGitLab audit events
title: GitLab Project Marked for Deletion (Bulk Deletion Base Event)
id: ac9bd0c8-7a4c-48f4-afd4-ee69219da53e
name: gitlab_project_deletion_marked
status: experimental
description: >-
  Base event of the threshold rule in this file. The audit event type
  project_deletion_marked, which GitLab writes when a project is marked
  for deletion.
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: project_deletion_marked
  condition: selection
level: low
---
title: One User Marked Many GitLab Projects for Deletion
id: f12d9c59-db54-4759-9940-24ce613f7d7b
status: experimental
description: >-
  Counts, per author, the projects that were marked for deletion (audit
  event type project_deletion_marked, counted by author_id). A project
  that is marked for deletion becomes read-only at once and is removed
  after the retention period, which is 30 days by default. An Owner who
  deletes one project is routine. Five or more in an hour from one
  account are a cleanup, a migration or a destruction run, and the
  retention period is the time left to tell which. The event type has
  the Group and Instance scopes and the reference lists it without its
  fields, so the rule counts events per author and does not count
  different projects. The count and the window are starting points to
  tune.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/user/compliance/audit_event_schema/
  - https://docs.gitlab.com/user/project/working_with_projects/
  - https://attack.mitre.org/techniques/T1485/
author: Forestall
date: 2026-11-18
tags:
  - attack.impact
  - attack.t1485
correlation:
  type: event_count
  rules:
    - gitlab_project_deletion_marked
  group-by:
    - author_id
  timespan: 1h
  condition:
    gte: 5
falsepositives:
  - A planned cleanup of old or test projects, or the last step of a migration to another group or instance. Match the events to the plan and confirm with the owner of the account.
  - Automation that creates and deletes short-lived projects, for example for tests. Exclude its account by author_id.
  - The values of 5 projects and one hour are starting points, not tested limits. An instance on which deletions are rare can alert on a lower count.
level: high

False positives

  • A planned cleanup of old or test projects, or the last step of a migration to another group or instance. Match the events to the plan and confirm with the owner of the account.
  • Automation that creates and deletes short-lived projects, for example for tests. Exclude its account by author_id.
  • The values of 5 projects and one hour are starting points, not tested limits. An instance on which deletions are rare can alert on a lower count.

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.

Projects exported or downloaded and then deleted by the same account

Detection hypothesisSequence of eventsJoins two logs

An attacker who wants leverage takes a copy before destroying the original. Exports or repository downloads by an account that are followed by deletions from the same account are a different event from a cleanup, where nobody needs a fresh copy of what is thrown away.

  1. Collect the copy events of the last 7 days per account (author_id): project_export_created, group_export_created and repository_download_operation.
  2. Collect the deletion events per account: project_deletion_marked, group_deletion_marked, project_destroyed and group_destroyed.
  3. Alert when one author_id has copy events and, later, deletion events, and compare the projects on both sides in the target fields and entity_path.

Eventsproject_export_createdgroup_export_createdrepository_download_operationproject_deletion_markedgroup_deletion_markedproject_destroyed

LimitsA migration to another instance exports projects and deletes them afterwards, so check the plan first. A clone over SSH or HTTPS is the streamed event repository_git_operation and not a download event, and it is not saved to the database. The 7 days are a starting point.

Deletion made permanent shortly after it was scheduled

Detection hypothesisSequence of events

The retention period is the safety net of a deletion. An account that schedules a deletion and makes it permanent within minutes or hours has removed that net on purpose, which a careful cleanup rarely does for many projects at once.

  1. A project is marked for deletion: project_deletion_marked. Keep the account (author_id), the target fields and the time.
  2. Look for project_destroyed from the same author_id within the next 24 hours, far below your retention period.
  3. For groups, pair group_deletion_marked with group_permanent_deletion_requested (GitLab 19.5 and later) or group_destroyed on the same entity_path.
  4. Count the pairs per account. Several pairs in one day are a destruction run, and a single pair deserves a question.

Eventsproject_deletion_markedproject_destroyedgroup_deletion_markedgroup_permanent_deletion_requestedgroup_destroyed

LimitsGitLab does not document which field of the two project events names the project, so pairing by project needs a test on your version, while pairing by account works with the documented author_id. Owners who delete test projects they just created produce the same pattern. The 24 hours are a starting point.

Triage

  • Identify the account (author_name, author_id, ip_address) and list every deletion event it produced in the last day.
  • Read which projects or groups were affected from the target fields of the events (target_type, target_id, target_details) and from entity_path.
  • Check whether the deletions were only scheduled or already made permanent. project_destroyed, group_destroyed and group_permanent_deletion_requested shortly after the mark mean that the retention period was skipped.
  • Ask the owner of the account and the affected teams whether a cleanup or a migration was planned.
  • Look for exports and downloads by the same account before the deletions (project_export_created, group_export_created, repository_download_operation), and for a role change that made it Owner shortly before.

Response

Once the attack is confirmed:

  1. Take the Owner role from the account or block it at once. GitLab states that when the user who scheduled a deletion loses access before it occurs, the deletion job restores the project or group instead of deleting it.
  2. Restore every project and group that is still pending deletion. An Owner can do this from the Actions menu during the retention period.
  3. Recover what was deleted permanently from backups, mirrors or the clones of developers, and record what could not be recovered, such as issues and merge requests.
  4. Treat the code as copied if exports or downloads by the account came before the deletions, and rotate the secrets it contained.
  5. Reset the credentials of the account, revoke its tokens and SSH keys, and review what else it changed in the groups it owns.

Mitigation

  • On GitLab Self-Managed and GitLab Dedicated (Premium and Ultimate), restrict project deletion to administrators in the visibility and access controls of the instance.
  • Keep the retention period of the deletion protection long enough to notice a deletion. The default is 30 days, and the instance setting accepts 1 to 90 days.
  • Keep the Owner role on groups and projects to a few people, and give teams the Maintainer role for daily work.
  • Keep backups or mirrors of important repositories outside the reach of the GitLab roles that can delete them.
  • Stream audit events to your SIEM and alert on bursts of deletions and on every deleted group.

Frequently asked questions

Can a deleted GitLab project or group be restored?

During the retention period, yes. By default the first deletion puts the project or group into a pending deletion state, and an Owner can restore it. GitLab.com deletes it after 30 days, and on GitLab Self-Managed the retention period is an instance setting between 1 and 90 days. After the period, or after Delete permanently was used, the content is removed and only a backup or an existing clone can bring it back.

Why does blocking the account help after the deletions were scheduled?

GitLab documents that if the user who scheduled the deletion loses access to the project or group before the deletion occurs, for example by having the role downgraded or by being banned, the deletion job restores it and it is no longer scheduled for deletion. If that user regains the Owner role or administrator access before the job runs, the job removes it permanently. Restore the projects yourself as well and do not rely on this alone.

Why are there separate rules for marked and for destroyed projects?

They are two event types for two moments. `project_deletion_marked` is written when the deletion is scheduled, which is the earliest warning and leaves the retention period to react. `project_destroyed` is written when a project is destroyed. A burst of it soon after the marks means the deletions were made permanent by hand. GitLab does not document which account is the author of the event when the scheduled job deletes a project later.

Is there a public incident report for bulk deletion in GitLab?

No public incident report describes this at the audit event level. The page follows what GitLab documents about deleting projects and groups, the retention period and the roles that are allowed to delete. The counts in the rules are starting points and were not tested against a real case.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.