> I was a scientific adviser to $LAWYER, and my job was strictly to help him, his client, and only them understand things better.
Looks more like you're wearing an accountant or auditor hat than a scientist hat on this one.
>is there some moral principle that all scientists should disclose everything and you can't hire them for confidential work?
Yes. The search for scientific truth shouldn't be a narrative for the people who pay for it.
>I was a scientific adviser to $LAWYER, and my job was strictly to help him, his client, and only them understand things better.
And when it comes down to it, the client and their representatives (you, $LAWYER, etc) have or will have certain obligations to truth under the law; you might be muzzled but it's more of a reassignment of responsibility to somebody else.