Skip to content

Commit bdceb4e

Browse files
ci(security): drop HTML/email report, go artifact-only (#171)
## Summary The kernel's OSV `securityScan.yml` was already fail-closed and hardened (PR #118), and its `Send Email` step was already commented out (SMTP creds never provisioned). This removes the now-dead email machinery entirely for parity with the Go / Node / Python / JDBC gates, which moved to **artifact-only** for the planned cross-repo findings collator: - Remove the `Compose email body` step (built an HTML report only the disabled email used). - Remove the commented-out `Send Email` block. - Stop uploading `security-scan-report.html`; upload the machine-readable `osv-out.json` + `all-findings.json` (plus the SBOMs) instead. The scheduled run still fails red on any finding. **No change** to the scan, the fail-closed gate logic, the fail-on-any policy, or the severity resolution — only the notification/report path. ## Test plan - [x] YAML validated. - [x] No dangling `security-scan-report.html` / email references remain. - [x] Confirmed `all-findings.json` is produced by the `Collect findings` step, so the upload path is real. This pull request and its description were written by Isaac. Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent c37548c commit bdceb4e

1 file changed

Lines changed: 9 additions & 61 deletions

File tree

‎.github/workflows/securityScan.yml‎

Lines changed: 9 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -293,69 +293,17 @@ jobs:
293293
echo "Full step summary: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
294294
exit 1
295295
296-
- name: Compose email body
297-
# See "Collect findings" above for why this step intentionally
298-
# omits `-e`.
299-
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && steps.findings.outputs.total_findings != '0'
300-
run: |
301-
set -uo pipefail
302-
{
303-
echo "<!DOCTYPE html><html><head><title>Kernel Security Scan Results</title>"
304-
echo "<style>"
305-
echo " body { font-family: -apple-system, sans-serif; }"
306-
echo " table { border-collapse: collapse; margin-top: 1em; }"
307-
echo " th, td { border: 1px solid #ddd; padding: 6px 12px; text-align: left; }"
308-
echo " th { background: #f5f5f5; }"
309-
echo " tr.high { background: #ffe5e5; }"
310-
echo " tr.medium { background: #fff5e5; }"
311-
# Unscored findings are also gate-blocking under the
312-
# fail-on-any policy (textual-severity advisories often
313-
# describe HIGH-impact issues with no numeric CVSS).
314-
# Style them the same as high so recipients don't misread
315-
# the lack of a number as "low risk".
316-
echo " tr.unscored { background: #ffe5e5; }"
317-
echo "</style></head><body>"
318-
echo "<h1>Security Vulnerabilities Found</h1>"
319-
echo "<p><b>${{ steps.findings.outputs.total_findings }}</b> unsuppressed finding(s) on main.</p>"
320-
echo "<p>All findings fail the run; document accepted risk via osv-scanner.toml.</p>"
321-
echo "<p>Full reports: <a href='https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'>View Artifacts</a></p>"
322-
echo "<table><tr><th>Severity</th><th>Package</th><th>IDs</th></tr>"
323-
jq -r '.[] |
324-
(if .display == "unscored" then "unscored"
325-
elif .severity >= 7 then "high"
326-
elif .severity >= 4 then "medium"
327-
else "" end) as $cls |
328-
"<tr class=\"\($cls)\"><td>\(.display)</td><td>\(.pkg)</td><td>\(.ids | join(", "))</td></tr>"
329-
' /tmp/all-findings.json
330-
echo "</table>"
331-
echo "</body></html>"
332-
} > security-scan-report.html
333-
334-
# Email notification deferred — the SMTP credentials path
335-
# (SMTP_USERNAME / SMTP_PASSWORD / EMAIL_RECIPIENTS) hasn't
336-
# been provisioned. The HTML report is still produced and
337-
# uploaded as a run artifact (see `Upload reports` below), so
338-
# triagers can pull it after a scheduled-run failure without
339-
# needing the email. Re-enable when SMTP creds are wired up.
340-
#
341-
# - name: Send Email
342-
# if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && steps.findings.outputs.total_findings != '0'
343-
# uses: dawidd6/action-send-mail@4226df7daafa6fc901a43789c49bf7ab309066e7 # v3.11.0
344-
# with:
345-
# server_address: smtp.gmail.com
346-
# server_port: 465
347-
# username: ${{ secrets.SMTP_USERNAME }}
348-
# password: ${{ secrets.SMTP_PASSWORD }}
349-
# subject: Databricks SQL Kernel Security Scan - Vulnerabilities Found
350-
# html_body: file://security-scan-report.html
351-
# to: ${{ secrets.EMAIL_RECIPIENTS }}
352-
# from: Kernel Security Scanner
353-
# content_type: text/html
354-
296+
# Notification is intentionally NOT done here (no email, no HTML
297+
# report). A separate cross-repo action collates the uploaded raw
298+
# osv-out.json / all-findings.json artifacts across all driver repos
299+
# and sends a single digest -- parity with the Go / Node / Python /
300+
# JDBC gates. This job's job is to (a) fail so the scheduled run is
301+
# red when anything is found, and (b) upload the machine-readable
302+
# findings for the collator to consume.
355303
- name: Fail on findings (scheduled/manual)
356304
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && steps.findings.outputs.total_findings != '0'
357305
run: |
358-
echo "::error::${{ steps.findings.outputs.total_findings }} unsuppressed OSV finding(s) on main. Download the security-scan-reports artifact for the HTML report."
306+
echo "::error::${{ steps.findings.outputs.total_findings }} unsuppressed OSV finding(s) on main. Download the security-scan-reports artifact for the raw findings."
359307
exit 1
360308
361309
- name: Upload reports
@@ -365,8 +313,8 @@ jobs:
365313
name: security-scan-reports
366314
path: |
367315
/tmp/osv-out.json
316+
/tmp/all-findings.json
368317
/tmp/sboms/
369-
security-scan-report.html
370318
if-no-files-found: ignore
371319
# SBOMs/reports stick around long enough to triage a finding
372320
# without being part of the 90-day default retention.

0 commit comments

Comments
 (0)