Skip to main content

Veracode Fix

Veracode Fix is an intelligent remediation solution that helps your development teams reduce the time and effort they spend securing their applications. Developers can use Fix to get AI-generated code patches, review the suggested patches, and directly apply them to flaws in their application source, without writing any code.

Veracode Fix resolves findings found by Pipeline Scan, but doesn't resolve findings found by Upload and Scan.

How Veracode Fix helps developers

Veracode data shows that organizations are not keeping up with their security debt. Developers lack the training, experience, and tools to find and fix security findings in their code. A 2022 report by Techstrong Research showed that 73% of developers are expected to write secure code, but lack the adequate tools and knowledge.

The amount of time it takes for developers to remediate only half of their open findings in a given codebase continues to grow. Typically, developers must update codebases that have several security findings, and they are responsible for the overall security of any applications they build with these codebases. Their organization might also hold them accountable for addressing the security debt of their applications. Developers must spend time and work through the frustration of finding, researching, and fixing, security findings that they might not have created, in code they might not have written.

Veracode Fix provides contextual suggestions for each finding. Developers can review and apply each suggested fix to their code, reducing the time spent researching and fixing flaws across all codebases.

Video: Veracode Fix


How Veracode Fix works

Veracode Fix analyzes application source files alongside findings from a Static Analysis performed with Veracode Pipeline Scan. It processes the results—including CWE IDs, flaw severities, and flaw locations—to generate secure code patches. These patches replace vulnerable code with fixes generated using remediation data from Veracode.

Fix uses a machine learning (ML) model to generate secure patches for complex codebases. When you request a fix, it applies a retrieval-augmented generation (RAG) technique to find a secure patch from Veracode remediation data.

To determine the best suggested fixes, Fix analyzes key factors such as the CWE ID, the programming language, the risky function (or "sink"), and the surrounding code context. Each suggested code patch demonstrates secure coding practices for addressing a specific flaw in a specific location. Veracode routinely refines these patches using Static Analysis flaw data and real-world vulnerabilities to ensure accuracy and security.

Each time you run Fix, it does the following:

  1. Uploads a copy of your source files and Static Analysis results file, results.json, from a Pipeline Scan to the Veracode Intelligent Remediation Engine.
  2. Uses the ML model to compare the code in your source files against secure code samples from Veracode.
  3. Returns a list of flaws you can fix. Each flaw includes the Common Weakness Enumeration (CWE) ID, a brief description of the flaw, and the line of code where the flaw exists. If you use Fix in the Veracode CLI, the flaws appear as a numbered list of issues.
  4. Matches a patch from the secure code samples provided by Veracode to your code and suggests up to five fixes for the selected flaw. If no relevant fixes exist, Fix returns No fixes found.
  5. Applies the selected fix by rewriting the affected code.
  6. Discards the uploaded results.json file, ensuring that it is no longer accessible to Veracode.

After applying a fix for a routine injection flaw, such as CRLF injection, cross-site scripting (XSS), or SQL injection, Veracode recommends testing your code before committing it. For other flaw categories, additional steps might be required. For example, if Veracode recommends updating a hashing algorithm to a more secure version, such as migrating from MD5 to SHA, you must update all instances of hashed data. If the hashed data is part of an interface, update its definition and ensure all parties using it also update their implementations.

Account requirements

To use Fix, you must have one of the following accounts:

  • User account with the Submitter user role.
  • API account with the Submitter API role.

Supported integrations

Veracode Fix is integrated with the following products:

Supported languages

Supported CWEs

Veracode Fix suggests fixes for the following CWEs in each supported language. For a complete list of CWEs supported by each Veracode scan type, see Veracode and the CWE.

C#

CWE IDCWE nameSingle fix supportBatch fix support
73External Control of File Name or PathYesNo
80Improper Neutralization of Script-Related HTML Tags in a Web PageYesYes
89Improper Neutralization of Special Elements used in an SQL CommandYesYes
117Improper Output Neutralization for LogsYesYes
209Information Exposure Through an Error MessageYesYes
316Cleartext Storage of Sensitive Information in MemoryYesYes
327Use of a Broken or Risky Cryptographic AlgorithmYesNo
331Insufficient EntropyYesYes
352Cross-Site Request Forgery (CSRF)YesYes
404Improper Resource Shutdown or ReleaseYesYes
601URL Redirection to Untrusted Site ('Open Redirect')YesNo
611Improper Restriction of XML External Entity ReferenceYesYes

COBOL

CWE IDCWE nameSingle fix supportBatch fix support
78Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)YesNo
209Information Exposure Through an Error MessageYesNo
248Uncaught ExceptionYesNo
489Leftover Debug CodeYesNo
252Unchecked Return ValueYesNo

Go

CWE IDCWE nameSingle fix supportBatch fix support
73External Control of File Name or PathYesYes
78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')YesYes
117Improper Output Neutralization for LogsYesYes

Java

CWE IDCWE nameSingle fix supportBatch fix support
80Improper Neutralization of Script-Related HTML Tags in a Web PageYesYes
89Improper Neutralization of Special Elements used in an SQL CommandYesYes
113Improper Neutralization of CRLF Sequences in HTTP HeadersYesYes
117Improper Output Neutralization for LogsYesYes
159Improper Handling of Invalid Use of Special ElementsYesYes
209Generation of Error Message Containing Sensitive InformationYesYes
327Use of a Broken or Risky Cryptographic AlgorithmYesNo
331Insufficient EntropyYesYes
404Improper Resource Shutdown or ReleaseYesYes
502Deserialization of Untrusted DataYesNo
597Use of Wrong Operator in String ComparisonYesYes
601URL Redirection to Untrusted Site ('Open Redirect')YesNo
611Improper Restriction of XML External Entity ReferenceYesYes

JavaScript and TypeScript

CWE IDCWE nameSingle fix supportBatch fix support
73External Control of File Name or PathYesNo
78Improper Neutralization of Special Elements used in an OS CommandYesNo
80Improper Neutralization of Script-Related HTML Tags in a Web PageYesYes
89Improper Neutralization of Special Elements used in an SQL CommandYesYes
113Improper Neutralization of CRLF Sequences in HTTP HeadersYesYes
117Improper Output Neutralization for LogsYesYes
209Generation of Error Message Containing Sensitive InformationYesYes
311Missing Encryption of Sensitive DataYesNo
312Cleartext Storage of Sensitive InformationYesNo
327Use of a Broken or Risky Cryptographic AlgorithmYesNo
352Cross-Site Request Forgery (CSRF)YesYes
601URL Redirection to Untrusted Site ('Open Redirect')YesYes
611Improper Restriction of XML External Entity ReferenceYesYes
614Sensitive Cookie in HTTPS Session Without 'Secure' AttributeYesYes

Kotlin

CWE IDCWE nameSingle fix supportBatch fix support
80Improper Neutralization of Script-Related HTML Tags in a Web PageYesYes
89Improper Neutralization of Special Elements used in an SQL CommandYesYes
113Improper Neutralization of CRLF Sequences in HTTP HeadersYesYes
117Improper Output Neutralization for LogsYesYes
331Insufficient EntropyYesYes
404Improper Resource Shutdown or ReleaseYesYes

PHP

CWE IDCWE nameSingle fix supportBatch fix support
73External Control of File Name or PathYesNo
80Improper Neutralization of Script-Related HTML Tags in a Web PageYesYes
89Improper Neutralization of Special Elements used in an SQL CommandYesYes
117Improper Output Neutralization for LogsYesYes

Python

CWE IDCWE nameSingle fix supportBatch fix support
73External Control of File Name or PathYesNo
78Improper Neutralization of Special Elements used in an OS CommandYesYes
80Improper Neutralization of Script-Related HTML Tags in a Web PageYesYes
89Improper Neutralization of Special Elements used in an SQL CommandYesYes
295Improper Certificate ValidationYesYes
327Use of a Broken or Risky Cryptographic AlgorithmYesNo
331Insufficient EntropyYesYes
601URL Redirection to Untrusted Site ('Open Redirect')YesNo
757Selection of Less-Secure Algorithm During Negotiation ('Algorithm Downgrade')YesYes

Ruby

CWE IDCWE nameSingle fix supportBatch fix support
73External Control of File Name or PathYesYes
80Improper Neutralization of Script-Related HTML Tags in a Web PageYesYes
89Improper Neutralization of Special Elements used in an SQL CommandYesYes
117Improper Output Neutralization for LogsYesYes
601URL Redirection to Untrusted Site ('Open Redirect')YesYes

Scala

CWE IDCWE nameSingle fix supportBatch fix support
78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')YesYes
80Improper Neutralization of Script-Related HTML Tags in a Web Page (HTML Injection)YesYes
117Improper Output Neutralization for LogsYesYes
611Improper Restriction of XML External Entity ReferenceYesYes