Module: StillActive::DependencyHelper

Extended by:
DependencyHelper
Included in:
DependencyHelper
Defined in:
lib/helpers/dependency_helper.rb

Overview

The canonical identity of an assessed dependency, shared by every renderer (terminal/markdown/SARIF display) and by the suppression matchers (--ignore and .still_active.yml).

Instance Method Summary collapse

Instance Method Details

#identity(name, data) ⇒ Object

A cross-ecosystem SBOM dependency is "ecosystem/name" (the lens sets :ecosystem and :name); a native gem is its bare name (the hash key), where gem_data carries no :ecosystem. Deliberately version-independent: it is NOT the composite "ecosystem/name@version" hash key, so one suppression covers a dependency across version bumps and matches the same identity the poison / ceiling correlators key on.



16
17
18
# File 'lib/helpers/dependency_helper.rb', line 16

def identity(name, data)
  data[:ecosystem] ? "#{data[:ecosystem]}/#{data[:name]}" : name
end