Skip to content

Commit

Permalink
Some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
antfie committed Mar 7, 2023
1 parent f2f6fc5 commit 8672561
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion analyze_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 5 additions & 2 deletions recommendations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit 8672561

Please sign in to comment.