sbom
sbom copied to clipboard
Implement `component.publisher`
Definition: The organization that published/released the package.
Proposed logic:
defp determine_publisher(component) do
case component.package_url.type do
"hex" -> "Hex.pm"
"github" -> "GitHub"
"otp" -> "Erlang/OTP"
_ -> nil
end
end
Question: ❓ Should we use the package type as publisher, or should we infer from repository URL for private Hex repos?
Alternative approach:
# For private Hex repos
case component.package_url.qualifiers["repository_url"] do
"https://repo.hex.pm" -> "Hex.pm"
"https://hex.mycompany.com" -> "MyCompany Private Hex"
_ -> "Hex.pm"
end
Question: ❓ Should we query the Hex API to get the release publisher?