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.

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.”
AIが提案したパッケージを入れる前に確認する
AIがもっともらしいimportを書いても、そのパッケージの必要性や安全性は証明されない。名前は提案として受け取り、実体を調べよう。
必要性と正確な名前
専門的な解析器には保守されたライブラリが適切なこともある。一方、小さな変換なら標準機能で十分かもしれない。公式リポジトリから名前、配布者、対応実行環境、ライセンス、更新、関連する問題を確かめる。似た名前を順に入れて成功させない。
隔離してインストールする
本番資格情報のない環境を使う。インストールやビルドもコードを実行しうる。間接依存、ネイティブ要件、外部ダウンロードを確認する。pipの再現可能な導入ガイドを参照し、全依存の版とハッシュをレビューした実際のファイルで実行する。
python3 -m venv .venv
.venv/bin/python -m pip install --require-hashes -r requirements.lock
.venv/bin/python -m pip check
ファイル名だけでlock形式になるわけではない。この操作はソフトウェアを導入する。pip checkは依存関係の整合性確認で、安全性検査ではない。
新しい環境と継続保守
クリーン環境でビルドし、Python版、OS、CPU、固定ファイル、成果物の識別子を残す。別CPUのwheelまで動くとは限らない。追加目的の動作、不正入力、大きな入力の資源制限を試す。
版固定は変化を管理するが、永久に安全にしない。更新担当、問題の確認、回帰テスト、戻し方を決める。なぜ必要か、何を入れたか、何を確かめたか、誰が保守するかを次の開発者に説明できる形にしよう。



