テーマ: dependencies
-
Version range syntax across npm, Cargo, pip, Composer, Go modules, Maven, NuGet and Bundler
The caret and tilde operators do not mean the same thing everywhere, Go modules have no ranges at all, and a bare version number is an inclusive minimum in NuGet but only a soft suggestion in Maven.
-
Managing PostgreSQL extensions: installing, versioning, updating and dumping them
An extension packages SQL objects and often a shared library under one name with a control file and versioned scripts; CREATE EXTENSION installs it per database, ALTER EXTENSION UPDATE applies the author's update scripts, and pg_dump emits only the CREATE EXTENSION line. Keep the installed files, the catalog version and the loaded library in step, especially across package upgrades and pg_upgrade.
-
CMake の PUBLIC、PRIVATE、INTERFACE:グローバルフラグなしで依存範囲を直す
利用側ターゲットの契約から依存範囲を選び、最小の外部利用プログラムで検証します。
-
Dependency confusion: when a public package shadows a private one
If a build resolves package names across a private index and a public one, an attacker who publishes the private name publicly with a higher version can get their code installed; pip's documentation calls --extra-index-url for private packages unsafe for exactly this reason. Defences are namespaces bound to one registry, a single proxying index, hash pinning and claiming names.
-
Cargo、クレート、エディション:Rust プロジェクトのビルドとバージョン管理
Cargo は Cargo.toml からクレートをビルドし、SemVer 互換範囲の依存関係を解決して Cargo.lock に記録します。一つのビルドに同じクレートの互換性のない二つのメジャーバージョンを含められます。エディションはクレートごとに任意で選ぶ相互運用可能な言語バージョンなので、変更しても依存する側に追従を強制しません。
-
Maven versus Gradle: what a newcomer needs to build someone else's JVM project
Maven describes a project declaratively in pom.xml and runs fixed lifecycle phases (validate, compile, test, package, verify, install, deploy) with plugin goals bound to them; Gradle runs a graph of tasks configured by build.gradle(.kts) scripts and plugins. Both resolve transitive dependencies but with different conflict rules (Maven: nearest definition; Gradle: highest version), and both ship a wrapper script that pins the build tool version.
-
依存関係の衛生管理とソフトウェアサプライチェーンのチェック
何に依存しているかを把握し、固定して検証し、既知の脆弱性を監視し、信頼できるソースからビルドする。SLSA のレベル、OpenSSF Scorecard、ハッシュを検証するインストールが具体的な手順を示す。
-
架空のパッケージ名と紛らわしいパッケージ名:エージェントが依存関係をインストールする前の確認
コード生成モデルは、存在しないパッケージの名前を挙げることがあります。攻撃者はその名前を登録でき、タイポスクワッターは人気の名前に似たものを登録します。インストール前に、エージェントはパッケージが存在し、意図したプロジェクトのものであり、混同しやすい名前で新規登録されたものではないことを確認すべきです。
-
グラフ探索で依存順序を求める:BFS、DFS、トポロジカルソート
依存関係を有向グラフとして表し、幅優先または深さ優先探索で変更の影響範囲を求めます。Kahn のアルゴリズムや DFS の帰りがけ順で、循環を隠さず報告するビルド・移行順序を作ります。graphlib と tsort がこのソートを実装しています。
-
Checking the identity of a suggested package before adding it to a project
Verify that a package name suggested during coding corresponds to the intended maintained dependency before changing the project’s dependency files or executing installation hooks.
-
Software bills of materials with SPDX and CycloneDX
An SBOM is a machine-readable inventory of the components in a software artifact; SPDX and CycloneDX are the two widely used formats, and generating one per release supports vulnerability matching and licence review.
-
Dependency upgrade cadence: batching, grouping and what to merge at once
Update bots open one pull request per dependency unless configured otherwise; a sustainable cadence merges security fixes as they arrive, batches patch and minor updates into a scheduled group, and treats major versions as planned work. Dependabot and Renovate both document scheduling and grouping, and Renovate's guide names the cost of grouping: a failing group blocks all of its members.
-
npm's "ERESOLVE unable to resolve dependency tree" and peer dependency conflicts
Since npm 7, peerDependencies are installed automatically, and a version that cannot satisfy every peer range at once fails with 'npm error code ERESOLVE' ('npm ERR! code ERESOLVE' before npm 10.6). The article shows how to read npm's own Found/Could-not-resolve lines to identify the exact conflicting packages, and why --legacy-peer-deps or --force should not be a default response.
-
Software-Stücklisten (SBOM): das Inventar der eigenen Lieferkette
Eine Software-Stückliste zählt maschinenlesbar auf, welche Komponenten in welcher Version in einem gelieferten Artefakt stecken. SPDX (ISO/IEC 5962:2021) und CycloneDX (OWASP) sind die verbreiteten Formate; erzeugt wird sie pro Release aus dem gebauten Artefakt, daneben abgelegt und zum Abgleich mit Schwachstellenmeldungen und Lizenzpflichten genutzt. Zusammen mit Herkunftsnachweisen (SLSA) macht sie die Lieferkette prüfbar.
-
Which checks on automated dependency-update pull requests have caught a malicious or broken release, and which only add noise?
Open question: automated update pull requests arrive daily and are often merged on green CI; the npm documentation describes provenance attestations that npm audit signatures can verify, but which checks (provenance, unpacked diff review, install-script inspection, waiting periods, lockfile diffs) have a record of catching a compromised or broken release?
-
Pinning NuGet dependencies: PackageReference, central package management and packages.lock.json
NuGet resolves the lowest applicable version of each package at restore time, so a restore can drift when new versions or floating ranges appear; a repeatable build declares versions once in Directory.Packages.props, enables RestorePackagesWithLockFile so packages.lock.json records the full closure, commits the lock file for applications, and restores with --locked-mode in CI.
-
pyproject.toml で Python プロジェクトをパッケージ化する
pyproject.toml は、ビルドシステム、メタデータ、依存関係を一つの標準ファイルで宣言する(PEP 517/518/621)。対応するツールなら、setup.py なしでプロジェクトをビルド、インストールし、依存関係を固定できる。
-
Virtual environments: one interpreter state per project
A virtual environment is a private site-packages tied to an interpreter; creating one per project prevents version conflicts and makes the dependency set reproducible and disposable.
-
Reproducible builds and pinned dependencies
A build is reproducible when the same source and build environment produce bit-for-bit identical output; lockfiles with hashes, pinned base images and fixed timestamps are the practical steps toward it.
-
Go モジュール:go.mod、go.sum、メジャーバージョンの接尾辞
Go モジュールは、go.mod で記述する、バージョンを持つパッケージのツリーです。go コマンドは最小バージョン選択で依存関係の版を決め、go.sum でダウンロードを検証します。1 より大きいメジャーバージョンにはモジュールパスの /v2 形式の接尾辞を要求するため、互換性のない版は異なるインポートパスを持ちます。
機械可読: JSON