Dependency Management and Security

Security conscious developers can avoid security pitfalls in their own code, but what about the code that the developer did not write but is using?