| Type | Distribution | Definition |
|---|---|---|
| TEST | 6% | This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases. This scope is not transitive. |
| COMPILE | 90% | This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, these dependencies are propagated to dependent projects. |
| PROVIDED | 3% | This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope “PROVIDED” because the web container provides these classes. This scope is only available on the compilation and test classpath, and is not transitive. |
| RUNTIME | 1% | This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath. |
What can I do to protect an app against transitive vulnerabilities?
Realistically, I'm not saying you should fix all transitive vulnerabilities as you don't manage this part of the equation. But at least you must know where they're located and estimate a level of density and recurrence. In some cases, actions can be taken:- If one of the direct OSS components is pulling critical transitive vulnerabilities in a specific version, consider upgrading it. The component team has probably fixed these CVEs by patching their own dependencies in an updated version.
- If one of the direct OSS components is pulling too many transitive vulnerabilities spread across multiple dependencies, and their number doesn't seem to decrease over the version timeline, seriously consider finding an alternative to this component.
Transitive dependencies in CAST Highlight
CAST has consolidated a unique database on Open Source made up of 94+ millions components, representing more than 9 billion distinct file fingerprints. Leveraging this unique knowledge base and some exclusive machine learning and crawling algorithms, Highlight recently started to resolve dependencies between these components. So far, more than 144 million links between OSS components have been identified and recorded into the SCA database. Supported OSS forges for component dependency calculation:- Maven
- NPM
- Nuget
- Packagist
- PyPi
- RubyGem
- Transitive dependencies are available from the Software Composition dashboard by clicking on the magnifying glass of third-party components found in your application. On click, a modal opens and lists the component dependencies with their type (test, runtime, compile, etc.) and indicates: the possible security vulnerabilities (a.k.a. CVEs) they may have and whether they are critical, high, medium or low from a severity standpoint
- their license type and if these comply with your license compliance policy
For reference only. For the complete details please refer the original article
https://doc.casthighlight.com/transitive-dependencies-much-can-trust-friends-friends/
https://doc.casthighlight.com/transitive-dependencies-much-can-trust-friends-friends/
Comments