Skip to content

Add OSV-Scanner-based security workflow#362

Open
vikrantpuppala wants to merge 1 commit into
mainfrom
vp/security-scan
Open

Add OSV-Scanner-based security workflow#362
vikrantpuppala wants to merge 1 commit into
mainfrom
vp/security-scan

Conversation

@vikrantpuppala
Copy link
Copy Markdown
Collaborator

Summary

  • Adds .github/workflows/securityScan.yml — single workflow, single job, three triggers (PR / weekly cron / manual). PR runs fail on CVSS ≥ 7 only; weekly runs report all findings and email the team.
  • Adds osv-scanner.toml — empty suppressions file (populate iteratively as real false positives surface).
  • Reuses the existing ./.github/actions/setup-jfrog composite action — no duplicate OIDC-token logic.

Mirrors the JDBC driver's workflow (databricks-jdbc#1460), adapted for Go: reads go.mod natively via OSV-Scanner (no separate SBOM tool needed).

Day-one results

The workflow is not yet wired into branch protection, so its first PR-time runs are advisory. A dry-run against current main surfaces:

  • 5 HIGH (CVSS ≥ 7) — golang-jwt/jwt/v5@5.2.1, apache/thrift@0.17.0, golang.org/x/crypto@0.31.0, golang.org/x/oauth2@0.7.0, google.golang.org/protobuf@1.28.1
  • 5 MEDIUM, 60 LOW (mostly stdlib@1.20.99 advisories — addressed by bumping the Go toolchain)

All are legitimate findings, not false positives. A follow-up dep-bump PR will clear them. Once that's green, branch protection can be flipped to require this check.

Test plan

  • Dry-run OSV-Scanner v2.3.8 locally against go.mod — produces expected findings
  • YAML validates
  • First CI run on this PR exercises the PR path (will fail by design — the 5 HIGHs above)
  • Manual workflow_dispatch after merge exercises the weekly path
  • Secrets (SMTP_USERNAME, SMTP_PASSWORD, EMAIL_RECIPIENTS) wired in repo settings before the first scheduled run

This pull request was AI-assisted by Isaac.

Single workflow, single job, three triggers:
  - pull_request to main: fails on CVSS >= 7 findings only
    (HIGH/CRITICAL block merges; MED/LOW visible but non-blocking)
  - cron weekly (Sunday 00:00 UTC): reports ALL findings via email
  - workflow_dispatch: behaves like cron

Mirrors the JDBC driver's security workflow (databricks-jdbc#1460)
adapted for Go:
  - Reads go.mod natively via OSV-Scanner --lockfile (no SBOM step)
  - Reuses the existing ./.github/actions/setup-jfrog composite action
    for the GOPROXY OIDC token dance
  - Suppressions in osv-scanner.toml ([[IgnoredVulns]] schema)

The workflow is not yet wired into branch protection. Day-one runs
against current main will surface 5 HIGH findings (golang-jwt/jwt/v5,
apache/thrift, golang.org/x/crypto, golang.org/x/oauth2,
google.golang.org/protobuf) that will be cleared by a follow-up
dep-bump PR.

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant