Fix example vulnerable method for Go
These example steps provide a fix for a Denial of Service (DoS) attack vulnerable method in golang.org/x/text, which is included in the example-go-modules repository.
To complete this task:
-
In the Veracode Platform, select Scans & Analysis > Software Composition Analysis.
-
Select Agent-Based Scan.
-
Select your workspace.
-
Select Projects.
-
Select the veracode/example-go-modules project.
-
From Issues, search for
CVE-2021-38561
and select the issue number. -
Go to Vulnerable Methods where it shows that the
Parse
method is the vulnerable part of the library. -
To address the identified vulnerable method, do one of these tasks:
- Change your code to perform in the same manner without relying on this particular method.
- Follow the provided instructions to update the library to a safe version.