Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/codacy-cloud-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,39 @@
codacy findings gh my-org --statuses Overdue,DueSoon
```

### Check affected functions on vulnerable dependencies {: id="affected-functions"}

For SCA issues and findings linked to an advisory (CVE or GHSA) where Codacy has identified the affected functions, `issues`, `issue`, `findings`, `finding`, and `pull-request` show that information alongside the regular output.

List and card views show a compact summary line:

```bash
codacy issues gh my-org my-repo
```

```
Vulnerable functions: Unmarshal, UnmarshalOptions.Unmarshal (+1 more)
```

Detail views (`codacy issue`, `codacy pull-request ... --issue`, and `codacy finding` when the finding has no linked Codacy issue) show the full block instead:
Comment thread
joanasteodoro marked this conversation as resolved.

```bash
codacy issue gh my-org my-repo <issueId>
```

```
Vulnerable Functions (CVE-2024-24786)
Published: 2024-03-08

• Unmarshal
• UnmarshalOptions.Unmarshal
```

This information is also included when using `--output json`.

!!! note
Not every advisory lists specific affected functions — this section only appears when Codacy has identified them.

Check failure on line 163 in docs/codacy-cloud-cli/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Dashes] Remove the spaces around ' — '. Raw Output: {"message": "[Microsoft.Dashes] Remove the spaces around ' — '.", "location": {"path": "docs/codacy-cloud-cli/index.md", "range": {"start": {"line": 163, "column": 57}}}, "severity": "ERROR"}

### Inspect pull requests

```bash
Expand Down Expand Up @@ -201,6 +234,19 @@

Feed both outputs to Claude Code (with the Codacy skill installed) to decide what to fix and apply it directly.

### Audit affected functions across one or multiple repositories {: id="affected-functions-scale"}

The [affected functions](#affected-functions) shown for a single finding tell you whether one vulnerable dependency is reachable. To check vulnerable dependencies across one or multiple repositories at once, [install the Codacy Skills](#install-the-codacy-skills) — the `codacy-cloud-cli` skill already knows how to pull SCA findings for one or more repositories, tell direct from transitive dependencies apart, and check whether the affected functions are actually used.

Check failure on line 239 in docs/codacy-cloud-cli/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Dashes] Remove the spaces around ' — '. Raw Output: {"message": "[Microsoft.Dashes] Remove the spaces around ' — '.", "location": {"path": "docs/codacy-cloud-cli/index.md", "range": {"start": {"line": 239, "column": 264}}}, "severity": "ERROR"}

With the skill installed and local checkouts of the repositories you want to cover, ask your assistant directly, for example:

```text
Audit vulnerable dependencies in <repo-one> and <repo-two>. For every SCA finding where Codacy has identified affected functions, tell me whether the dependency is direct or transitive, search my local checkout for calls to those functions, and report back per repository — used/not used, chain status, and your recommendation — before ignoring anything as NotExploitable or applying an upgrade.
```

!!! note
Only include repositories you have checked out locally — the assistant can't verify reachability for a repository it can't search. It's also a signal, not a guarantee: review the recommendation before upgrading a dependency or ignoring a finding.

Check failure on line 248 in docs/codacy-cloud-cli/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'reachability'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'reachability'?", "location": {"path": "docs/codacy-cloud-cli/index.md", "range": {"start": {"line": 248, "column": 89}}}, "severity": "ERROR"}

Check failure on line 248 in docs/codacy-cloud-cli/index.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Dashes] Remove the spaces around ' — '. Raw Output: {"message": "[Microsoft.Dashes] Remove the spaces around ' — '.", "location": {"path": "docs/codacy-cloud-cli/index.md", "range": {"start": {"line": 248, "column": 59}}}, "severity": "ERROR"}

### Use the CLI in CI

The CLI works in any CI environment. Set `CODACY_API_TOKEN` as a secret and install the CLI as a step:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/organizations/managing-security-and-risk.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@

![Security and risk management finding dependency chain](images/security-risk-management-finding-dependency-chain.png)

### Affected functions {: id="affected-functions"}

For vulnerable dependency and container scanning findings linked to an advisory (a CVE or a GitHub Security Advisory) where Codacy has identified which functions in the dependency are affected, the finding's **Advisory Information** tab shows the list of **affected functions**.

![Security and risk management finding affected functions](images/security-risk-management-affected-functions.png)
Comment thread
joanasteodoro marked this conversation as resolved.

Click **Check if you're affected** to copy a ready-made prompt for your AI coding assistant (such as Cursor, Claude Code, or GitHub Copilot). The prompt asks your assistant to search your repository for calls to the affected functions and recommend whether to upgrade the dependency or, if the functions aren't used, ignore the finding as **Not exploitable**.

!!! note
This is a signal, not a guarantee. Review your coding assistant's findings before upgrading a dependency or ignoring a finding.

!!! note
Not every advisory lists specific affected functions — some vulnerabilities (for example, configuration issues) aren't tied to specific functions, so this section doesn't appear for every finding.

Check failure on line 120 in docs/organizations/managing-security-and-risk.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Dashes] Remove the spaces around ' — '. Raw Output: {"message": "[Microsoft.Dashes] Remove the spaces around ' — '.", "location": {"path": "docs/organizations/managing-security-and-risk.md", "range": {"start": {"line": 120, "column": 57}}}, "severity": "ERROR"}

Affected functions are also available from the terminal — see [checking affected functions with the Codacy Cloud CLI](../codacy-cloud-cli/index.md#affected-functions).

Check failure on line 122 in docs/organizations/managing-security-and-risk.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Dashes] Remove the spaces around ' — '. Raw Output: {"message": "[Microsoft.Dashes] Remove the spaces around ' — '.", "location": {"path": "docs/organizations/managing-security-and-risk.md", "range": {"start": {"line": 122, "column": 56}}}, "severity": "ERROR"}

To review reachable dependencies across one or multiple repositories at once, instead of one finding at a time, see [auditing affected functions across one or multiple repositories](../codacy-cloud-cli/index.md#affected-functions-scale) with the Codacy Cloud CLI.

### Severity changes {: id="severity-changes"}

The same Common Vulnerability and Exposure can be classified with different severities in different sources, like cve.org or NVD, and Trivy uses these and other sources to update their database. As such, there may be situations where the severity attributed to a Finding by Trivy is not in line with a specific source. Subsequent analysis can then close a Finding and re-open it with a different severity, if a Trivy database update occurs.
Expand Down
Loading