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 sha-f71c81dc3652. 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

  1. Resolve mode: redact, tokenize, or block. Resolve target classes from classes; omitted classes use the broad default policy.
  2. 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.
  3. Use semantic judgment for names, addresses, quasi-identifiers, and whether removal destroys meaning. Choose needs_review when confidence is insufficient.
  4. 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.
  5. A block policy always returns blocked. 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

yaml
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: string

Scanner 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 sha-f71c81dc3652, shown as its exact bytes.

Runner
  • redact-pii
Profile digestsha256:81b1c84fbed00e9125da4a736b2f61045113fbdd2fa28ff621c3b55bfcb8c5a5
skill: redact-pii
version: "0.2.7"
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.redaction.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 resultPassed
Tested versionsha-f71c81dc3652
Recorded result8 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Test recordOpen the recorded run
Inspect receipt referencessha256:11f6c2b49eef7b41d638f9694de7ea79e11efec35dbf00b7d4ee79a8200bf7c0sha256:8f8a89ee7c46b534d159fc5718f529232851768bc8a6acedf0005ee231bcd972sha256:3e6e30f2b2c24e062c1bdbb1fbd3c501cf91323e930a830296b650b924d0ac2esha256:5eca4b9c151a1b2a508ba5f94472858d55df55a76f215b33ae297b09fc46f05asha256:1aecf53b17fc934960cc7ce67bde8e26d2fc86d5528918f1217c62a6f9821b3asha256:39db5e0c2aad5c7ae524496557bf1c4985bf7e805c1521e547722ae91baf638csha256:b2a0d13c52d39242fecdff587fb371da26d85f4ed97530d1ae40f595cca40b8asha256:1fd0bd79a307c6de8f05a79340f0397fd50400fd644294e58f7418189ad6c448

Package identity

Published revisionsha-f71c81dc3652
Content digestsha256:f71c81dc3652f0b7c6c3660a334e20c70adc1a2dd269121823043193c13cd204
SKILL.md digestsha256:2358e19a81b07f70bdefee629290d7d132592b8b9f6491abedd44d4bf6837810
Execution profile digestsha256:81b1c84fbed00e9125da4a736b2f61045113fbdd2fa28ff621c3b55bfcb8c5a5
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 17 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.2.9Content digest sha256:357840d62d46c0d7a0bf50a61f4c6c1b99f3ad4ed2274d6aa718782434b2732b
  2. sha-98784c6f80ebContent digest sha256:98784c6f80eb33d1e3cc01361c23c06985fa2638d4ad9c0006392965f9d0e37c
  3. sha-f71c81dc3652ViewingContent digest sha256:f71c81dc3652f0b7c6c3660a334e20c70adc1a2dd269121823043193c13cd204
  4. sha-a18ddc727757Content digest sha256:a18ddc7277578ffdff1cbe0e7d41abb2492f20e8bbac6d4c4493d6c77c5bdbef
  5. sha-f97e8d8ca9c0Content digest sha256:a13f11dbb4cdb8f86aaa0726fb73e0cc46188ba9d0d4cec4224decac3b291d9b
  6. sha-41876f48480eContent digest sha256:b0df134d4dbe8cd146cf14c5a5d81ceda97169165713ff97b216d4e934286797
  7. sha-f6eadd67ff10Content digest sha256:5f16b19c30aa125825dce6047f55bf6b02118dc95403d4a4c975262fd6b94332