Skip to content
Back to skills

Mutation Check

ASecurity

Run the Swift host fault-injection check (scripts/swift-host-fault-injection.py) for changed security-relevant isolate behavior and keep its fault list synchronized. Use when security-relevant host logic changes, before refactors of it, or when asked to verify that tests bite.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 11, 2026
ai-agentspythonrustswiftshelltestingsecurity

Security analysis

A100/100

Scanned November 21, 2026

npx -y skills add chr33s/iso --skill mutation-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mutation Check?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mutation Check
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chr33s-mutation-check/badge)](https://www.skillsdirectory.com/skills/chr33s-mutation-check)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mutation-check
description: Run the Swift host fault-injection check (scripts/swift-host-fault-injection.py) for changed security-relevant isolate behavior and keep its fault list synchronized. Use when security-relevant host logic changes, before refactors of it, or when asked to verify that tests bite.
---

<!--
Derived from trailofbits/coop.
Modified by chr33s: ported/adapted for the Swift implementation.
SPDX-License-Identifier: Apache-2.0
-->


# Mutation Check (fault injection)

Fault injection replaces mutation testing for the Swift host. Read the
[fault-injection section of `docs/testing.md`](../../../docs/testing.md#fault-injection)
first.

1. Inspect the diff before running. A change that adds or alters
   security-relevant host behavior — untrusted or user-edited input parsing,
   credential handling, argv/environment construction, path/symlink checks,
   host-key pinning, ownership/lock/atomic-write checks, process cleanup,
   update verification — needs a `FAULTS` entry in
   `scripts/swift-host-fault-injection.py` in the same PR: an id, the
   production file, the exact original text, a replacement that removes the
   behavior, and the `swift test` filter that must catch it.
2. When the diff edits code an existing fault targets, update that entry's
   original text; a missing anchor fails the run.
   `python3 scripts/swift-host-fault-injection.py --check-anchors` checks
   every anchor in seconds without building (CI runs it on every push).
3. Run the affected faults, redirecting output to a file (do not pipe a long
   run through `head` or `grep`):
   `python3 scripts/swift-host-fault-injection.py --only <id>`, or the whole
   list when many are touched. The script runs a clean control first and
   counts a fault as detected only when a test runs and fails.
4. Triage survivors: add or sharpen a discriminating test for a real gap,
   choose a fault that actually removes the behavior when the replacement was
   equivalent, and delete dead code. A fault that only breaks compilation
   proves nothing; rewrite it.
5. Report faults added/changed/run, detected vs. survived, every survivor's
   disposition, and whether the fault list changed.

Code that only shells out, runs SSH, or talks to external services is not a
fault-injection target by itself; identify the unit/integration blind spot
explicitly and test extracted pure decision logic directly. For
`iso-proxy/` policy code use its Muter sweep and
`scripts/test-swift-proxy-mutations.py` instead.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.