PII redaction
Detect and remove personal data before content crosses a trust boundary, returning usable scrubbed content only when a deterministic residual scan passes. Use for exports, prompts, logs, support material, or outbound handoffs that need a pass, review, or block verdict; it does not move content or handle credentials.
You’re reading version 0.2.9. Go to the current version
Overview
Treat the verdict as a boundary gate. Only ready returns content that may cross the boundary. needs_review and blocked return no residual content.
In the manual
Runner
redact-pii
Declared by its execution profile. Read the profile
SKILL.md
Redact PII
Treat the verdict as a boundary gate. Only ready returns content that may cross the boundary. needs_review and blocked return no residual content.
Procedure
- Resolve
mode:redact,tokenize, orblock. Resolve target classes fromclasses; omitted classes use the broad default policy. - Inspect the supplied content and return PII detections as class, UTF-16 code-unit span, and confidence. Never copy a matched value into the report or reasoning.
- Use semantic judgment for names, addresses, quasi-identifiers, and whether removal destroys meaning. Choose
needs_reviewwhen confidence is insufficient. - The deterministic finalizer validates spans and policy, performs the replacements itself, scans the residual for direct and obfuscated high-confidence identifiers, computes source and residual digests, and strips residual content unless the final decision is
ready. - A
blockpolicy always returnsblocked. This skill never sends, exports, logs, or stores content.
The finalizer, not the agent, owns replacement text and digests. redact emits [REDACTED:CLASS]; tokenize emits stable per-document [TOKEN:CLASS:N] placeholders. Invalid or overlapping spans fail closed.
Output
redaction_report:
decision: ready | needs_review | blocked
detected:
- class: string
span: [integer, integer]
confidence: number
source_digest: sha256:...
redacted_digest: sha256:... | null
residual_risk:
level: low | medium | high
reason_code: string
reason: string
scanner:
status: pass | hold | block
findings:
- class: string
span: [integer, integer]
rule: string
policy:
classes: array
mode: redact | tokenize | block
locale: string
redacted_content: stringScanner findings contain locations and rule names, never matched values. A clean scanner does not prove that semantic identifiers cannot exist; that uncertainty remains the reviewer agent's job and must produce needs_review when material.
Agent task contracts
redact-pii-detect
Inspect only the supplied content. Return redaction_draft with decision (ready, needs_review, or blocked), detected spans as class, UTF-16 start/end offsets, and confidence, plus residual_risk with level and reason_code. Never include matched values. Use reason_code none, ambiguous_semantics, scrubbing_destroys_meaning, policy_block, or insufficient_context. The deterministic finalizer owns all replacements, scanning, digests, and the final pass gate.
Published execution profile
The execution profile published with 0.2.9, shown as its exact bytes.
| Runner |
|
|---|---|
| Profile digest | sha256:5917dce12cc0b3f1900f92ddab025afb65abe8e017b90006ea24faf0ab8dc9d2 |
skill: redact-pii
version: "0.2.9"
catalog:
kind: graph
audience: public
visibility: public
category: security
role: canonical
execution: read
completion: runtime_receipt
approval: none
runners:
redact-pii:
default: true
inputs:
content:
type: string
required: true
description: Content to inspect and scrub before it crosses a trust boundary.
classes:
type: json
required: false
description: Personal-data classes to target; omitted classes use the broad default policy.
mode:
type: string
required: false
description: "Treatment to apply: redact, tokenize, or block. Defaults to redact."
locale:
type: string
required: false
description: Locale for semantic identifier and address judgment.
operator_context:
type: string
required: false
description: Boundary purpose and risk posture for the review pass.
result_from: [finalize]
steps:
- id: digest-source
tool: data.digest
inputs:
value: $input.content
encoding: utf8_text
- id: detect
label: detect personal-data spans and semantic risk
agent: { role: reviewer, task: redact-pii-detect }
outputs:
redaction_draft: object
inputs:
content: $input.content
classes: $input.classes
mode: $input.mode
locale: $input.locale
operator_context: $input.operator_context
artifacts:
named_emits:
redaction_draft: redaction_draft
- id: scrub
label: scrub and scan residual content
inputs:
content: $input.content
classes: $input.classes
mode: $input.mode
locale: $input.locale
redaction_draft: $steps.detect.redaction_draft
tool: { module: redact-pii.mjs, export: scrubRedaction }
outputs:
redaction_candidate: object
artifacts:
named_emits:
redaction_candidate: redaction_candidate
- id: digest-redacted
tool: data.digest
inputs:
encoding: utf8_text
value: $steps.scrub.redaction_candidate.redacted_content
- id: finalize
label: bind native content digests and release the report
inputs:
redaction_candidate: $steps.scrub.redaction_candidate
source_digest: $steps.digest-source.digest_result.digest
redacted_digest: $steps.digest-redacted.digest_result.digest
tool: { module: redact-pii.mjs, export: finalizeRedaction }
outputs:
redaction_report: object
redacted_content: string
artifacts:
named_emits:
redaction_report: redaction_report
packets:
redaction_report: runx/redact-pii.report.v1
harness:
files: [fixtures/support/composed.graph]
cases: []
Published package and test evidence.
This exact version passed its recorded harness run: 8 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | 0.2.9 |
| Recorded result | 8 checks passed · 0 failed |
| Result source | Run by the Runx registry at publication |
| Suite | runx-harness |
| Test recorded | |
| Test record | Open the recorded run |
Inspect receipt references
sha256:2b494402395c44330f4cbd3c4bccc6708505745007d24819093703da06212521sha256:1609c1f7720684291229beb6ab01b88b5b120c3d5b65284b9bdb85efd155ac7asha256:a3b8777cedcc63d0a36901dae7cf2168d431bd7292d5bd8067025765445fd1a0sha256:1928dfda4559553da5dc11cedc0c33b4f566c36b780428aea1be402a63a05e92sha256:4dbd7369e812201cb6156b09842a53bd4ec27d85826da12c9acbf081701f524csha256:fda622117c3a4f0d9ad2b0910d0cc31e8c73e27d520bb4d878ddd301e54cf522sha256:88689f60860b0b59255275e8e5e2c234f549a058265fde02d6491bcff06fe190sha256:9fec2a7ad4d1b32cadc1f4fd08226e65db83836148257cd37eb56f339bac12a9Package identity
| Published revision | 0.2.9 |
|---|---|
| Content digest | sha256:357840d62d46c0d7a0bf50a61f4c6c1b99f3ad4ed2274d6aa718782434b2732b |
| SKILL.md digest | sha256:2358e19a81b07f70bdefee629290d7d132592b8b9f6491abedd44d4bf6837810 |
| Execution profile digest | sha256:5917dce12cc0b3f1900f92ddab025afb65abe8e017b90006ea24faf0ab8dc9d2 |
| Publisher identity | Verified publisher · runx |
| Trust tier | Verified publisherRunx has verified this publisher. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
0.2.9ViewingContent digest sha256:357840d62d46c0d7a0bf50a61f4c6c1b99f3ad4ed2274d6aa718782434b2732bsha-98784c6f80ebContent digest sha256:98784c6f80eb33d1e3cc01361c23c06985fa2638d4ad9c0006392965f9d0e37csha-f71c81dc3652Content digest sha256:f71c81dc3652f0b7c6c3660a334e20c70adc1a2dd269121823043193c13cd204sha-a18ddc727757Content digest sha256:a18ddc7277578ffdff1cbe0e7d41abb2492f20e8bbac6d4c4493d6c77c5bdbefsha-f97e8d8ca9c0Content digest sha256:a13f11dbb4cdb8f86aaa0726fb73e0cc46188ba9d0d4cec4224decac3b291d9bsha-41876f48480eContent digest sha256:b0df134d4dbe8cd146cf14c5a5d81ceda97169165713ff97b216d4e934286797sha-f6eadd67ff10Content digest sha256:5f16b19c30aa125825dce6047f55bf6b02118dc95403d4a4c975262fd6b94332