Repository navigation
Direct and transitive dependencies, and through which package - #115
Merged
Merged
Conversation
…ntry SbomFilterExtractor.ps1: a transitive inventory component names the direct dependencies it comes in through (Via, from the dependency graph). Lockfiles with a graph give Direct and Via too: package-lock v2/v3, pnpm-lock, packages.lock.json, Gemfile.lock, Cargo.lock, uv.lock. metascraper.ps1 (build 2026-12-04a): each entry gets DependencyScope (direct / transitive) and Via from its matched components. Schema updated. New script test tests/dependency-graph.ps1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kjGYYNvsfXvLhePqaNsL3
Results tab: column Dep. (tooltip with the way in), the line Dependency in the details, CSV columns DependencyScope and Via, search is:direct, is:transitive, via:, dep:. The Workbench keeps it (details, CSV, change noted), the attack paths and the Auto Report name the way in, the SBOM comparison has a column Dependency (window, CSV, HTML), the inventory window a column Via, and the Heavy mode scan takes the scope from the inventory. Smoke area dependency; README and CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kjGYYNvsfXvLhePqaNsL3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Direct or transitive, and through which package
Before, an entry was marked transitive only in its applicability reason, as (transitive dependency -5). Now the entry itself says whether its component is direct or transitive. For a transitive one, it also names the direct dependencies it comes in through. The fix is mostly an update of that direct dependency.
SbomFilterExtractor.ps1Via: a transitive inventory component gets
Via. It lists the direct dependencies of the main component from which it is reachable in the dependency graph, as inventory labels, e.g.express@4.17.1; lodash@4.17.20.Lockfiles with a graph: these lockfiles now give a main component and CycloneDX dependencies, so direct / transitive and Via come out as for an SBOM:
package-lock.jsonv2 / v3node_modulespnpm-lock.yaml.(v6 / v9) or the top-level dependencies (v5), plus the package dependenciespackages.lock.jsontype: Directand the dependencies of each packageGemfile.lockDEPENDENCIESand the dependency lines under each specCargo.locksourceare the projectuv.lockLockfiles without a graph leave Direct unknown, as before, so no deduction applies:
yarn.lock,poetry.lock,Pipfile.lock,requirements*.txt,composer.lock,go.sum,gradle.lockfile.metascraper.ps1(build2026-12-04a)Add-DependencyScopesetsDependencyScopeon each entry: direct when one matched component is direct, transitive when every known one is transitive.Via.GUI
DependencyScopeandVia; searchis:direct,is:transitive,via:,dep:Compare-Sbom.ps1)The user agreed to the look from screenshots.
Docs
Tests
New script test
tests/dependency-graph.ps1(15 checks). It covers:yarn.lockwithout a graph;Add-DependencyScopeofmetascraper.ps1.The existing script tests are green.
New smoke area
dependency(14 checks). It covers the run file, search, details, CSV, Workbench, Auto Report, SBOM comparison, inventory window, Heavy mode scan, the column with its tooltip and the attack paths list.Existing checks adjusted: three checks of the column order now include the new columns Dep. and Via.
The full smoke run in a fresh output folder is green: 1613 checks.
Generated by Claude Code