# Migrating to a CI/CD Workflow

Panther does not support simultaneous use of the Console and CI/CD workflows to manage detection content. If you'd like to transition from managing detections in the Panther Console to managing them via a CI/CD workflow, and you have not yet cloned or forked the `panther-analysis` repo, follow the process below:

{% hint style="info" %}
This page explains how to perform an initial migration to the CI/CD workflow. If you already use CI/CD, and want to migrate away from using [Detection Packs](https://docs.panther.com/detections/panther-managed/packs) in the Panther Console, follow [this Knowledge Base article](https://help.panther.com/articles/9211266919-how-can-i-transition-to-using-panther-with-just-a-ci-cd-workflow-for-our-cloned-repo) instead.
{% endhint %}

### Step 1: Download content created in the Console

CI/CD overwrites anything included on upload, which includes rules, policies, global helpers, and data models. If you have created your own copy of Panther-managed enrichment provider helpers, global helpers or data models, you will need to download these as well.

There are two options available: Bulk-download all entities at once, or download entities individually:

{% tabs %}
{% tab title="Option 1: Bulk-download all entities" %}
When you use this option, you can download all detections, global helpers, saved searches, and data models from your Panther Console. Note that this download will include everything that is enabled (including Panther standard rules) and outputs every file under one folder. You will need to move files to the proper repository structure.

1. In the left-hand navigation bar of your Panther Console, click **Detections.**
2. In the upper-right corner, click **Upload**.
3. In the **Bulk Uploader** modal, click **Download all entities**.
   {% endtab %}

{% tab title="Option 2: Download entities separately " %}
**Download detections**

1. In the left-hand navigation bar of your Panther Console, click **Detections**.
2. Click the **Filters** icon. In the **Created by** filter, select **Created by team**.
3. Click **Apply Filters**.
4. Download each page of detections.
   1. Check the bulk **Select All** box in the upper-left corner of the list.
   2. At the top of the list, click **Download**.

The detections will be downloaded in a zip that you can incorporate into your version control system.

**Download helpers**

1. In the left-hand navigation bar of your Panther Console, click **Detections.**
2. Click the **Helpers** tab.
3. On the right side of a helper tile, click **...** then click **Download**.
4. Repeat for each separate helper.

**Download data models**

1. In the left-hand navigation bar of your Panther Console, click **Detections**.
2. Click the **Data Models** tab.
3. On the right side of a data model tile, click **...** then click **Download**.
4. Repeat for each separate data model.
   {% endtab %}
   {% endtabs %}

### Step 2: Enable the Developer Workflow option

To prevent Panther detection Packs from being enabled from the Console, self-declare as a developer workflow account:

1. In the Panther Console, navigate to **Settings > General**.
2. Click **Developer Workflow**.
3. Toggle the option to **ON** to disallow Panther Detection Packs from being enabled in the Console.\
   ![Under the "Developer Workflows" tab, there is an option called "We use the Panther Analysis Tool to manage our detections." There is a toggle switch next to it, which is enabled.](https://4011785613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-60e9b243341ee1b32f0d5b7fcea325dec2aed7a5%2Fread-only-users.png?alt=media)

### Step 3: Mark users as read-only

To prevent users from making edits in the Panther Console that may conflict with your source control, mark them as read-only:

1. In the Panther Console, navigate to **Settings > Users**.
2. In the user list, locate your developers who are using a CI/CD workflow.
3. Click **...** on the right side of a user tile. In the dropdown menu that appears, click **Edit**.
4. Change the user's role to Read Only.
5. Click **Update**.
6. Repeat these steps for each developer who is using a CI/CD workflow.

### Step 4: Set up your CI/CD workflow

* See either [Managing Panther Content via GitHub Actions](https://docs.panther.com/panther-developer-workflows/detections-repo/ci-cd/deployment-workflows/github-actions) or [Managing Panther Content via CircleCI](https://docs.panther.com/panther-developer-workflows/detections-repo/ci-cd/deployment-workflows/circle-ci) to set up your CI/CD workflow.
