> For the complete documentation index, see [llms.txt](https://docs.debricked.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.debricked.com/overview/language-support/swift-package-manager.md).

# Swift package manager

Swift Package Manager (SPM) manages dependencies in Swift projects. Fortify SCA detects supported SPM dependency files and uses them to analyze project dependencies.

* Use `Package.swift` to identify **direct dependencies** declared by the project.
* Use `Package.resolved` to identify **resolved direct and indirect dependencies** and their resolved versions. It provides a **flat dependency list** and does not construct a dependency tree.
* Use `*.spm.debricked.lock` to identify **direct and indirect dependencies** and construct the **full transitive dependency tree**, using the recursive dependency data generated by Swift Package Manager.

### Dependency parsing limitations

Fortify SCA parses `Package.swift` using pattern-based extraction of statically declared package dependencies.

Complex Swift constructs may not be fully resolved. These include conditional compilation, dynamically constructed dependency arrays, and computed dependency values.

Commit all supported dependency files to the repository so Fortify SCA can include them in scans.

### Supported file formats and features

<table data-full-width="true"><thead><tr><th>Package manager</th><th>Supported file formats</th><th data-type="checkbox">Root dependencies</th><th data-type="checkbox">Indirect dependencies</th><th data-type="checkbox">Dependency trees</th><th data-type="checkbox">Security scanning</th><th data-type="checkbox">License scanning</th><th data-type="checkbox">Root fix</th><th data-type="checkbox">Pull Request</th><th data-type="checkbox">Reachability Analysis</th><th>High Performance Scan</th></tr></thead><tbody><tr><td>Swift package manager</td><td><code>Package.swift</code></td><td>true</td><td>false</td><td>false</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>Yes</td></tr><tr><td>Swift package manager</td><td><code>Package.resolved</code></td><td>true</td><td>true</td><td>false</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>Yes</td></tr><tr><td>Swift package manager</td><td><code>*.spm.debricked.lock</code></td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>false</td><td>Yes*</td></tr></tbody></table>

**\*** This is a native lock file format. Native lock file formats are the fastest formats to scan.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.debricked.com/overview/language-support/swift-package-manager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
