Part 1 of #434: a mobile app whose dependencies cannot be listed no longer reads as "0 packages, 0 CVEs". Part 2 (an SBOM for Gradle apps without a lockfile, from the version catalog) follows separately.
What was wrong (measured on fixtures, syft 1.52, OSV)
unlocked_ecosystems only looked at the repository root and only at npm, Python and Cargo. An Android, iOS or Flutter app without a lockfile gave an empty SBOM with no warning.
SwiftPM never matched an advisory: Syft writes pkg:swift/github.com/apple/swift-nio-http2.git/swift-nio-http2@1.19.0. OSV returns nothing for that; for pkg:swift/github.com/apple/swift-nio-http2@1.19.0 it returns 7 advisories.
CocoaPods has no ecosystem in OSV, so pods silently showed 0 CVEs.
Misaligned OSV answers:query_osv_batch dropped entries without a purl, but mapped the answers back by index. Every component after such an entry got its neighbour's advisories. Syft emits components without a purl, for example in Swift projects.
A batch OSV refused was turned into empty answers, again silently.
Change
pipeline/sbom/mobile.rs (new):
Walks the tree to depth 8, skipping Pods/, build/, .gradle/, node_modules/, DerivedData/, Carthage/, .dart_tool/ and .symlinks/.
Gradle, CocoaPods, SwiftPM and Pub count as locked when any of their lockfiles is anywhere in the tree. A module or Dart library without its own lockfile is normal.
An Xcode project that references Swift packages (XCRemoteSwiftPackageReference) counts as a SwiftPM manifest. Its Package.resolved is found inside the .xcodeproj.
Carthage is always reported, since no tool reads Cartfile.resolved.
Each gap becomes a skipped sbom_dependencies stage naming the shallowest manifest.
npm, Python and Cargo stay root-only, so the existing baselines are unchanged.
sbom/syft.rs:canonical_purl rewrites Swift purls to the repository form. It is idempotent, and other purls are untouched.
pipeline/cve.rs:
scan_dependencies returns CveLookup.
Answers are mapped by entry index.
CocoaPods entries are not queried.
Pods and the entries of a refused batch are listed in unchecked, which the orchestrator records as CVE-Abgleich unvollständig (at most 10 named, the rest counted). The hourly CVE monitor uses only the alerts.
Requirements checked only on components (cra-ai-22/23/33) are Nicht bewertet with the new reason dependencies_unresolved while a manifest is unresolved. Dashboard text is in DE and EN.
This applies to the npm, Python and Cargo gaps too: their SBOM is just as incomplete.
Docs:docs/guide/sbom.md covers the mobile lockfiles, Gradle dependency locking, Carthage and CocoaPods.
fmt, plus clippy with the CI flags on the agent and on both dashboard feature sets.
Agent lib tests: 492. Dashboard i18n tests: 14.
Local nightly on the staging image with this binary: the 7 mobile targets plus js-no-lockfile, js-pnpm, py-poetry, fw-embedded-libs and archive-order-intake. Both the bless run and the compare run on a fresh database pass. No existing baseline changed: py-poetry gained one new OSV advisory that has nothing to do with this PR, and I left it out.
Part 1 of #434: a mobile app whose dependencies cannot be listed no longer reads as "0 packages, 0 CVEs". Part 2 (an SBOM for Gradle apps without a lockfile, from the version catalog) follows separately.
## What was wrong (measured on fixtures, syft 1.52, OSV)
- `unlocked_ecosystems` only looked at the repository root and only at npm, Python and Cargo. An Android, iOS or Flutter app without a lockfile gave an empty SBOM with no warning.
- **SwiftPM never matched an advisory:** Syft writes `pkg:swift/github.com/apple/swift-nio-http2.git/swift-nio-http2@1.19.0`. OSV returns nothing for that; for `pkg:swift/github.com/apple/swift-nio-http2@1.19.0` it returns 7 advisories.
- **CocoaPods** has no ecosystem in OSV, so pods silently showed 0 CVEs.
- **Misaligned OSV answers:** `query_osv_batch` dropped entries without a purl, but mapped the answers back by index. Every component after such an entry got its neighbour's advisories. Syft emits components without a purl, for example in Swift projects.
- A batch OSV refused was turned into empty answers, again silently.
## Change
- **`pipeline/sbom/mobile.rs` (new):**
- Walks the tree to depth 8, skipping `Pods/`, `build/`, `.gradle/`, `node_modules/`, `DerivedData/`, `Carthage/`, `.dart_tool/` and `.symlinks/`.
- Gradle, CocoaPods, SwiftPM and Pub count as locked when any of their lockfiles is anywhere in the tree. A module or Dart library without its own lockfile is normal.
- An Xcode project that references Swift packages (`XCRemoteSwiftPackageReference`) counts as a SwiftPM manifest. Its `Package.resolved` is found inside the `.xcodeproj`.
- Carthage is always reported, since no tool reads `Cartfile.resolved`.
- Each gap becomes a skipped `sbom_dependencies` stage naming the shallowest manifest.
- npm, Python and Cargo stay root-only, so the existing baselines are unchanged.
- **`sbom/syft.rs`:** `canonical_purl` rewrites Swift purls to the repository form. It is idempotent, and other purls are untouched.
- **`pipeline/cve.rs`:**
- `scan_dependencies` returns `CveLookup`.
- Answers are mapped by entry index.
- CocoaPods entries are not queried.
- Pods and the entries of a refused batch are listed in `unchecked`, which the orchestrator records as `CVE-Abgleich unvollständig` (at most 10 named, the rest counted). The hourly CVE monitor uses only the alerts.
- **CRA view (`evidence/compliance.rs`):**
- `has_components: bool` becomes `SbomCoverage { Complete, Empty, Unresolved(manifests) }`.
- Requirements checked only on components (cra-ai-22/23/33) are *Nicht bewertet* with the new reason `dependencies_unresolved` while a manifest is unresolved. Dashboard text is in DE and EN.
- This applies to the npm, Python and Cargo gaps too: their SBOM is just as incomplete.
- **Docs:** `docs/guide/sbom.md` covers the mobile lockfiles, Gradle dependency locking, Carthage and CocoaPods.
## Fixtures (`fixtures/nightly/mobile/`, 7 targets, baselines blessed)
| Target | SBOM | CVEs | Skipped |
|---|---|---|---|
| android-gradle-lock | 3 Maven | 3 | none |
| android-gradle-catalog | none | none | sbom_dependencies |
| ios-cocoapods | 2 pods | none | cve_lookup |
| ios-spm-xcode | swift-nio-http2 | 7 | none |
| ios-spm-unlocked | none | none | sbom_dependencies |
| flutter | dio | 1 | sbom_dependencies (Android host app) |
| react-native | 4 npm | 31 | sbom_dependencies (Podfile, Gradle) |
## Checks
- fmt, plus clippy with the CI flags on the agent and on both dashboard feature sets.
- Agent lib tests: 492. Dashboard i18n tests: 14.
- **Local nightly on the staging image with this binary:** the 7 mobile targets plus js-no-lockfile, js-pnpm, py-poetry, fw-embedded-libs and archive-order-intake. Both the bless run and the compare run on a fresh database pass. No existing baseline changed: py-poetry gained one new OSV advisory that has nothing to do with this PR, and I left it out.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
A Gradle, CocoaPods, SwiftPM or Flutter app without a lockfile got an SBOM
with no packages and no CVEs and no word about it. Now:
- sbom/mobile.rs walks the tree (android/, ios/, Xcode projects) and
records a skipped sbom_dependencies stage for each mobile ecosystem whose
manifest has no lockfile anywhere (Gradle, CocoaPods, SwiftPM incl.
Xcode package references, Pub), and for Carthage, which no tool reads.
- The CRA view rates the SBOM requirements Nicht bewertet with the new
reason dependencies_unresolved when a manifest was not resolved.
- Swift purls are rewritten to the repository form OSV keys advisories
by; in Syft's form no Swift package ever matched an advisory.
- CocoaPods components are not sent to OSV (it has no such ecosystem) and
are listed as unchecked, as are components of a batch OSV refused.
- OSV answers are mapped back by entry index: an entry without a purl
shifted every later answer onto the wrong component.
- Seven nightly fixtures (Android with and without lockfile, CocoaPods,
SwiftPM in Xcode with and without Package.resolved, Flutter, React
Native) with blessed baselines; docs/guide/sbom.md covers mobile.
Refs #434.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part 1 of #434: a mobile app whose dependencies cannot be listed no longer reads as "0 packages, 0 CVEs". Part 2 (an SBOM for Gradle apps without a lockfile, from the version catalog) follows separately.
What was wrong (measured on fixtures, syft 1.52, OSV)
unlocked_ecosystemsonly looked at the repository root and only at npm, Python and Cargo. An Android, iOS or Flutter app without a lockfile gave an empty SBOM with no warning.pkg:swift/github.com/apple/swift-nio-http2.git/swift-nio-http2@1.19.0. OSV returns nothing for that; forpkg:swift/github.com/apple/swift-nio-http2@1.19.0it returns 7 advisories.query_osv_batchdropped entries without a purl, but mapped the answers back by index. Every component after such an entry got its neighbour's advisories. Syft emits components without a purl, for example in Swift projects.Change
pipeline/sbom/mobile.rs(new):Pods/,build/,.gradle/,node_modules/,DerivedData/,Carthage/,.dart_tool/and.symlinks/.XCRemoteSwiftPackageReference) counts as a SwiftPM manifest. ItsPackage.resolvedis found inside the.xcodeproj.Cartfile.resolved.sbom_dependenciesstage naming the shallowest manifest.sbom/syft.rs:canonical_purlrewrites Swift purls to the repository form. It is idempotent, and other purls are untouched.pipeline/cve.rs:scan_dependenciesreturnsCveLookup.unchecked, which the orchestrator records asCVE-Abgleich unvollständig(at most 10 named, the rest counted). The hourly CVE monitor uses only the alerts.evidence/compliance.rs):has_components: boolbecomesSbomCoverage { Complete, Empty, Unresolved(manifests) }.dependencies_unresolvedwhile a manifest is unresolved. Dashboard text is in DE and EN.docs/guide/sbom.mdcovers the mobile lockfiles, Gradle dependency locking, Carthage and CocoaPods.Fixtures (
fixtures/nightly/mobile/, 7 targets, baselines blessed)Checks
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p