> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/risk-management/threat-model-coverage/encryption-key-sharing/google-drive-playbooks-for-encryption-key-sharing.md).

# Google Drive playbooks for encryption key sharing

To prevent external actors who aren't in your trusted domains from uploading encryption keys to Google Drive, you can customize automated workflows to notify your security team whenever encryption keys are uploaded to Google Drive.&#x20;

{% hint style="info" %}
DoControl detects encryption keys as files having encryption file extensions, or containing cryptographic private key patterns.
{% endhint %}

## Notify when external user uploads encryption keys

1. In Workflows, select **Playbooks**.
2. Filter the playbooks according to the Encryption key sharing category, and select the **Notify when external user uploads encryption key** playbook.
3. Give the workflow a description.
4. The **Upload** event is automatically populated with the condition: **Actor is not from a trusted domain**.<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2Fnw95nc1vkMvEwlwHTJBy%2FGoogle%20encryption%20keys.png?alt=media&amp;token=daaa9a3c-412f-42c1-87ef-b5d9ea6ea153" alt=""><figcaption></figcaption></figure></div>
5. Add any relevant conditions.
6. The **Conditional** action is pre-populated to determine if the file contains an encryption file extension:
   * If **true** - Customize the **Notify in Slack** action to notify the SecOps team that an external actor uploaded an encryption key to Google Drive.
   * If **false** - The **Regex scan** action is pre-populated to scan the file for a cryptographic private key pattern. Customize the error handling step.
7. Another **conditional** action is pre-populated to determine if regex matches were found:
   * If **true** - Customize the **Notify in Slack** action to notify the SecOps team that an external actor uploaded an encryption key to Google Drive
   * If **false** - End the workflow.

{% hint style="success" %}
You can also add remediation actions to your Google Drive workflow to mitigate the risk of exposed encryption keys:

* To remove public sharing from encryption files that were publicly shared in Google Drive, see [Remove public sharing](/docontrol-user-guide/workflows/define-workflow-settings/action-settings/remediate/google-drive-remediation.md#remove-public-sharing).
* To delete sensitive files containing encryption files that were uploaded to Google Drive, see [Delete file](/docontrol-user-guide/workflows/define-workflow-settings/action-settings/remediate/google-drive-remediation.md#delete-file).
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/risk-management/threat-model-coverage/encryption-key-sharing/google-drive-playbooks-for-encryption-key-sharing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
