When running the pulldown-cmark binary, there should be a --reject-broken-links option, so that if you try to render a file with broken links, the program outputs an error message and exits with an error code.
(I can implement it in a PR if you're interested)