Skip to main content
LowSupply chainOWASP A05:2021CWE-540

How to fix: Swift Package.resolved exposed

The response is a Swift Package Manager resolution file, served over HTTP. Its pins array carries repository locations and the exact commit revisions the build is pinned to.

Why it matters

Every dependency is listed with its source repository URL and the exact commit it is pinned to. Private repository URLs appear verbatim, which discloses internal GitHub Enterprise or self-hosted git hostnames and the names of internal packages, and internal package names are the raw material for a dependency-confusion attempt.

Package.resolved belongs to an Xcode project, so finding one served over HTTP usually means an entire app repository was deployed to a web host, often as part of a documentation or download page. The commit pins themselves are a good practice; the exposure is the private repository URLs beside them.

How to fix it

  1. 1Remove the Xcode project directory from anything the web server maps.
  2. 2Treat any private repository hostname the file disclosed as known, and confirm those hosts require authentication.
  3. 3Check whether any internal package name it lists could be claimed on a public registry.

Code examples

Find project files under the served root

bash
find /var/www -name 'Package.resolved' -o -name '*.xcodeproj' -o -name 'Package.swift'

References

Detected automatically by VulnRadar. The check id is supply-chain-swift-package-resolved-exposed, stable across every scan so you can filter or diff on it.

See every supply chain check

Questions

How severe is Swift Package.resolved exposed?
VulnRadar rates this low severity in the supply chain category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id supply-chain-swift-package-resolved-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Swift Package.resolved exposed map to?
It maps to CWE-540. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for swift package.resolved exposed

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: Swift Package.resolved exposed | VulnRadar