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
- 1Remove the Xcode project directory from anything the web server maps.
- 2Treat any private repository hostname the file disclosed as known, and confirm those hosts require authentication.
- 3Check whether any internal package name it lists could be claimed on a public registry.
Code examples
Find project files under the served root
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.
More supply chain checks
- Mediumnpm/yarn Lock File Exposed
- MediumPython Requirements File Exposed
- MediumRuby Gemfile or Gemfile.lock Exposed
- MediumExternal CDN Script Without SRI Hash
- HighHTTP Script Loaded on HTTPS Page
- MediumPHP composer.json or composer.lock Exposed
- HighDockerfile or docker-compose.yml Exposed
- Critical.env File Exposed at Public URL
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.