Skip to content

docs: add transitive dependencies section to Security and risk management#2676

Open
LipeGheno wants to merge 3 commits into
masterfrom
docs/transitive-dependencies-section
Open

docs: add transitive dependencies section to Security and risk management#2676
LipeGheno wants to merge 3 commits into
masterfrom
docs/transitive-dependencies-section

Conversation

@LipeGheno
Copy link
Copy Markdown

Summary

  • Adds a new Transitive dependencies subsection inside the existing Dependencies section of the Security and risk management page
  • Explains what transitive dependencies are and how Codacy surfaces them as findings labelled Transitive Dependency in the Findings tab
  • Documents how to read the import chain (repository → direct dep → … → vulnerable package → CVE), including the upgrade label behaviour
  • Covers the "no upgrade available" scenario and current limitations
  • Adds a screenshot (security-risk-management-transitive-chain.png) showing the chain on a finding card

Test plan

  • Verify the new section renders correctly on the docs site
  • Confirm the screenshot displays properly
  • Check all internal anchor links resolve (#transitive-dependencies)

🤖 Generated with Claude Code

…ment

Documents the transitive dependency import chain feature in the
Dependencies section, including how findings are labelled, how to
read the chain, upgrade labels, cases where no upgrade is available,
and current limitations. Adds screenshot of the chain in the Findings tab.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@LipeGheno LipeGheno requested a review from a team as a code owner May 22, 2026 10:38
@LipeGheno LipeGheno requested a review from lventura-codacy May 22, 2026 10:38
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

Overall readability score: 54.21 (🟢 +0)

File Readability
managing-security-and-risk.md 59.02 (🟢 +0.96)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
managing-security-and-risk.md 59.02 36.79 9.73 12.7 12.7 6.44
  🟢 +0.96 🟢 +0.1 🟢 +0.15 🟢 +0.2 🟢 +0.12 🟢 +0.07

Averages:

  Readability FRE GF ARI CLI DCRS
Average 54.21 43.1 10.91 12.31 12.24 8.01
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

@codacy-production
Copy link
Copy Markdown
Contributor

codacy-production Bot commented May 22, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@github-actions github-actions Bot temporarily deployed to Netlify May 22, 2026 10:39 Inactive
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new 'Transitive dependencies' section to the documentation, detailing how import chains are displayed for vulnerabilities found in indirect packages. The feedback suggests improving sentence flow by adding a comma and ensuring terminology consistency by using 'Software Composition Analysis (SCA)' instead of 'dependency scanning'.


#### When no upgrade is available

If no package in the chain has a patched release yet, the chain shows the full path without an upgrade 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, or accept the risk per your organization's policy.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Add a comma after "In that case" to improve the readability and flow of the sentence.

Suggested change
If no package in the chain has a patched release yet, the chain shows the full path without an upgrade 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, or accept the risk per your organization's policy.
If no package in the chain has a patched release yet, the chain shows the full path without an upgrade 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, or accept the risk per your organization's policy.


#### 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
- 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.
- The import chain is shown only for findings that come from Software Composition Analysis (SCA). Findings from other scan types (container scanning, app scanning) do not show a chain.

Copy link
Copy Markdown
Contributor

@codacy-production codacy-production Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The documentation changes are technically sound and follow the project's quality standards according to Codacy. However, there is a critical gap: the image security-risk-management-transitive-chain.png referenced in the new section is not included in this pull request. This omission will cause a broken image link in the production documentation and fails to meet the acceptance criterion requiring a UI screenshot. There are also two minor suggestions for spelling and punctuation to maintain consistency with the existing documentation.

About this PR

  • The PR description mentions adding a screenshot, and the Markdown references it, but the image file 'security-risk-management-transitive-chain.png' is not included in the provided code changes. Please ensure the image is added to the repository.

Test suggestions

  • Verify that the 'Transitive dependencies' section and its subsections render correctly on the documentation site.
  • Ensure the image file 'images/security-risk-management-transitive-chain.png' exists at the specified path.
  • Check that the anchor link '#transitive-dependencies' is functional and correctly indexed.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that the 'Transitive dependencies' section and its subsections render correctly on the documentation site.
2. Ensure the image file 'images/security-risk-management-transitive-chain.png' exists at the specified path.
3. Check that the anchor link '#transitive-dependencies' is functional and correctly indexed.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback


Open the **Findings** tab under **Security and risk management**. Findings caused by a transitive dependency are labelled **Transitive Dependency** in the header.

![Security and risk management transitive dependency finding](images/security-risk-management-transitive-chain.png)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 no upgrade is available

If no package in the chain has a patched release yet, the chain shows the full path without an upgrade 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, or accept the risk per your organization's policy.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Nitpick: Add a comma after the introductory phrase.

Suggested change
If no package in the chain has a patched release yet, the chain shows the full path without an upgrade 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, or accept the risk per your organization's policy.
If no package in the chain has a patched release yet, the chain shows the full path without an upgrade 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, or accept the risk per your organization's policy.


#### 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.
Copy link
Copy Markdown
Contributor

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.

Suggested change
Open the **Findings** tab under **Security and risk management**. Findings caused by a transitive dependency are labelled **Transitive Dependency** in the header.
Open the **Findings** tab under **Security and risk management**. Findings caused by a transitive dependency are labeled **Transitive Dependency** in the header.

Revises the "Reading the chain" section to reflect the actual chain
format: Transitive label → intermediate packages → bold vulnerable
package → Fixed version label at the end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot temporarily deployed to Netlify June 2, 2026 12:29 Inactive
Copy link
Copy Markdown
Contributor

@codacy-production codacy-production Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The documentation for transitive dependencies is well-structured and meets the general acceptance criteria. However, the current examples contain logical inconsistencies regarding versioning and lack clarity on which package in the chain should be upgraded. Specifically, the example uses version numbers that imply a version downgrade for the vulnerable package, and the text does not explicitly identify the root dependency as the target for resolution.

Additionally, there is a discrepancy between the visualization components described in the PR summary (repository and CVE) and what is actually explained in the documentation text. Addressing these clarity issues will significantly improve the value of the documentation for end-users.

About this PR

  • The documentation text and examples currently omit the 'repository' and 'CVE' elements of the chain visualization that were mentioned in the PR description. If these elements are present in the actual UI visualization, they should be explicitly mentioned in the 'Reading the chain' section for completeness.

Test suggestions

  • Verify the 'Transitive dependencies' header and its anchor ID are correctly defined in the Markdown
  • Confirm the screenshot file reference 'images/security-risk-management-transitive-chain.png' exists
  • Check that the limitations section accurately reflects the constraints mentioned in the PR description

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Transitive → peft@0.11.1 → accelerate@0.31.0 → Torch@2.4.0 Fixed version 1.1.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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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:
'In this example, Torch@2.4.0 is the vulnerable package, and upgrading the root dependency (peft) to the indicated fixed version (1.1.1) resolves the vulnerability across this dependency path.'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant