Let we have a hash function that is second preimage resistant but not collision-resistant.
Then an adversary can create a pair of different messages M and M', M is benign and M' is malicious, for both of which the signature will be valid.
I don't understand why it is an issue in the setting where signatures are used to authenticate origin of data created by the same entity. So if one signs some software he claims "I have created this content myself, if it contains malware, blame me". And for keys: "this public key has a corresponding private key, I have access to it".
If one crafts a collision and signs self-generated data ... he still claims the above statements.
So should such hash functions be considered secure for things like self-signed certificates and code signing?