mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-08-28 08:20:25 +02:00
Read the InvisMark soft-binding algorithm and its signed watermark id
Reachable c2pa.soft-binding assertions now surface their exact alg and the bounded printable block value next to the normalized vendor label; a value without its algorithm stays hidden because it cannot be attributed. com.microsoft.invismark.1 uses that value as the pixel-watermark identifier in Microsoft Paint output, so identify names it, metadata carries it, and an InvisMark soft binding keeps the invisible-removal gate fail-safe even after C2PA asset binding goes invalid. Content fingerprints still do not trigger pixel regeneration. Removal is verified against Microsoft's Content Provenance Detection API, which reports Watermark and C2PA separately; the protocol and the pixel-identical control requirement are documented. Implemented in a parallel session; verified, gated, and committed by pi. pre-commit: 1) maintain.sh - exit 1 on the known uv-secure lightning PYSEC-2026-3624 triage (no fix available, unchanged from 0.29.0); ruff, pyright src/, and 1391 tests passed separately; 2) /simplify - single-pass, clean; 3) docs sync - five docs updated by the author session, no remaining references found; 4) CLAUDE.md - invariants recorded in module-internals, no change needed
This commit is contained in:
@@ -1144,6 +1144,36 @@ class TestIdentifySoftBinding:
|
||||
assert any("Digimarc" in w for w in r.watermarks)
|
||||
assert any(s.name == "soft_binding" for s in r.signals)
|
||||
|
||||
def test_invismark_signal_lists_signed_watermark_id(self, tmp_path: Path):
|
||||
watermark_id = "83424621-03cb-40e3-9808-a9fae837156d"
|
||||
record = {
|
||||
"c2pa_store": {
|
||||
"active_manifest": "paint",
|
||||
"manifests": {
|
||||
"paint": {
|
||||
"assertions": [
|
||||
{
|
||||
"label": "c2pa.soft-binding",
|
||||
"data": {
|
||||
"alg": "com.microsoft.invismark.1",
|
||||
"blocks": [{"scope": "the entire image", "value": watermark_id}],
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
evidence = evidence_from_metadata_record(record, path=tmp_path / "paint.png")
|
||||
|
||||
report = identify_from_evidence(evidence)
|
||||
|
||||
assert evidence.ai_metadata["soft_binding_value"] == watermark_id
|
||||
signal = next(signal for signal in report.signals if signal.name == "soft_binding")
|
||||
assert "com.microsoft.invismark.1" in signal.detail
|
||||
assert watermark_id in signal.detail
|
||||
assert any("may remain in the pixels" in caveat for caveat in report.caveats)
|
||||
|
||||
|
||||
class TestIdentifyIptcAi:
|
||||
"""IPTC 2025.1 AISystemUsed drives an AI verdict + platform attribution."""
|
||||
|
||||
Reference in New Issue
Block a user