File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -171,15 +171,15 @@ jobs:
171171 echo "<details>" >> $GITHUB_STEP_SUMMARY
172172 echo "<summary>View $RESULTS finding(s)</summary>" >> $GITHUB_STEP_SUMMARY
173173 echo "" >> $GITHUB_STEP_SUMMARY
174- echo "| Level | Security | Rule | Location | Message |" >> $GITHUB_STEP_SUMMARY
175- echo "|-------|---------- |------|----------|---------|" >> $GITHUB_STEP_SUMMARY
174+ echo "| Level | Sec-Sev | Rule | Location | Message |" >> $GITHUB_STEP_SUMMARY
175+ echo "|-------|---------|------|----------|---------|" >> $GITHUB_STEP_SUMMARY
176176 # Join results with rules to get security-severity (which is on rule definitions, not results)
177177 jq -r '
178178 (.runs[0].tool.driver.rules // []) as $driver_rules |
179179 ([.runs[0].tool.extensions[]?.rules // []] | add // []) as $ext_rules |
180180 ($driver_rules + $ext_rules | map({(.id): (.properties["security-severity"] // null)}) | add // {}) as $severities |
181181 .runs[0].results[] |
182- "| \(.level // "warning") | \($severities[.ruleId] // "N/A") | \(.ruleId // "unknown") | `\(.locations[0].physicalLocation.artifactLocation.uri // "unknown"):\(.locations[0].physicalLocation.region.startLine // "?")` | \(.message.text | gsub("\n"; " ") | gsub("\\|"; "\\\\|") | .[0:80 ]) |"
182+ "| \(.level // "warning") | \($severities[.ruleId] // "N/A") | \(.ruleId // "unknown") | `\(.locations[0].physicalLocation.artifactLocation.uri // "unknown"):\(.locations[0].physicalLocation.region.startLine // "?")` | \(.message.text | gsub("\n"; " ") | gsub("\\|"; "\\\\|") | .[0:120 ]) |"
183183 ' "$sarif" >> $GITHUB_STEP_SUMMARY
184184 echo "" >> $GITHUB_STEP_SUMMARY
185185 echo "</details>" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change @@ -4,10 +4,9 @@ ARG BUILDER_IMAGE=maven:3.9.9-eclipse-temurin-17
44ARG RUNNER_IMAGE=eclipse-temurin:17
55
66# Builder stage runs as root; runner stage uses non-root user
7- # trivy:ignore:DS029
87FROM ${BUILDER_IMAGE} AS builder
9- # trivy:ignore:DS029
10- RUN apt-get update && apt-get install -y unzip
8+ # trivy:ignore:DS029 - Builder stage requires root for system package installation
9+ RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
1110COPY ./target/*oscal-cli.zip /tmp/oscal-cli.zip
1211WORKDIR /tmp
1312RUN unzip /tmp/oscal-cli.zip -d /opt/oscal-cli
Original file line number Diff line number Diff line change @@ -4,15 +4,14 @@ ARG BUILDER_IMAGE=maven:3.9.9-eclipse-temurin-17
44ARG RUNNER_IMAGE=eclipse-temurin:17
55
66# Builder stage runs as root; runner stage uses non-root user
7- # trivy:ignore:DS029
87FROM ${BUILDER_IMAGE} AS builder
98ARG BUILDER_JDK_VENDOR=temurin
109ARG BUILDER_JDK_MAJOR_VERSION=17
1110ARG BUILDER_JDK_HOME_PATH=/opt/java/openjdk
1211COPY . /usr/local/src
1312WORKDIR /usr/local/src
14- # trivy:ignore:DS029
15- RUN apt-get update && apt-get install -y unzip
13+ # trivy:ignore:DS029 - Builder stage requires root for system package installation
14+ RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
1615RUN <<EOF
1716mkdir -p /root/.m2
1817cat > /root/.m2/toolchains.xml << XMLEOF
You can’t perform that action at this time.
0 commit comments