DEVELOPER NOTES

Before installing the package your AI suggested, check the package

A practical dependency review: exact identity, necessity, pinned inputs, clean builds, and update ownership.

Edwin··3 min·483 words
Software supply chainSecurityAI development
Before installing the package your AI suggested, check the package
ENNATURAL ARTICLE

An AI assistant can generate a plausible import faster than you can check whether the package should exist in your application. That makes dependency review more important, not less. A package name in a fluent answer is a suggestion. It is not evidence of ownership, maintenance, licensing, or safety.

Ask whether you need the dependency

Start with the problem. Is this a specialized parser where a maintained library is appropriate, or a three-line transformation the standard library already handles? Avoid both extremes: pulling in a large dependency for a tiny convenience, and rewriting complex security-sensitive functionality because avoiding dependencies feels virtuous.

Find the exact project through its official repository or maintainer documentation. Check the package name and registry owner, supported runtime, license, release history, and relevant advisories. A similarly named package is not interchangeable. Do not let an agent resolve a missing package by installing random alternatives until an import succeeds.

Make installation reviewable

Use an isolated environment with no production credentials for initial inspection. Installation and build hooks can execute code, so “I only installed it” is still an action worth controlling. Review the dependency diff before merging: new transitive packages, native build requirements, and unexpected downloads matter.

For Python, the pip repeatable-install guide explains pinning, hashes, and packaged wheels. A reviewed requirements file can be installed with hash enforcement when every required package and hash has been supplied:

python3 -m venv .venv
.venv/bin/python -m pip install --require-hashes -r requirements.lock
.venv/bin/python -m pip check

Here requirements.lock means your project's actual reviewed, fully pinned hash-bearing requirements file, not an automatically supported format inferred from its name. These commands install software; run them only for a source set you have chosen to trust. pip check checks dependency consistency, not whether the packages are harmless.

Test a clean build

Build from a fresh environment so your workstation's old packages cannot hide missing declarations. Record runtime version, platform, lockfile, and artifact digest. Native wheels can differ across operating systems and architectures; a successful laptop build does not prove a container or another CPU will work.

Exercise the behavior for which the dependency was added, including malformed inputs and resource limits. A parser that works on a tiny sample may consume excessive memory on a large file. Keep user-controlled data separate from installation and plugin discovery paths.

Give updates an owner

Pinned versions make changes deliberate; they do not make old versions safe forever. Assign responsibility for advisory review and updates, with focused regression checks and a rollback path. If an advisory does not affect your reachable configuration, document that reasoning rather than hiding the alert or declaring the whole application safe.

The best dependency addition is one another developer can understand: why it exists, exactly what was installed, how it was checked, and who will maintain it. That is a much stronger foundation than “the generated code imported it successfully.”

JP日本語
SubjectObjectVerbParticleTechnicalConnectorAdjectiveTime / context
CONTINUE IN MANABI KŌBŌ

Put this idea into practice

Reading Nook

Practice bilingual reading with Japanese scaffolding.

Open tool →
Guided Japanese Course

Continue with structured lessons and practice.

Open tool →
Adaptive Recall

Turn useful phrases into spaced practice.

Open tool →
RELATED NOTES
← Back to all articles
Share this note Email