Repository navigation
v1.2.1
Overview
Tanuki v1.2.1 introduces deterministic semantic exit codes and machine-readable structured JSON error contracts across both Python and Rust engines. This update enables automated AI agent pipelines and DevOps operators to distinguish between policy guardrail stops, missing assets, parse corruptions, and usage errors without parsing conversational text.
Key Enhancements
1. Deterministic POSIX Semantic Exit Codes
Process exit codes are now standardized across both Python and Rust CLI entrypoints:
0(EXIT_SUCCESS): Command completed successfully or pre-flight diagnostic passed.1(EXIT_USAGE_ERROR): Invalid CLI options, missing required arguments, or unknown subcommands.2(EXIT_POLICY_STOP): Security policy or operational guardrail refusal (e.g. world-readable keytab permissions0644/0666, lowercase realm definitions, unconstrained delegation).3(EXIT_RESOURCE_MISSING): Target keytab file, SSSD socket, or credential cache not found on the filesystem.4(EXIT_PARSE_FAILURE): Corrupted ASN.1/RFC 4120 binary structures, invalid header magic, or truncated ticket streams.
2. Machine-Readable JSON Error Envelope
When invoked with --json, any error or policy refusal emits a structured JSON object to standard output:
{
"status": "REFUSED",
"reason_code": "INSECURE_PERMISSIONS",
"category": "POLICY_STOP",
"exit_code": 2,
"message": "Keytab file '/etc/krb5.keytab' has insecure permissions (0644). Secure mode requires 0600.",
"target": "/etc/krb5.keytab",
"details": "Mode 0644 allows non-privileged accounts to read Kerberos principal keys."
}For non-JSON invocation, errors continue to stream formatted diagnostic banners to standard error ([POLICY STOP], [RESOURCE MISSING], [PARSE FAILURE], [USAGE ERROR]).
3. Dual-Engine Parity
- Full functional parity maintained between the lightweight Python engine (
tanuki) and the compiled Rust systems core (tanuki-cli). - Both implementations share identical exit code integers, reason codes, and JSON schemas.
4. Empirical Verification & Packaging
- 315 automated unit and regression tests passing with 100% pass rate.
- Automated GitHub Actions CI workflow executed and verified across Python 3.10, 3.11, 3.12, container publishing to GitHub Packages (GHCR), and release package generation.
- Python wheels (
.whl) and source tarballs (.tar.gz) attached to this release.
Assets Attached
tanuki-1.2.1-py3-none-any.whl: Standard Python wheel.tanuki-1.2.1.tar.gz: Source distribution package.
Lineage & Pioneer Attributions
- Tim Brown (
@timb-machine): Linikatz post-exploitation tradecraft pioneer. - Dietrich Gebert (
@dietrichayala): Ponytail decision ladder methodology pioneer.