Supported ecosystems and analysis methods

Manifests

To find dependencies, CodeScoring primarily relies on parsing package manager manifest files. The platform supports parsing the following technologies:

Ecosystem
Package manager or build tool
File format
Java and KotlinGradle*.gradle
*.gradle.kts
gradle-dependency-tree.txt
gradle.lockfile
Mavenpom.xml
maven-dependency-tree.txt
Apache Ivyivy.xml
JavaScript and TypeScriptnpmpackage.json
package-lock.json
npm-shrinkwrap.json
yarnyarn.lock
package.json
package-lock.json
pnpmpnpm-lock.yaml
bunbun.lock
Pythonpiprequirements.txt
requirements.pip
requires.txt
pip-resolved-dependencies.txt
pipdeptree.txt
Poetrypyproject.toml
poetry.lock
PipenvPipfile
Pipfile.lock
Condaenvironment.yml
meta.yml
conda-lock.yml
uvpyproject.toml
uv.lock
C and C++Conanconanfile.txt
conan.lock
conanfile.py
GCC, Clang, CMake, Make etc.Build scanning
GoGo Modulesgo.mod
go.sum
PHPComposercomposer.json
composer.lock
RubyRubyGemsGemfile
Gemfile.lock
*.gemspec
gems.locked
.NETNuget*.nuspec
packages.lock.json
Project.json
Project.lock.json
packages.config
*.csproj
project.assets.json
dependencyReport.json
deps.json
*.sln
Paketpaket.dependencies
paket.lock
Objective-CCocoaPodsPodfile
Podfile.lock
*.podspec
SwiftSwift Package ManagerPackage.swift
Package.resolved
RustCargoCargo.toml
Cargo.lock
Scalasbtscala-dependency-tree.txt
sbt-dependency-tree.txt

The best result will be achieved by combining the main manifest file and the corresponding lock file, if provided by the package manager mechanism.

PURL Types and Components

For unified dependency description, CodeScoring uses the Package URL (PURL) standard.

PURL example
pkg:maven/org.apache.logging.log4j/log4j-core@2.17.2

When analyzing SBOM via the agent command or importing into the platform, CodeScoring recognizes and supports the following PURL types according to the specification:

PURL typeDescriptionSpecification
cocoapodsLibraries for Objective-C / Swift via CocoaPodsCocoaPods Definition
conanPackages in the C / C++ (Conan) ecosystemConan Definition
condaPackages in the Python / Conda ecosystemConda Definition
nugetComponents for .NET / NuGetNuGet Definition
golangGo Modules packagesGo Definition
mavenJava / Kotlin artifacts (Maven / Gradle)Maven Definition
npmJavaScript / TypeScript packagesNPM Definition
composerPHP (Composer) packagesComposer Definition
pypiPython (PyPI) packagesPyPI Definition
gemRuby (RubyGems) packagesRubyGems Definition
cargoRust (Cargo) packagesCargo Definition
genericGeneral type for arbitrary binary or custom artifactsGeneric Definition
apkAlpine Linux system packagesAPK Definition
debDebian / Ubuntu system packagesDEB Definition
rpmRHEL / CentOS / Fedora system packagesRPM Definition
swiftSwift Package Manager packagesSwift Definition
ociOCI / Docker container imagesOCI Definition
dockerDocker Hub / Docker imagesDocker Definition
githubGitHub repositoriesGitHub Definition
huggingfaceHugging Face Hub modelsHuggingFace Definition
mlflowMLflow Model Registry modelsMLflow Definition
pubDart / Flutter (pub.dev) packagesPub Definition
swidSWID Tags (Software Identification Tags)SWID Definition

Each component with a PURL is classified by type, which CodeScoring recognizes when importing SBOM files. The type is indicated in the type field within the component description.

Difference between PURL and component types

A component type describes its functional role within a product—for example, a library, framework, or firmware. A PURL type, in turn, defines the ecosystem and source from which the component was obtained.

SBOM component example
{
  "components": [
    {
      "name": "log4j-core",
      "version": "2.17.2",
      "purl": "pkg:maven/org.apache.logging.log4j/log4j-core@2.17.2",
      "type": "library"
    }
  ]
}

Supported component types:

Component typeDescription
libraryA library, package, or third-party code module used in the project.
frameworkAn infrastructure or application framework containing a set of libraries.
firmwareExecutable binary or embedded software analyzed for the presence of third-party components.

System packages

As part of the OSA module, the platform supports analysing system packages of the following formats:

Archive scanning

CodeScoring.OSA plugins support archive scanning in the following formats:

EcosystemArchive format
Maven.jar, .war, .ear
NPM.tgz
PyPI.zip, .tar, .tgz, .tar.gz, .tar.bz2, .egg, .whl
Nuget.nupkg
Cocoapods.tar.gz, .zip
Go.mod, .zip
Gems.rz, .gz, .gem
Debian.deb, .xz, .gz
Yum.rpm
Alpine.apk
Docker.json
Archive scanning with Johnny

The Johnny CLI agent also supports archive scanning. The list of supported formats is available on the Scanning archives page.

Resolution mechanism in the absence of a lock file

If there is no lock file the system will try to resolve transitive OSS dependencies itself:

  • Maven
    • for pom.xml and build.gradle format generation of maven-dependency-tree via the corresponding maven plugin
    • Maven version 3.8.8 and OpenJDK version 11 are used
  • PyPi
    • generation of poetry.lock using the Poetry package manager
    • Python version 3.11.7 is used
  • N.P.M.
    • generation of yarn.lock using the Yarn package manager
    • uses Node.js version 20.9.0
  • Nuget
    • for csproj and sln format generation of project.assets.json using built-in nuget tools
    • uses .NET SDK version 8.0.404
  • Packagist
    • generation of composer.lock using the Composer package manager
    • PHP version 8.2.26 is used
  • Rubygems
    • generation of Gemfile.lock using the Bundler package manager
    • uses Ruby version 3.1.2p20

Generation of lock files by the system does not produce the best results in every case, since it often depends on the environment.

Resolving dependencies in the build environment

Some package managers do not include transitive dependencies in their manifests by default. For high-quality compositional analysis when working with them, it is recommended to use a dependency resolution mechanism in the build environment.

When resolving dependencies in the environment, the agent checks for the absence of a lock file, independently launches the package manager or build tool, and generates a complete list of components taking into account the correct version of the build. The functionality is currently available for the following ecosystems:

  • .NET
  • Go
  • Gradle
  • Maven
  • npm
  • Poetry
  • sbt
  • yarn
  • Conda

Mechanism for searching dependencies using hashes

Search using hashes implies detection of direct inclusion of libraries in project's code. As part of this mechanism, all project files are hashed and these signatures are compared with known open source libraries.

Currently, hash searches occur for the following package manager indexes and the following file types:

  • Maven
    • .jar
    • .war
    • .ear
  • npm
    • .min.js
  • PyPI
    • .whl
    • .egg
  • Nuget
    • .nupkg

Hashes of files whose size does not exceed 512 bytes are not sent to the cloud.

Build scanning for C and C++

If the Conan package manager and corresponding manifests are not used to build a C/C++ project, a special mode for analyzing the build process output can be used to get a list of used libraries.

In this mode, the Johnny console agent analyzes the build process using compiler flags and identifies the libraries used. Then, using the system cache, the location of the libraries and their source are determined.

Was this page helpful?