Viewing Flaws in Source Files


If the source file of a flaw is referenced by an open Eclipse project that is part of the current workspace, the Veracode Eclipse Plugin can open that source file and go to the line containing the flaw.

If source files are available but not referenced by any Eclipse project, it is possible to create an Eclipse project and add references to the directory containing the source files. This is only possible if the directory structure of the binaries uploaded to Veracode matches the directory structure of the local source files. More specifically, the plugin can open the source file of the flaw and locate the line where the flaw occurs as long as:
  • The folder structure within the Eclipse project is consistent with the Folder Path value in the Results view.
  • The filename of the source file matches the File Name value in the Results view.
To create a new Eclipse project and add references to existing source files:
  1. In Eclipse, go to Window > Show View > Other > Java > Package Explorer.
  2. Right-click the Package Explorer view.
  3. Select New Java Project and enter a name for the new project.
  4. In the Package Explorer view, right-click the new project and select Import.
  5. Expand the General folder node, select File System, and click Next.
  6. Click Browse, locate the src folder or the directory that contains the directory referenced in the first path segment of the folder path displayed in the Results view, and click OK.

    For example, if the Folder Path column of the Results view indicates that the folder path for one of the entries is org/apache/http/impl/io, instead of selecting the org folder, select the directory that contains the org folder.

  7. Select the checkbox next to the name of the selected directory and click Advanced.
  8. Select Create links in workspace, then select Create link locations relative to: PROJECT_LOC, and click Finish.
  9. Confirm that the path to the files within the Project in Package Explorer matches the path in the Results window.