-
Notifications
You must be signed in to change notification settings - Fork 45
docs: add transitive dependencies section to Security and risk management #2676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -585,6 +585,46 @@ | |||||
|
|
||||||
| The dependency overview page offers a quick bird's-eye view of that particular dependency. You'll be able to see all different versions that are being used, including which repository is using them, the oldest and most recent versions you're leveraging, as well as the highest criticality of security issues, the license <a href="#license-scanning"><sup>5</sup></a> applied to any particular version of that dependency, and the [OSSF Scorecard](#ossf-scorecard) security assessment. | ||||||
|
|
||||||
| ### Transitive dependencies {: id="transitive-dependencies"} | ||||||
|
|
||||||
| A **transitive dependency** is a package your repository doesn't import directly — it's pulled in through another package you depend on. When a vulnerability lives in a transitive dependency, the package you need to upgrade is often *not* the vulnerable one itself, but an ancestor higher up the chain that has a patched release available. | ||||||
|
Check failure on line 590 in docs/organizations/managing-security-and-risk.md
|
||||||
|
|
||||||
| Codacy surfaces the full import chain for every finding caused by a transitive dependency, so you can see exactly which package to bump. | ||||||
|
|
||||||
| #### Where you see it | ||||||
|
|
||||||
| Open the **Findings** tab under **Security and risk management**. Findings caused by a transitive dependency are labelled **Transitive Dependency** in the header. | ||||||
|
|
||||||
|  | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM RISK The image 'security-risk-management-transitive-chain.png' is referenced but not included in the PR, which will result in a broken image in the rendered documentation. |
||||||
|
|
||||||
| When you expand a transitive finding, the import chain appears at the top of the finding card. It shows every hop from the first affected dependency down to the vulnerable package. | ||||||
|
|
||||||
| #### Reading the chain | ||||||
|
|
||||||
| The chain reads left to right: | ||||||
|
|
||||||
| - **Transitive** — the icon and label that identifies this as a transitive dependency finding. | ||||||
| - **Intermediate segments** — the packages in the resolution path, connected by arrows (`→`). Each one is a dependency that pulls in the next. | ||||||
| - **Last segment** — the vulnerable package and version, shown in bold. | ||||||
| - **Fixed version** — when a patched release is available, a **Fixed version *x.x.x*** label appears at the end of the chain. This is the version to target when upgrading to resolve the vulnerability. | ||||||
|
Check failure on line 609 in docs/organizations/managing-security-and-risk.md
|
||||||
|
|
||||||
| For example: | ||||||
|
|
||||||
| ``` | ||||||
| Transitive → peft@0.11.1 → accelerate@0.31.0 → Torch@2.4.0 Fixed version 2.4.1 | ||||||
| ``` | ||||||
|
|
||||||
| In this example, `Torch@2.4.0` is the vulnerable package, and upgrading to the indicated fixed version resolves the vulnerability across this dependency path. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM RISK Suggestion: The relationship between the 'Fixed version' and the packages in the chain is unclear. In the example provided, '1.1.1' appears to be a version downgrade for 'Torch@2.4.0', which is confusing. It should be explicitly stated that the fixed version refers to the root dependency (peft), which is the package the user actually manages. Suggested improvement: |
||||||
|
|
||||||
| #### When no fixed version is available | ||||||
|
|
||||||
| If no patched release exists yet, the chain is shown without a **Fixed version** label. In that case the vulnerability cannot be resolved by a version bump alone; you may need to wait for an upstream fix, apply a workaround (such as explicitly setting the version of the transitive dependency), or accept the risk per your organization's policy. | ||||||
|
Check failure on line 621 in docs/organizations/managing-security-and-risk.md
|
||||||
|
|
||||||
| #### Limitations | ||||||
|
|
||||||
| - The import chain is shown only for findings that come from dependency scanning. Findings from other scan types (container scanning, app scanning) do not show a chain. | ||||||
|
Check failure on line 625 in docs/organizations/managing-security-and-risk.md
|
||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To maintain consistency with the "Scan types" table (line 338) and other sections of the documentation (e.g., line 184), use the formal term "Software Composition Analysis (SCA)" instead of "dependency scanning".
Suggested change
|
||||||
| - Each finding shows a single representative path. If a repository reaches the same vulnerable package through more than one chain, only one is displayed. | ||||||
|
|
||||||
| ### OSSF Scorecard {: id="ossf-scorecard"} | ||||||
|
|
||||||
| The **OSSF Scorecard** feature provides additional security insights for your dependencies by displaying security assessment data from the Open Source Security Foundation (OSSF) Scorecard project. | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚪ LOW RISK
Nitpick: Use the American English spelling for consistency with the rest of the documentation.