Dependency resolution and builds
A repository without a lock file only names its direct dependencies, often as version ranges. Scan it as it is and the dependency list is short or empty, so vulnerabilities in everything those libraries pull in never show up. Gradle projects without dependency locking are the usual case, and package.json without package-lock.json is a close second.
Dwaar closes that gap by resolving the dependencies itself before it scans. Some ecosystems can be resolved by asking the package registry. Others can only be resolved by running your build, and running a build means running code from your repository. That difference decides where the build may run.
Declared or generated
Every scan of a repository says where its dependency list came from, in the Dependencies column of the repository's Scans tab and in the scan's Dependency resolution section.
| Value | Meaning |
|---|---|
| Declared | Every manifest had a lock file in the repository. The versions are the ones you ship. |
| Generated | No lock file was committed, so Dwaar resolved one. |
| Partly generated | Some manifests had lock files, Dwaar resolved some, and some could not be resolved. |
| Unresolved | The repository has manifests, and none could be resolved. Their dependencies are not checked. |
The section lists each manifest with its lock file, how it was resolved, the tool and toolchain used, and the reason when it failed.
A generated lock file resolves to the versions available when the commit was made, or today where the tool cannot pin a date. Your deployed build may use older versions, so a generated list can miss vulnerabilities your release really has. Commit your lock files when you can: a declared lock file always wins over a generated one.
Which builds run your code
| Ecosystem | How Dwaar resolves it | Runs repository code |
|---|---|---|
| npm | Lock file only, install scripts off | No |
| Python, static metadata | Resolver against the package index | No |
Python, setup.py, dynamic metadata or a local (editable) requirement | The project's build backend | Yes |
| Rust | cargo generate-lockfile | No |
| PHP | Composer, scripts and plugins off | No |
| Maven | Resolver against Maven Central (private repositories need an outpost) | No |
| Maven, full dependency tree (when builds are on) | Maven itself, with the CycloneDX plugin and your .mvn extensions | Yes |
| Gradle | Gradle itself, with the version your wrapper names | Yes |
| Ruby | Bundler (a Gemfile is Ruby code) | Yes |
| .NET | dotnet restore (MSBuild evaluates your build files) | Yes |
A build that runs repository code also runs every plugin the build applies, including plugins downloaded from a plugin portal that are not in your repository at all.
Where builds that run code are allowed
| Where the scan runs | Builds that run repository code |
|---|---|
| A dedicated outpost | Recommended. The build runs on your host, in your network, next to your private registries. |
| Dwaar's cloud | An Enterprise feature, off by default. Your administrator requests it in Settings › Features, and Dwaar turns it on after a review. |
When builds that run code are off, Dwaar still resolves everything it can without them, and lists the rest as Skipped with the reason repo_code_not_allowed.
Use a dedicated outpost
An outpost already treats scan containers as hostile. A build is the most hostile of them, so give the outpost a host that runs nothing else:
- Deploy an outpost on its own host or task, as Deploy an outpost describes.
- Allow the package registries your builds need, including private ones, in its outbound connections.
- Route the repositories that need builds to that outpost.
Read the outpost security model with your security team before you turn builds on.
Request builds in Dwaar's cloud (Enterprise)
Running builds that run repository code in Dwaar's cloud is an Enterprise feature. A tenant administrator requests it from the console:
- Open Settings › Features.
- Find Run customer build code to generate lock files and select Request access.
- Optionally add a note on what you need it for, then select Send request.
The feature then shows Requested. Dwaar reviews the request and turns the feature on for your tenant, and its status changes to Enabled. Members who are not administrators see Ask your administrator instead of the button.
The feature applies to scans that start after it is on. To resolve a repository again right away, select Force rescan.
With the feature on, each build runs in its own isolated environment, with no access to other customers' data. Dwaar keeps only the resolved lock files, and their results are never shared with other tenants. Private registries are not reachable from Dwaar's cloud, so builds that need them belong on an outpost.
Try this next
Open a repository you know has no lock file, select Force rescan, and compare the Dependencies value and the dependency findings with the scan before it. If a manifest failed, its reason tells you whether a lock file, an outpost, or the Enterprise feature is the shortest way to a full list.