1. Resources
  2. Detection rules
  3. Bulk Project Download or Export in GitLab

Bulk Project Download or Export in GitLab detection rules

One account downloads, clones or exports many private GitLab projects in a short time. Source code, history and the credentials committed to it leave in bulk, through features that every user with access may use.

Platform
GitLab
Severity
High
Log source
GitLab audit events
Last updated
Rule formats
Sigmaand queries for: Splunk
What an attacker needs
An account, token or SSH key that can read many projects, and the Maintainer or Owner role where file exports are used.
Impact
Source code, history and the credentials committed to it leave for many projects at once, with issues and merge requests where exports are used.
Response
Block the account or revoke the credential that made the copies, and rotate the credentials found in every project that was copied.
Mitigation
Give membership at project or subgroup level instead of broad roles on a top-level group, and alert on one account that copies many projects.
Audit events
repository_git_operationrepository_download_operationproject_export_createdgroup_export_createddirect_transfer_relations_export_initiatedproject_export_file_download_started

How the attack works

A project that a user can reach can be copied in three ways: a Git clone or fetch over SSH or HTTPS, a download of the source code from the UI, and a file export, which packages the repository, the wiki, issues and merge requests with their comments into one file and needs the Maintainer or Owner role. GitLab records the download of a private or internal project's repository as repository_download_operation, file exports as project_export_created and group_export_created, the download of an export file as project_export_file_download_started, and Git operations as repository_git_operation. The last one is not saved to the database and reaches only audit event streaming.

An attacker who holds a stolen session, access token or SSH key uses these features the way a legitimate user does, only for many projects in a short time, and searches the copies offline for credentials and proprietary code. In October 2025 Red Hat reported that an unauthorized third party had accessed a GitLab instance used by its consulting team and copied data from it. A single download is ordinary work, so the threshold rules on this page count the different projects per account.

What an attacker needs

  • An account, access token, deploy token or SSH key that can read the projects.
  • The Maintainer or Owner role on a project for a file export, and the Owner role on a group for a group export.
  • Log collection: audit event streaming (Ultimate) for the top-level group or the instance, to an HTTP destination, received as JSON. Git operation events exist only in the stream.

Impact

The source code and history of many projects leave at once, together with every credential committed to them and, where exports are used, the issues, merge requests and wikis. GitLab leaves CI/CD variables out of export files, but repositories themselves often hold tokens and keys that open further systems.

Detection rules

One User Ran Git Operations on Many GitLab Projects

Counts, per author, the different projects on which a Git operation was recorded (audit event type repository_git_operation, counted by entity_path). Twenty or more different projects for one account within an hour are far more than a developer touches and fit an account or token that clones everything it can read. The event is streaming only: GitLab does not save it to the database, so the rule needs audit event streaming. The event type covers pushes as well as clones and fetches. GitLab's examples show the Git action in details.custom_message, but the details object has no defined schema, so the rule does not filter on it. The count and the window are starting points to tune.

Fires when one author_id has at least 20 different entity_path values within 1 hour.

Threshold ruleLevelMediumStatusExperimentalLog sourceGitLab audit events
title: GitLab Git Operation (Bulk Clone Base Event)
id: a2fbf38b-b4c9-4c6b-8597-d798e02fc5f4
name: gitlab_repository_git_operation
status: experimental
description: >-
  Base event of the threshold rule in this file. The audit event type
  repository_git_operation, which GitLab writes when an authenticated user
  pushes, pulls or clones a project over SSH, HTTP(S) or the UI. GitLab does
  not save this event to the database, so it exists only in audit event
  streaming.
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: repository_git_operation
  condition: selection
level: low
---
title: One User Ran Git Operations on Many GitLab Projects
id: c54f0a92-da9a-48d3-bea0-9135e9aeba44
status: experimental
description: >-
  Counts, per author, the different projects on which a Git operation was
  recorded (audit event type repository_git_operation, counted by
  entity_path). Twenty or more different projects for one account within an
  hour are far more than a developer touches and fit an account or token
  that clones everything it can read. The event is streaming only: GitLab
  does not save it to the database, so the rule needs audit event streaming.
  The event type covers pushes as well as clones and fetches. GitLab's
  examples show the Git action in details.custom_message, but the details
  object has no defined schema, so the rule does not filter on it. 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/compliance/audit_event_streaming/
  - https://attack.mitre.org/techniques/T1213/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.collection
  - attack.t1213.003
correlation:
  type: value_count
  rules:
    - gitlab_repository_git_operation
  group-by:
    - author_id
  timespan: 1h
  condition:
    field: entity_path
    gte: 20
falsepositives:
  - Build systems, mirrors, dependency scanners and backup jobs that read many projects under one account or deploy key. Exclude them by author_id once confirmed.
  - A developer who runs a script over all repositories of a team, for example to update a shared file. Confirm it with the person.
  - The values of 20 projects and one hour are starting points, not tested limits. Measure what your teams produce on a normal day and adjust both.
level: medium

False positives

  • Build systems, mirrors, dependency scanners and backup jobs that read many projects under one account or deploy key. Exclude them by author_id once confirmed.
  • A developer who runs a script over all repositories of a team, for example to update a shared file. Confirm it with the person.
  • The values of 20 projects and one hour are starting points, not tested limits. Measure what your teams produce on a normal day and adjust both.

One User Downloaded the Repositories of Many GitLab Projects

Counts, per author, the different private or internal projects whose repository was downloaded (audit event type repository_download_operation, counted by entity_path). A person downloads the source of a project now and then. Ten or more different projects for one account within an hour are a collection run. GitLab saves this event to the database as well, but entity_path is a field of the streamed event, so the rule is written for audit event streaming. The count and the window are starting points to tune.

Fires when one author_id has at least 10 different entity_path values within 1 hour.

Threshold ruleLevelHighStatusExperimentalLog sourceGitLab audit events
title: GitLab Repository Downloaded (Bulk Download Base Event)
id: d1d3130e-6660-4b49-a74b-73b4bad2e488
name: gitlab_repository_download_operation
status: experimental
description: >-
  Base event of the threshold rule in this file. The audit event type
  repository_download_operation, which GitLab writes when the Git repository
  of a private or internal project is downloaded.
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: repository_download_operation
  condition: selection
level: low
---
title: One User Downloaded the Repositories of Many GitLab Projects
id: c508dc9a-fe13-4571-a4d0-4251d635f5c0
status: experimental
description: >-
  Counts, per author, the different private or internal projects whose
  repository was downloaded (audit event type repository_download_operation,
  counted by entity_path). A person downloads the source of a project now
  and then. Ten or more different projects for one account within an hour
  are a collection run. GitLab saves this event to the database as well, but
  entity_path is a field of the streamed event, so the rule is written for
  audit event streaming. 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://attack.mitre.org/techniques/T1213/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.collection
  - attack.t1213.003
correlation:
  type: value_count
  rules:
    - gitlab_repository_download_operation
  group-by:
    - author_id
  timespan: 1h
  condition:
    field: entity_path
    gte: 10
falsepositives:
  - Migration and backup jobs that fetch project archives under one account. Exclude that account by author_id.
  - The values of 10 projects and one hour are starting points, not tested limits. Measure what your teams produce on a normal day and adjust both.
level: high

False positives

  • Migration and backup jobs that fetch project archives under one account. Exclude that account by author_id.
  • The values of 10 projects and one hour are starting points, not tested limits. Measure what your teams produce on a normal day and adjust both.

One User Exported Many GitLab Projects

Counts, per author, the different projects for which a file export was created (audit event type project_export_created, counted by entity_path). An export packages the repository, the wiki, issues and merge requests of a project into one file and needs the Maintainer or Owner role. A migration exports projects on purpose and is planned. Five or more different projects for one account within an hour without such a plan fit an account that is taking whole projects away. The count and the window are starting points to tune.

Fires when one author_id has at least 5 different entity_path values within 1 hour.

Threshold ruleLevelHighStatusExperimentalLog sourceGitLab audit events
title: GitLab Project Export Created (Bulk Export Base Event)
id: 1e8d1c52-bde5-4071-af80-9101b3354c19
name: gitlab_project_export_created
status: experimental
description: >-
  Base event of the threshold rule in this file. The audit event type
  project_export_created, which GitLab writes when a project file export is
  created.
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: project_export_created
  condition: selection
level: low
---
title: One User Exported Many GitLab Projects
id: 75602516-186a-4f23-a1a1-13cdbfde6e04
status: experimental
description: >-
  Counts, per author, the different projects for which a file export was
  created (audit event type project_export_created, counted by entity_path).
  An export packages the repository, the wiki, issues and merge requests of
  a project into one file and needs the Maintainer or Owner role. A
  migration exports projects on purpose and is planned. Five or more
  different projects for one account within an hour without such a plan fit
  an account that is taking whole projects away. 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/project/settings/import_export/
  - https://attack.mitre.org/techniques/T1213/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.collection
  - attack.t1213.003
correlation:
  type: value_count
  rules:
    - gitlab_project_export_created
  group-by:
    - author_id
  timespan: 1h
  condition:
    field: entity_path
    gte: 5
falsepositives:
  - Planned migrations between instances or groups, which export many projects under one account. Match the events to the migration plan and exclude the account for its duration.
  - The values of 5 projects and one hour are starting points, not tested limits. An instance on which exports are rare can alert on a lower count.
level: high

False positives

  • Planned migrations between instances or groups, which export many projects under one account. Match the events to the migration plan and exclude the account for its duration.
  • The values of 5 projects and one hour are starting points, not tested limits. An instance on which exports are rare can alert on a lower count.

GitLab Project or Group Export Started or Downloaded

Detects a file export of a project or a group being created (project_export_created, group_export_created), a direct transfer export being initiated (direct_transfer_relations_export_initiated) and the download of a project export file being started (project_export_file_download_started). A project export holds the repository, the wiki, issues and merge requests of the project. A group export does not include the projects of the group. Exports are rare outside migrations, so each one is worth a look, and the threshold rule on this page covers one account that exports many projects.

LevelLowStatusExperimentalLog sourceGitLab audit events
title: GitLab Project or Group Export Started or Downloaded
id: 8c0541d8-508b-4b77-9b79-36f659881328
status: experimental
description: >-
  Detects a file export of a project or a group being created
  (project_export_created, group_export_created), a direct transfer export
  being initiated (direct_transfer_relations_export_initiated) and the
  download of a project export file being started
  (project_export_file_download_started). A project export holds the
  repository, the wiki, issues and merge requests of the project. A group
  export does not include the projects of the group. Exports are rare
  outside migrations, so each one is worth a look, and the threshold rule on
  this page covers one account that exports many projects.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/user/project/settings/import_export/
  - https://attack.mitre.org/techniques/T1213/003/
author: Forestall
date: 2026-11-18
tags:
  - attack.collection
  - attack.t1213.003
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type:
      - project_export_created
      - group_export_created
      - direct_transfer_relations_export_initiated
      - project_export_file_download_started
  condition: selection
falsepositives:
  - Migrations between instances or groups and maintainers who move a project by hand. Confirm the export with the account that started it.
level: low

False positives

  • Migrations between instances or groups and maintainers who move a project by hand. Confirm the export with the account that started it.

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.

Sign-in or token use from an unseen address followed by copies of many projects

Detection hypothesisSequence of eventsJoins two logs

GitLab keeps its own record of the addresses an account has used and writes an event when a sign-in or a personal access token comes from an address it has not seen. Bulk copying that starts shortly after such an event is far more likely to be a stolen credential than the same count from the user's usual address.

  1. GitLab reports an unseen address: user_signed_in_from_unseen_ip (GitLab 19.0 and later) or personal_access_token_used_from_unseen_ip (GitLab 19.1 and later, streaming only). Keep author_id, ip_address and the time.
  2. In the following 6 hours, collect repository_git_operation, repository_download_operation and project_export_created events with the same author_id.
  3. Count the different values of entity_path, and alert at a lower count than the threshold rules on this page use.

Eventsuser_signed_in_from_unseen_ippersonal_access_token_used_from_unseen_iprepository_git_operationrepository_download_operationproject_export_created

LimitsPeople who travel or change networks produce the first event and may clone several projects on the same day. Both unseen address events have the User scope, so a top-level group stream may not carry them. GitLab does not document how long it remembers an address, and the 6 hours are a starting point.

Triage

  • Identify the account (author_name, author_id), the source address (ip_address) and the list of projects (entity_path).
  • Compare the projects with the work of the account. A developer who touches the projects of one team is normal, and an account that walks through unrelated groups is not.
  • For Git operations read details.custom_message and details.author_class. GitLab's examples show the protocol and the Git action there, and the author class tells a user from a deploy key.
  • Check whether the account signed in from a new place or received a new token or SSH key shortly before. From GitLab 19.0 a sign-in from an address GitLab has not seen is its own event, user_signed_in_from_unseen_ip.
  • Confirm the activity with the owner of the account through a separate channel.

Response

Once the attack is confirmed:

  1. Block the account, or revoke the access token, deploy token or SSH key that made the copies, and end the sessions of the account.
  2. Reset the credentials of the account and remove the tokens and SSH keys that were added to it during the period.
  3. List every project in the count and treat it as copied. Rotate the credentials found in those repositories and in their history, starting with deployment credentials.
  4. Review what else the account did in the period, such as new access tokens, deploy keys, members or changed CI/CD variables.
  5. Tell the owners of the copied projects, and the customers whose data they hold, what was taken.

Mitigation

  • Give membership at the level of the project or subgroup a person works on, and avoid broad roles on a top-level group that make every project readable.
  • Keep credentials out of repositories, so that a copied project does not open other systems.
  • Remove access tokens, deploy tokens and SSH keys that are no longer used, and give the rest an expiry date.
  • Stream audit events to your SIEM, because Git clones and fetches are visible nowhere else, and alert on one account that copies many projects.

Frequently asked questions

Why do the rules count projects and not events?

A developer fetches the same repository again and again, and a build system clones the same project many times a day. Neither says anything about bulk copying. The number of different projects that one account touches in a window does, so the threshold rules count the distinct values of `entity_path` for each `author_id`.

Can I see Git clones without audit event streaming?

No. GitLab marks `repository_git_operation` as not saved to the database, so the event reaches streaming destinations only. Downloads of a repository from the UI, recorded as `repository_download_operation`, and file exports are saved and can also be read in the audit events of the project or group.

What does a project export file contain?

According to GitLab, the project and wiki repositories, uploads, the project configuration, issues and merge requests with their comments, labels, milestones, snippets and releases. CI/CD variables, job traces and artifacts, webhooks and encrypted tokens are left out. A group export does not include the projects of the group.

How do I keep build systems and mirrors from flooding the Git operation rule?

They read many projects by design. Exclude their accounts by `author_id` once you have confirmed them, and keep the rule for people and for tokens that belong to people. The counts on this page are starting points, so measure what a normal working day looks like for your teams before you alert on them.

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.