diff --git a/analyze_files.go b/analyze_files.go index 5c0173f..cd53dda 100644 --- a/analyze_files.go +++ b/analyze_files.go @@ -36,7 +36,7 @@ func (data Data) analyzeUploadedFiles() { detectUnwantedFiles(data, &report, files, ".sln", ".NET solution file", []string{"Do not upload C# source code. They will not be scanned", "Veracode requires the .NET application to be compiled"}) detectUnwantedFiles(data, &report, files, ".csproj", "C# project file", []string{"Do not upload C# source code. They will not be scanned", "Veracode requires the .NET application to be compiled"}) detectUnwantedFiles(data, &report, files, ".c", "C source code file", []string{"Do not upload C source code. They will not be scanned", "Veracode requires the application to be compiled with debug symbols"}) - detectUnwantedFiles(data, &report, files, ".test.dll", "test artefacts", []string{"Do not upload any test code"}) + detectUnwantedFiles(data, &report, files, ".test.dll", "test artifact", []string{"Do not upload any test code"}) detectUnwantedFiles(data, &report, files, ".coffee", "CoffeeScript file", []string{"CoffeeScript source code files will not be scanned", "Review the JavaScript/TypeScript packaging cheatsheet: https://nhinv11.github.io/#/JavaScript%20/%20TypeScript", "Consider using the unofficial JavaScript/TypeScript packaging tool: https://github.com/fw10/veracode-javascript-packager"}) if report.Len() > 0 { diff --git a/recommendations.go b/recommendations.go index 2bbaa15..8978ef8 100644 --- a/recommendations.go +++ b/recommendations.go @@ -10,11 +10,14 @@ func (data Data) outputRecommendations(region string) { return } - if strings.Contains(strings.Join(*data.Recommendations, ""), ".NET") || strings.Contains(strings.Join(*data.Recommendations, ""), "C#") { + allRecommendations := strings.Join(*data.Recommendations, "") + + if strings.Contains(allRecommendations, ".NET") || strings.Contains(allRecommendations, "C#") { data.makeRecommendation("Review the .NET packaging cheatsheet: https://nhinv11.github.io/#/.NET") + data.makeRecommendation("Consider using the unofficial JavaScript/TypeScript packaging tool: https://github.com/nhinv11/veracode-dotnet-packager") } - if strings.Contains(strings.Join(*data.Recommendations, ""), "Java") { + if strings.Contains(allRecommendations, "Java ") { data.makeRecommendation("Review the Java packaging cheatsheet: https://nhinv11.github.io/#/Java") }