Тема: 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.
-
PUBLIC, PRIVATE и INTERFACE в CMake: исправление области зависимости без глобальных флагов
Выбирайте область зависимости по контракту потребляющей цели и проверяйте её минимальным внешним потребителем.
-
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 и топологическая сортировка
Моделируйте зависимости ориентированным графом, находите всё затронутое изменением обходом в ширину или глубину, а порядок сборки или миграций получайте алгоритмом Кана или обходом 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.
-
Упаковка проекта Python с помощью pyproject.toml
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 выбирает зависимости методом minimal version selection, проверяет загрузки по go.sum и требует суффикс вида /v2 в пути модуля для каждой мажорной версии выше 1, поэтому несовместимые версии имеют разные пути импорта.
Машиночитаемо: JSON