SDK Options, Settings and Returned Types

sensitivity.io configuration settings are specified in the Settings file. You can modify the settings file yourself or you can download it from the Control Panel.

All the settings in the Settings resource are validated by having that specific feature enabled and valid in your License

These settings apply to the scanning engine and are global

Maximum File Size

The maximum file size the scanning engine will scan, in Bytes.

Valid options:

  • 0 - disabled, will scan any size
  • 2048 - will scan files that are smaller than 2048 bytes.
1
2
3
4
5
6
7
{
  "settings" : {
    "text_extractor" : {
      "max_file_size" : 2048
    }
  }
}

Note

This value applies to a single file, for now.

Correct: 2048 or 0

Incorrect: 10MB

Settings option is max_file_size with integer value

Maximum Recursion Level

The maximum recursion level to search inside archives (useful to avoid zip bombs).

Supported file types are: compound document format based files (doc, xls, ppt), PDF, office open XML files (.docx, .xlsx, .pptx) and ZIP archives.

Valid options:

  • 3 - maximum recursion level allowed in sensitivity.io DLP Scanning Engine.
1
2
3
4
5
6
7
{
  "settings" : {
    "text_extractor" : {
      "max_recursion_level" : 3
    }
  }
}

Note

This value applies to a single file, for now.

Correct: 2, 3, 4, 5, 6, 7 or 8

Incorrect: < 2 or > 8

Settings option is max_recursion_level with integer value

Extract Metadata

For supported file types, you can extract content also from Metadata/File Properties

Supported values:

  • true
  • false
1
2
3
4
5
6
7
{
  "settings" : {
    "text_extractor" : {
      "extract_metadata" : true
    }
  }
}

Note

This value applies to a single file, for now.

Settings option is extract_metadata with boolean value

Stop at first

You can instruct the engine to stop after the first threat is found. You have to pass this boolean argument to the scanning functions

Examples:

ScanString(kStringToScan, true);

ScanFile(kFileToScan, false);

Option is available only when calling the scanning functions

Enable Threat Handler

You can instruct the engine to listen to an external Threat Handler, written in your code. Our API supports handlers for C, C++, Java, PHP, Go or whatever your language is.

This feature provides a lot of flexibility for your application and you can implement your logic for the scanning engine, when and how to stop scanning inside a resource.

The Threat Handler must return false if you want to stop the scanning job on the resource.

Examples:

ScanFile(kStringToScan, testThreatHandler);

ScanFile(kFileToScan, testThreatHandler);

Option is available only when calling the scanning functions

Returned Sensitive Data Types

Returned values from SDK are in Italic

  • e-mail // Email

  • date // Date

  • iban // IBAN

  • dictionary - Description: Dictionary Name

  • regular-expression/``regexp_name`` - Description: Dictionary Name

  • address // Address
    • address/us
    • address/de
  • credit-card // Credit Card
    • Description: MASTERCARD
    • Description: VISA
    • Description: AMEX
    • Description: DISCOVER
    • Description: DINERS_CLUB
    • Description: JCB
    • Description: CHINA_UNIONPAY
    • Description: MIR
    • Description: MAESTRO
  • ssn // Social Security Number
    • ssn/at
    • ssn/ca
    • ssn/ch
    • ssn/de
    • ssn/es
    • ssn/fr
    • ssn/gb
    • ssn/jp
    • ssn/kr
    • ssn/nl
    • ssn/pl
    • ssn/ro
    • ssn/tw
    • ssn/us
    • ssn/lu
    • ssn/cy
    • ssn/hu
  • health-insurance // Health Insurance Number
    • health-insurance/au
    • health-insurance/gb
    • health-insurance/kr
  • id (ID Card)
    • id/be
    • id/br
    • id/cn
    • id/cz
    • id/de
    • id/fi
    • id/hk
    • id/id
    • id/kz
    • id/mo
    • id/pl
    • id/se
    • id/sg
    • id/tr
    • id/za
    • id/th
    • id/dk
    • id/cl
    • id/bg
    • id/hr
    • id/ee
    • id/lt
    • id/no
    • id/is
    • id/pt
    • id/lv
    • id/it
    • id/al
    • id/pe
    • id/yu
  • passport // Passport
    • passport/cn
    • passport/gb
    • passport/hk
    • passport/jp
    • passport/kr
    • passport/mo
    • passport/fr
    • passport/fi
    • passport/kr
    • passport/ie
  • phone-number // Phone Number
    • phone-number/cn
    • phone-number/hk
    • phone-number/jp
    • phone-number/kr
    • phone-number/mo
    • phone-number/tr
    • phone-number/de
  • tax-id/ // Tax ID
    • tax-id/it
    • tax-id/pl
    • tax-id/us
    • tax-id/pe
    • tax-id/intl
  • vat-number // VAT Number
    • vat-number/de
    • vat-number/gr
    • vat-number/it
    • vat-number/fi
    • vat-number/lu
    • vat-number/ie
    • vat-number/si
    • vat-number/pl
  • driving-license // Driving License
    • driving-license/kr
    • driving-license/it
  • frn/kr // Foreign Registration Number