File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
scanners/boostsecurityio/trivy-sbom Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 3131 - scan :
3232 command :
3333 run : |
34- SCAN_TARGET=""
34+ TEMP_SOLN_FILE="temp"
35+ SCAN_TARGET=$TEMP_SOLN_FILE".sln"
3536
3637 # Find all .csproj files once (search up to depth 5 for performance)
3738 PROJECT_LIST=$(find . -maxdepth 5 -name "*.csproj" -type f)
@@ -42,15 +43,13 @@ steps:
4243 fi
4344
4445 # Create temporary solution to merge all projects
45- dotnet new sln -n temp --force >/dev/null 2>&1 || true
46+ dotnet new sln -n $TEMP_SOLN_FILE --force >/dev/null 2>&1 || true
4647
4748 # Add all found .csproj files to the solution
4849 echo "$PROJECT_LIST" | while IFS= read -r proj; do
49- [ -n "$proj" ] && dotnet sln temp.sln add "$proj" >/dev/null 2>&1 || true
50+ [ -n "$proj" ] && dotnet sln $SCAN_TARGET add "$proj" >/dev/null 2>&1 || true
5051 done
51-
52- SCAN_TARGET="./temp.sln"
53-
52+
5453 # Restore packages while ignoring errors.
5554 if [ -n "$SCAN_TARGET" ]; then
5655 dotnet restore "$SCAN_TARGET" --ignore-failed-sources --no-cache >/dev/null 2>&1 || true
You can’t perform that action at this time.
0 commit comments