Skip to content

Commit 4bd7c81

Browse files
authored
Update module.yaml
Signed-off-by: stlef14 <stlef14@users.noreply.github.com>
1 parent fb59106 commit 4bd7c81

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

scanners/boostsecurityio/trivy-sbom/module.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ steps:
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

0 commit comments

Comments
 (0)