Quickstart
About Sanitize
Pangea’s Sanitize service allows you to analyze and clean potentially harmful files, removing any actionable or potentially harmful content and links. In addition to customization options for content removal, your Pangea User Console also offers the ability to sync with our other services such as Secure Share for enhanced file security.
To provide a complete demonstration, the example code in this quickstart guide uses parameters that override settings which can be configured by an Admin in the Settings menu of the Pangea user Console (e.g. scan_provider, cdr_provider, defang options, etc.). For the most flexibility, we recommend to not override these settings in API calls, allowing an Admin to change them without the need to alter any deployed code.
You can find the latest examples in the SDK repo.
The current (Beta) version of Sanitize has the following limitations:
-
The service is only available for organizations hosted on Amazon (AWS).
-
Only PDF files are supported.
-
The recommended maximum file size is 5 MB.
For files with attachments/media, testing is allowed up to 15 MB. Files exceeding 5 MB with extensive text and numerous URLs may not process successfully.
-
By default, the sanitized output is available for download at the location returned in
result.dest_url
. The download URL is valid for one hour.Alternatively, you can save the results of sanitization in Secure Share.
-
For more information regarding pre-signed URLs and transfer methods used by the Sanitize service, you can visit our Transfer Methods page
Configuring the Sanitize service
These steps are an overview of how to configure Sanitize for your application. For a complete set of step-by-step instructions, refer to our Overview page.
- Navigate to the Pangea User Console .
- Sign up to Pangea. As part of the sign up process, an Organization and initial token will be created.
- Configure the token for use with the Sanitize service.
- Set any desired settings in the Sanitize Settings page.
Add Sanitize to your app
The steps below will walk you through the basics of getting started with Sanitize and how to integrate the service with a Python app, including a completed code sample for applying file sanitization according to specified rules. For more information regarding the sample app, you can visit our Python SDK.
Set your environment variables
Before starting to code, it is necessary to export your token and domain variables to your project if you have not already added them to your environment.
- Open up a bash terminal window.
- Type the following commands, replacing 'yourServiceDomain' and 'yourAccessToken' with your Domain and Default Token copied from the Sanitize page of your Pangea User Console.
export PANGEA_DOMAIN="yourServiceDomain"
export PANGEA_SANITIZE_TOKEN="yourAccessToken"