Skip to content

Scope dependency-scan to shipping deps and make it blocking - #1

Merged
kisst merged 1 commit into
mainfrom
fix/dependency-scan-shipping-scope
Jul 21, 2026
Merged

Scope dependency-scan to shipping deps and make it blocking#1
kisst merged 1 commit into
mainfrom
fix/dependency-scan-shipping-scope

Conversation

@kisst

@kisst kisst commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Problem

The dependency-scan job was silently failing on every push. The overall CI run reported success only because the job was marked continue-on-error: true, so the red X was permanent noise.

Root cause: the job dumped the entire Gradle dependency graph (all configurations, 282 packages) into a synthetic pom.xml and fed it to OSV-scanner, which exits non-zero on any CVE. The 39 CVEs found (netty, logback, protobuf, commons-io) all live in build/test-only configurations:

Config What it is Ships in APK?
ktlint linter's own classpath ❌ no
testRuntimeOnly test runtime (AGP Unified Test Platform) ❌ no

None reach releaseRuntimeClasspath — the shipping closure is clean AndroidX/Kotlin/OkHttp.

Fix

Scope the scan to only what actually ships:

  • :app + :unshortenreleaseRuntimeClasspath
  • :core (JVM lib) → runtimeClasspath

Closure drops 282 → 106 packages. Since the scan is now meaningful, the job is flipped from warn-only to blocking — it goes red only when a genuinely shipped dependency gets a CVE.

Verification

  • Scoped closure contains 0 of the offending packages
  • Ran the real OSV-scanner v2.3.8 Docker image locally against the generated pom → No issues found, exit 0
  • actionlint on the workflow → clean

@kisst
kisst merged commit 4617b5e into main Jul 21, 2026
2 checks passed
@kisst
kisst deleted the fix/dependency-scan-shipping-scope branch July 21, 2026 09:59
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