What Fix for SCA does

What Fix for SCA does

Veracode Fix for SCA takes the vulnerable open-source dependencies that Veracode SCA finds and does the upgrade work for you. It runs in a Veracode-hosted sandbox, then hands back a patch or a pull request plus a report of every change it made and everything it skipped.

It does more than bump version numbers:

  • Direct dependencies are upgraded to the closest safe version.
  • Transitive dependencies are pinned when that doesn't need a major version jump. Major jumps are skipped and listed in the report.
  • Breaking changes are handled. Fix finds the APIs that changed and updates your code to match.
  • Several dependencies can be fixed in one run.

Some things still need a person. Fix flags them for manual review when no safe version exists, when the fix needs a language version upgrade or a framework migration, or when a transitive dependency needs a major upgrade.

Fix for SCA supports the same languages as the SCA agent (supported languages). Your source files are discarded after each run. Because the patches are AI-generated, always review them before you merge.

Who can use it: Fix for SCA is a Limited Availability release for specific Veracode customers, and your organization needs a Fix for SCA license. Ask your account team.

Before you start

You can run Fix for SCA two ways: from the Veracode CLI, or from pull requests in GitHub. Check these first.

For both

  • A Fix for SCA license for your organization
  • A Veracode user account with the Submitter role, or an API account with the Submitter API role

For the CLI

For GitHub pull requests

Step by step

Option A: from the Veracode CLI

Good for local work, CI pipelines and scheduled batch runs. Commands below are from the Veracode docs.

  1. Install and configure the CLI. On macOS or Linux:

    curl -fsS https://tools.veracode.com/veracode-cli/install | sh
    veracode configure
    

    For Windows, see Install the Veracode CLI.

  2. Scan with the SCA agent and save the results as JSON. The agent's --json option takes a file path (SCA agent commands). That page shows the cURL form below. Run it from your project folder to save the results as scaResults.json:

    curl -sSL https://sca-downloads.veracode.com/ci.sh | sh -s scan . --recursive --allow-dirty --json=scaResults.json --show-cli

    --show-cli also prints a readable summary in your console. It only works together with --json. If the agent is installed locally, you can run srcclr scan . --recursive --allow-dirty --json=scaResults.json --show-cli instead.

  3. See what Fix can upgrade, without changing anything.

    veracode fix sca /path/to/project -L -r /path/to/project/scaResults.json --remote
    
  4. Pick the fixes you want. Interactive mode shows a table of Fix IDs, libraries and CVEs. Enter one ID, several separated by commas, or all.

    veracode fix sca /path/to/project -I -r /path/to/project/scaResults.json --remote
    

    Or apply specific Fix IDs directly:

    veracode fix sca /path/to/project -i SCA-300-2114,SCA-300-2113 -r /path/to/project/scaResults.json --remote
    

    If you leave out -i, -I and -L, Fix tries to upgrade every vulnerable library.

  5. Review the patch and the report. Fix applies the patch and writes a Markdown report to disk. Read the report, run your tests, then commit like any other change.

--remote is required on every veracode fix sca run. Full flags are in the command reference.

Option B: from a GitHub pull request

Good for teams that want fixes to arrive as normal pull requests, with no per-developer setup.

  1. Turn it on in veracode.yml. The GitHub Workflow Integration docs show:

    veracode_sca_scan:
      push:
        trigger: true
      pull_request:
        trigger: true
      fix_for_sca:
        pull_request:
          trigger: true
    
  2. Open a pull request. The SCA scan runs and posts a comment listing the vulnerable libraries it found.

  3. Reply to that comment to pick the libraries to upgrade. To fix every SCA finding at once, reply with @veracode-fix SCA-*.

  4. Wait a few minutes. Fix runs in a Veracode-hosted sandbox, opens a new pull request with the changes, and posts a comment on your original pull request linking to it.

  5. Review and merge. The Fix report is the new pull request's description. Let your CI run, review the changes, and merge.

Reading the results

Every run produces a Fix report that lists each change and each skipped item, with the reason.

Where you ran it Where the report shows up
CLI A Markdown file on disk, next to the applied patch
GitHub pull request The description of the new Fix pull request. If every candidate was skipped, it's a comment on your original pull request instead

When you read it, look for three things:

  • What changed: each library Fix upgraded or pinned, and any code it edited to handle API changes.
  • What was skipped: usually a transitive dependency that needs a major upgrade, or a library with no safe version yet.
  • What needs you: anything flagged for manual review, such as a language version upgrade or a framework migration.

Tips and FAQ

Start with a list, not a fix. Run with -L first to see what Fix can upgrade. It's a quick way to size the work before you change anything.

Start small. Pick a few Fix IDs with -i or -I on your first runs. Smaller changes are easier to review, and you'll learn how Fix handles your codebase.

Let your tests do the checking. Fix aims to keep your code working, but the patches are AI-generated. Treat the pull request like any teammate's: run CI and review it.

Expect some runs to take longer. Run time grows with the number of libraries, whether breaking changes need code edits, and the size of the codebase.

Does it work in my IDE? Not today. In the IDE plugins, Veracode Fix covers SAST findings. Fix for SCA runs from the CLI and from GitHub pull requests.

Why didn't it upgrade a transitive dependency? Fix pins transitive dependencies only when no major version jump is needed. Major jumps are skipped and listed in the report so you can plan them.

What happens to my code? Fix uploads your source files and SCA results to a sandbox, generates the patches, and discards the uploaded files afterward.

Where can I ask questions? Post in the Community, or contact Veracode Technical Support about language support.

Learn more: Veracode Fix for SCA · veracode fix sca command reference · Use Veracode Fix in your development workflows