Let $P \subset \R^3$ be a polyhedron. It was conjectured that if $P$ is weakly convex (i. e. its vertices lie on the boundary of a strictly convex domain) and decomposable (i. e. $P$ can be triangulated without adding new vertices), then it is infinitesimally rigid. We prove this conjecture under a weak additional assumption of codecomposability. The proof relies on a result of independent interest concerning the Hilbert-Einstein function of a triangulated convex polyhedron. We determine the signature of the Hessian of that function with respect to deformations of the interior edges. In particular, if there are no interior vertices, then the Hessian is negative definite.