Skip to content

v0.5.8 — Deepfake & document guard, Permissive Fortress governance, web_form_mapper, and native async parity

Latest

Choose a tag to compare

@rosspeili rosspeili released this 07 Oct 13:28

Skillware 0.5.8 expands the defense-in-depth and enterprise automation surface for autonomous agents: the new air-gapped security/deepfake_guard for media forensics, C2PA provenance, and ICAO 9303 passport/ID check digit verification; the Permissive Fortress supply-chain governance architecture and sandboxed credential_fn runtime; automated web form automation with office/web_form_mapper (preserving CSRF tokens and __VIEWSTATE); native async execution parity (aexecute, arun_chain, concurrency limits); and core manifest loading consolidation.

Install: pip install skillware==0.5.8 or pip install -U skillware or just pip install skillware

Update from 0.5.7: pip install -U skillware


Added

security/deepfake_guard v0.1.0 (#48, #418)

  • Air-Gapped Media & Document Authenticity Guard: Hard-offline forensic verification engine protecting autonomous agents and KYC pipelines against deepfakes, synthetic media, digital tampering, and forged identity documents without third-party cloud APIs.
  • ICAO 9303 Check Digit Validation: Computes cyclic (7, 3, 1) modulo-10 check digits across TD1 (ID cards/residence permits), TD2, and TD3 (passports) to detect forged numbers, altered expiration dates, and manipulated birth dates.
  • ISO/IEC 7810 ID-1 Geometry Verification: Validates aspect ratio conformity (~1.586 ± 5%) for national ID cards and driver licenses.
  • 2D FFT Moiré Screen Recapture Detection: High-frequency 2D Fast Fourier Transform peak ratio analysis detecting screen raster grids when an attacker photographs an LCD/OLED monitor displaying an ID.
  • C2PA Content Credentials & AI Provenance: Parses JUMBF boxes, digital watermarks, generative AI metadata tags (trainedAlgorithmicMedia, Midjourney, ComfyUI, DALL-E, Stable Diffusion), and photo editing markers (Photoshop, GIMP).
  • Deterministic Signal Processing Forensics:
    • Error Level Analysis (ELA): Measures differential JPEG recompression error variance across tiles to uncover digitally spliced elements.
    • Laplacian Noise Residual Variance with MAD: High-pass filtering combined with Median Absolute Deviation ($\text{MAD} = \text{median}(|x - \text{median}(x)|)$) across tiles to robustly isolate sensor noise from natural high-contrast textures (hair, knitwear) and flag foreign spliced patches.
    • Copy-Move Forgery Detection: 16×16 spatial block-matching hash indexing to catch cloned pixels concealing text or facial features.
    • Radial Spectral Slope Decay: Azimuthally averaged power spectrum slope calculation identifying anomalous high-frequency falloff characteristic of diffusion models.
  • Flexible Entry Points: Accepts local file paths (image_path), in-memory base64 payloads/data URIs (image_base64), public URLs behind strict SSRF filtering (url), or raw MRZ text strings (mrz_string).
  • Examples & Tooling: examples/deepfake_guard_demo.py and cross-skill KYC pre-flight chaining in examples/kyc_authenticity_chain_demo.py.

Permissive Fortress Governance & Supply-Chain Hardening (#413, #414)

  • Repository & Supply-Chain Defense-in-Depth under MIT: Established comprehensive legal and operational protections in CONTRIBUTING.md — inbound Legal notice and code ownership terms (irrevocable license grant, non-revocability, patent non-assertion, strict prohibition on malicious logic, backdoors, or exfiltration), PR template confirmation checkbox, and strengthened CODE_OF_CONDUCT.md enforcement authority.
  • Pluggable Credential Sandboxing: Added credential_fn callable support in BaseSkill.__init__ and BaseSkill.credential(key) allowing host applications to inject custom secret resolution callables per skill instance without polluting process-global os.environ.
  • CI AST Security & Dependency Audit Pipeline: Added .github/workflows/security.yml executing automated AST security scans (bandit -r skillware skills -lll), dependency vulnerability audits (pip-audit), anti-obfuscation linting (ruff), and static type checks (mypy).
  • Anti-Obfuscation Test Suite: Added tests/test_security_audit.py enforcing zero dynamic code execution primitives (eval(), exec(), compile()) and prohibiting raw os.environ secret reads across all registry skills.

office/web_form_mapper v0.1.0 (#45, #410)

  • Universal Web Form Mapper & Submitter: Automated form discovery, input field extraction, operator address book legal_profile mapping, preview diffs, and confirmation-gated HTTP POST dispatch.
  • State & Token Preservation: Automatically preserves hidden input fields, CSRF protection tokens, and ASP.NET __VIEWSTATE invariants.
  • Fail-Closed Bot Challenge Detection: Inspects HTML for CAPTCHAs, Cloudflare Turnstile, reCAPTCHA, and hCaptcha, safely halting automation with status: "needs_input" before submitting.
  • Examples: examples/web_form_mapping_demo.py and pre-flight dark pattern scanning chain in examples/web_form_guard_chain_demo.py.

Native Asynchronous Execution Parity (#18, #409)

  • Async Skill Execution: Native BaseSkill.aexecute() on all skills with non-blocking default fallback via asyncio.to_thread, bidirectional sync/async bridging, and per-call timeout enforcement.
  • Async Multi-Skill Context: SkillContext.aexecute() and SkillContext.acall() with semaphore-backed concurrency throttling via SkillContext(max_concurrency=N).
  • Async Named Chains: skillware.chains.arun_chain() supporting deterministic step execution, conditional when: evaluation, parameter remapping, and chain-level timeouts without blocking the host event loop.
  • Async Concurrency Stress Tests: Added tests/test_async_execution.py and tests/test_async_concurrency_stress.py.

Changed

  • Skill (compliance/mica_module v0.1.2): Statutory knowledge notice — catalog callout, directive and constitution framing, statutory_snapshot on execute output and card UI; documents offline snapshot cutoff (Regulation (EU) 2023/1114) as informational reference, not formal legal counsel (#397, #411).
  • Templates: Modernized templates/python_skill/ starter bundle with dynamic manifest loading, parameter validation, aligned card UI schemas, and updated documentation (#395).
  • Docs: Added clone dev setup guide for dedicated venv, editable vs PyPI wheel installs, and recovery diagnostics in docs/TESTING.md (#232, #401).
  • README & Catalog: Sorted category tables by skill count descending (alphabetical for ties); updated Security category count to 3 skills.
  • Packaging Extras: Added security_deepfake_guard = ["pillow", "numpy"] and updated security union extras in pyproject.toml.
  • Supported-version policy: >= 0.5.8 supported and patched; 0.4.6 – 0.5.7 silent; < 0.4.6 unsupported advisory emitted.

Fixed

  • Core / Stub Skills: Migrated stub skills (compliance/mica_module, compliance/pii_masker, data_engineering/novelty_extractor, optimization/prompt_rewriter) to shared BaseSkill.load_manifest_from_dir() helper instead of hardcoded metadata dicts (#203, #383).
  • Skill (office/pdf_form_filler v0.1.1): Loaded bundle helpers once at module level (pdf_form_filler_utils) instead of mutating sys.path on every execute() invocation (#398, #399).

What's possible today

1. Air-Gapped KYC & Media Authenticity Verification (security/deepfake_guard)

from skillware.core.loader import SkillLoader

bundle = SkillLoader.load_skill("security/deepfake_guard")
skill = bundle["class"]()

# Validate passport MRZ with ICAO 9303 check digits
result = skill.execute(
    action="validate_mrz",
    mrz_string=(
        "P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<\n"
        "L898902C36UTO7408122F1204159ZE184226B<<<<<10"
    ),
    expected_document_type="passport",
)

print(result["verdict"])     # "authentic_likely"
print(result["mrz_valid"])   # True
print(result["summary"])     # "ICAO 9303 MRZ checksums valid for UTO P."

2. High-Throughput Async Multi-Skill Concurrency

import asyncio
from skillware import SkillContext

async def main():
    # Throttle concurrency across workers while preserving non-blocking event loop
    ctx = SkillContext(skills=["security/deepfake_guard", "compliance/pii_masker"], max_concurrency=4)

    tasks = [
        ctx.aexecute("security/deepfake_guard", {"action": "validate_mrz", "mrz_string": mrz})
        for mrz in passport_batch
    ]
    results = await asyncio.gather(*tasks)
    print(f"Processed {len(results)} identity documents concurrently.")

asyncio.run(main())

3. Pre-Flight KYC & Document Authenticity Gate Chain

[Untrusted KYC Document Upload]
                │
                ▼
`security/deepfake_guard` (verify ELA, sensor noise consistency & ICAO 9303 check digits)
                │
        ┌───────┴───────┐
   [Not Authentic]  [Authentic]
        │               │
        ▼               ▼
[Halt & Reject]   `compliance/pii_masker` (mask PII before routing to downstream host agents)
                        │
                        ▼
                  `office/web_form_mapper` (map verified profile to onboarding portal)

Upgrade notes

  • Version Bump: Run pip install -U skillware to upgrade to 0.5.8.
  • Optional Extras: Install deepfake guard dependencies with pip install "skillware[security_deepfake_guard]".
  • EVM & Address Book: The shared EVM operator config (skillware evm) and address book (skillware addressbook) introduced in 0.5.7 remain fully compatible.
  • Citing: Zenodo concept DOI 10.5281/zenodo.21552745 remains stable; record Skillware 0.5.8 for reproducibility (CITATION.cff updated).

Full changelog

CHANGELOG.md — 0.5.8


Contributors

Thanks to everyone who contributed to this release:

  • @rosspeili — security/deepfake_guard v0.1.0 air-gapped media & document authenticity guard (#48, #418), Permissive Fortress architecture & governance hardening (#413, #414), office/web_form_mapper v0.1.0 skill (#45, #410), native async execution parity for skills and chains (#18, #409), modernize python_skill starter template (#395), release cut
  • @bd-c3 — statutory knowledge notice on MiCA module (#397, #411), clone dev setup guide for editable vs PyPI install (#232, #401)
  • @Achalnawal2745 — shared BaseSkill.load_manifest_from_dir() helper and stub skill manifest migration (#203, #383)
  • @cx742296960, @Bdysj — office/pdf_form_filler helper imports refactoring without mutating sys.path (#398, #399)

Citation

Zenodo concept DOI: 10.5281/zenodo.21552745 — record Skillware v0.5.8 for reproducibility (CITATION.cff updated).