AWS Builder Center

How I vet a new dependency before adding it to a project

A short checklist I run before a new package touches a real project: the repo, recent maintenance, open issues, what it runs at install time, a pinned version, and a quick local test.

Full-stack Developer & Security Researcher
I add a dependency only after I check it. A package that saves an hour today can cost a week later, so I run the same checks each time.
First I look at the repo. Who maintains it, when was the last release, and are issues answered or left open for months. A package with no maintainer and a long list of open security issues does not get in.
Then I read what it actually does. I open the source, check the install hooks, and look at what runs at install time. A postinstall script that downloads code or phones home is a stop. I want to know what the package runs before it runs in my project.
I check the open issues for the exact problem I need solved. If the issue is open and the maintainer says it will not fix it, I look for another package or write the small part myself.
Then I pin the version. I record the exact version in the lockfile and I do not use a floating range. If the package updates, I update it on purpose and read the changelog first.
Last I test it locally. I install it in a throwaway project, run the one thing I need from it, and watch what files it touches and what network calls it makes. Only after that does it go into the real project.
That is the whole check. It takes half an hour. It has kept bad packages out of my projects more than once.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article