Generated with the help of an LLM, reviewed and approved by me before posting.

Problem/Motivation

When a later tool re-signs a file, CredentialInspector::inspect() returns the types of the active manifest only. The AI origin recorded earlier, in the ingredient manifest, is lost and no suggestion is made.

Steps to reproduce

  1. Upload an image derivative signed by c2pa_sign. Its active manifest has a c2pa.created action with digitalSourceType trainedAlgorithmicMedia. inspect() returns it and a Pending suggestion is queued.
  2. Upload the same file with c2pa_sign "Assert that files were uploaded" on. c2pa_sign re-signs it. The new active manifest has only c2pa.opened and c2pa.creativeWork. The trainedAlgorithmicMedia action is in the parentOf ingredient.
  3. inspect() returns {"isTrusted":true,"digitalSourceTypes":[],"signer":"C2PA Signer"}. No suggestion, nothing logged.

Proposed resolution

Could the digitalSourceType of a parentOf ingredient count when the active manifest has none? Or log a notice when a trusted manifest has no type, so the case is visible.

Found while testing the round trip with ai_disclosure. Drupal 11.4, 1.0.x-dev at 05e9424, c2pa_sign 1.4.11, c2patool 0.9.12.

Comments

sjpagan created an issue. See original summary.

  • maurice1969 committed b4ea0de5 on 1.0.x
    Issue #3629737 by maurice1969: SPEC 018 — log a trusted manifest that...

  • maurice1969 committed b4ea0de5 on main
    Issue #3629737 by maurice1969: SPEC 018 — log a trusted manifest that...

  • maurice1969 committed f6e34478 on 1.0.x
    Issue #3629737 by maurice1969: cspell — the word the SPEC 018 test is...

  • maurice1969 committed f6e34478 on main
    Issue #3629737 by maurice1969: cspell — the word the SPEC 018 test is...

  • maurice1969 committed f52439cf on 1.0.x
    Issue #3629737 by maurice1969: SPEC 019 Amendment 1 — a cut-off tree, an...

  • maurice1969 committed 3e9f23ed on 1.0.x
    Issue #3629737 by maurice1969: SPEC 019 — take the origin from a trusted...

  • maurice1969 committed f52439cf on main
    Issue #3629737 by maurice1969: SPEC 019 Amendment 1 — a cut-off tree, an...

  • maurice1969 committed 3e9f23ed on main
    Issue #3629737 by maurice1969: SPEC 019 — take the origin from a trusted...

  • maurice1969 committed c678fb46 on 1.0.x
    Issue #3629737 by maurice1969: SPEC 013 Amendment 3 / SPEC 016 Amendment...

  • maurice1969 committed c678fb46 on main
    Issue #3629737 by maurice1969: SPEC 013 Amendment 3 / SPEC 016 Amendment...
maurice1969’s picture

Status: Active » Fixed

Thanks for the clear report!

I could reproduce it with C2PA Sign 1.4.11 and c2patool 0.9.12, using a test PNG signed like your derivative. C2PA Sign puts c2pa.opened + c2pa.creativeWork on top, and the AI type ends up in the parentOf ingredient. After publishing, it's signed once more, so the type sits two levels down.

Both your options are in 1.0.x now and will be in alpha1:

– (b) A trusted manifest without a type logs a notice.

– (a) If the file's own manifest is trusted but has no type, the module takes it from the nearest parentOf ingredient, as long as that ingredient is trusted. With your setup you now get the suggestion, with a note that it was found "2 level(s) down".

(a) took more work than expected. A file's "trusted" verdict says nothing about who signed the ingredient, so a file with an untrusted AI claim can still look trusted after re-signing. provemark/content-credentials 0.19.0 now gives each ingredient its own verdict, and only counts it when everything above it is trusted and nothing in the file reports a fault. I tried a few ways to trick it, like an AI manifest pasted over different pixels and then re-signed by C2PA Sign. Those stay refused.

One thing to check on your side: C2PA Sign's own certificate needs to be in this module's trust anchors, or every upload it signs reads as untrusted.

Two more things I ran into:

– C2PA Sign 1.4.11 only works with c2patool 0.9.x; with 0.28.1 every upload failed, even a plain image. And 0.9.x can't read the newer C2PA 2.x format, so a 2.x file loses its credentials completely when C2PA Sign re-signs it. Your round trip is fine since both ends use the old format. I think that's worth an issue for C2PA Sign. Happy to write it up, and if you know the maintainer, a heads-up would help.

– On the verifier route, a C2PA Sign upload with a site logo read as untrusted, because the verifier didn't read the logo where c2patool 0.9.12 stores it. That's fixed in provemark/c2pa-verifier 0.6.1, which the module now asks for. So your setup gets the suggestion on all three routes.

Just curious: what added trainedAlgorithmicMedia to your derivative in step 1? As far as I can tell, C2PA Sign doesn't set a source type for image styles.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • maurice1969 committed 77a4194c on 1.0.x
    Issue #3629737 by maurice1969: SPEC 019 Amendment 2 — require the...

  • maurice1969 committed 77a4194c on main
    Issue #3629737 by maurice1969: SPEC 019 Amendment 2 — require the...
maurice1969’s picture

As mentioned, I filed the C2PA Sign part as an issue there: c2pa_sign#3596032. On a test site C2PA Sign worked with a current c2patool after a few small changes, and then C2PA 2.x files kept their credentials too.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.