redact_file
Redacts PII and secrets in a local file in place, replacing them with tokens and saving the file; optionally creates a backup or runs a dry run to preview changes.
Instructions
Action/Redact: In-place redaction of a local file. Replaces PII and secrets with tokens and saves the file. By default, creates a .bak backup. Use dry_run=true to test without modifying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sector | No | Optional alias for 'profile'. The industry sector or compliance vertical to apply (e.g. 'medical', 'finance', 'legal', 'dev', 'hr', 'accounting', 'security', 'compliance', 'underwriting', 'telecom'). | |
| dry_run | No | If true, does not modify the file, only returns the metrics and a preview. | |
| profile | No | The detection profile to use. Available: 'General' (Free, 15,000 chars), or 30 specialized industry profiles (5,000 chars Free trial quota; unlimited on PRO/TEAMS/SDK): 'Dev' (Engineering/Code), 'Medical', 'Pharma', 'Biotech', 'Telecom', 'Legal', 'Compliance', 'CCPA', 'Finance', 'Bizops', 'Sales', 'WealthMgmt', 'Insurance', 'Accounting', 'Underwriting', 'Automotive', 'Energy', 'Hospitality', 'HR', 'Security', 'Marketing', 'Support', 'RealEstate', 'Agents', 'Academic', 'Creative', 'Tech', 'Personal', 'Engineering'. Defaults to 'General'. | |
| file_path | Yes | Absolute path to the file to redact. | |
| no_backup | No | If true, does not create a .bak file. Use with extreme caution! |