starfort-guard
Inspects one text for personal data with the Starfort Guard API and emits the verdict, masked text and detections.
starfort-guard [profile=VALUE] [role=VALUE] text=VALUE
- profile=VALUE
- Optional. Starfort connect profile identifier. Required when more than one profile is available
- role=VALUE
- Optional. Message role: system, user or assistant. user by default
- text=VALUE
- Required. Text to inspect
Output Fields
| Field | Type | Name | Description |
|---|---|---|---|
| profile | String | Connect profile | Starfort connect profile identifier used. e.g. starfort |
| text | String | Text | Text that was inspected. e.g. 제 휴대폰 번호는 010-1234-5678 입니다. |
| action | String | Verdict | PASS, MASK or BLOCK. Null when no verdict was received. e.g. MASK |
| processed_content | String | Masked text | processed_content on MASK. e.g. 제 휴대폰 번호는 010-****-5678 입니다. |
| detected_items | List | Detected items | detected_items as maps of policy_name, rule_name, mask_word, matched_text, alert_message, action |
| mask_mappings | List | Mask mappings | mask_mappings as maps of seq, original_text, masked_text, mask_word, mode |
| request_id | String | Request ID | X-Request-ID response header. e.g. 7eced4e9-3bc4-44ea-965b-5a5ab5155850 |
| http_status | Integer | HTTP status | HTTP status of the guard call. e.g. 200 |
| latency_ms | Long | Latency | Guard call latency in milliseconds. e.g. 120 |
| error | String | Error | Error code and message when no verdict was received; action is then null. e.g. 217411: Starfort rejected the API key (HTTP 401). [API_KEY_INVALID] |