Skip to content

Commit a9d93b1

Browse files
committed
CM-59977 updated docs
1 parent fcb6756 commit a9d93b1

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -668,15 +668,33 @@ In the previous example, if you wanted to only scan a branch named `dev`, you co
668668
> [!NOTE]
669669
> This option is only available to SCA scans.
670670

671-
We use the sbt-dependency-lock plugin to restore the lock file for SBT projects.
672-
To disable lock restore in use `--no-restore` option.
673-
674-
Prerequisites:
675-
* `sbt-dependency-lock` plugin: Install the plugin by adding the following line to `project/plugins.sbt`:
676-
677-
```text
678-
addSbtPlugin("software.purpledragon" % "sbt-dependency-lock" % "1.5.1")
679-
```
671+
When running an SCA scan, Cycode CLI automatically attempts to restore (generate) a dependency lockfile for each supported manifest file it finds. This allows scanning transitive dependencies, not just the ones listed directly in the manifest. To skip this step and scan only direct dependencies, use the `--no-restore` flag.
672+
673+
The following ecosystems support automatic lockfile restoration:
674+
675+
| Ecosystem | Manifest file | Lockfile generated | Tool invoked (when lockfile is absent) |
676+
|---|---|---|---|
677+
| npm | `package.json` | `package-lock.json` | `npm install --package-lock-only --ignore-scripts --no-audit` |
678+
| Yarn | `package.json` | `yarn.lock` | `yarn install --ignore-scripts` |
679+
| pnpm | `package.json` | `pnpm-lock.yaml` | `pnpm install --ignore-scripts` |
680+
| Deno | `deno.json` / `deno.jsonc` | `deno.lock` | *(read existing lockfile only)* |
681+
| Go | `go.mod` | `go.mod.graph` | `go list -m -json all` + `go mod graph` |
682+
| Maven | `pom.xml` | `bcde.mvndeps` | `mvn dependency:tree` |
683+
| Gradle | `build.gradle` / `build.gradle.kts` | `gradle-dependencies-generated.txt` | `gradle dependencies -q --console plain` |
684+
| SBT | `build.sbt` | `build.sbt.lock` | `sbt dependencyLockWrite` |
685+
| NuGet | `*.csproj` | `packages.lock.json` | `dotnet restore --use-lock-file` |
686+
| Ruby | `Gemfile` | `Gemfile.lock` | `bundle --quiet` |
687+
| Poetry | `pyproject.toml` | `poetry.lock` | `poetry lock` |
688+
| Pipenv | `Pipfile` | `Pipfile.lock` | `pipenv lock` |
689+
| PHP Composer | `composer.json` | `composer.lock` | `composer update --no-cache --no-install --no-scripts --ignore-platform-reqs` |
690+
691+
If a lockfile already exists alongside the manifest, Cycode reads it directly without running any install command.
692+
693+
**SBT prerequisite:** The `sbt-dependency-lock` plugin must be installed. Add the following line to `project/plugins.sbt`:
694+
695+
```text
696+
addSbtPlugin("software.purpledragon" % "sbt-dependency-lock" % "1.5.1")
697+
```
680698

681699
### Repository Scan
682700

@@ -1309,9 +1327,11 @@ For example:\
13091327
13101328
The `path` subcommand supports the following additional options:
13111329
1312-
| Option | Description |
1313-
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------|
1314-
| `--maven-settings-file` | For Maven only, allows using a custom [settings.xml](https://maven.apache.org/settings.html) file when building the dependency tree |
1330+
| Option | Description |
1331+
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
1332+
| `--no-restore` | Skip lockfile restoration and scan direct dependencies only. See [Lock Restore Option](#lock-restore-option) for details. |
1333+
| `--gradle-all-sub-projects` | Run the Gradle restore command for all sub-projects (use from the root of a multi-project Gradle build). |
1334+
| `--maven-settings-file` | For Maven only, allows using a custom [settings.xml](https://maven.apache.org/settings.html) file when building the dependency tree. |
13151335
13161336
# Import Command
13171337

0 commit comments

Comments
 (0)