Skip to content

Commit 079b805

Browse files
authored
Update environment variable documentation (#1546)
1 parent 43a01d6 commit 079b805

File tree

1 file changed

+54
-17
lines changed

1 file changed

+54
-17
lines changed

docs/environment-variables.md

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,76 @@ Environment variables are sometimes used to control experimental features or adv
44

55
## `DisableGoCliScan`
66

7-
If the environment variable `DisableGoCliScan` is set to "true", we fall back to parsing `go.mod` and `go.sum` ourselves.
7+
If the environment variable `DisableGoCliScan` is set to "true", we fall back to parsing `go.mod` and `go.sum` ourselves.
88
Otherwise, the Go detector uses go-cli command: `go list -m all` to discover Go dependencies.
99

10+
## `DisableRustCliScan`
11+
12+
When set to "true", the Rust detector skips all Cargo CLI execution, including metadata queries.
13+
In SBOM mode, dependencies will be mapped directly to `*.cargo-sbom.json` files.
14+
In fallback mode, the detector processes `Cargo.lock` and `Cargo.toml` files to infer dependencies and relationships.
15+
Disabling the CLI may reduce the precision of component-to-location mapping and can lead to over-reporting.
16+
1017
## `PyPiMaxCacheEntries`
1118

1219
The environment variable `PyPiMaxCacheEntries` is used to control the size of the in-memory LRU cache that caches responses from PyPi.
1320
The default value is 4096.
1421

22+
## `PIP_INDEX_URL`
23+
24+
Determines what package feed should be used for `pip install --report` detection.
25+
The default value will use the PyPi index unless pip defaults have been configured globally.
26+
27+
## `PipReportOverrideBehavior`
28+
29+
Overrides pip report with one of the following detection strategies:
30+
- `Skip`: Will not run pip detection
31+
- `SourceCodeScan`: Scan `setup.py` and `requirements.txt` files, and record components explicitly from the package files without hitting a remote feed. Does not compile a dependency graph.
32+
33+
## `PipReportSkipFallbackOnFailure`
34+
35+
When set to "true", skips the default fallback behavior if pip report fails.
36+
Default behavior scans `setup.py` and `requirements.txt` files, and records components explicitly from the package files without hitting a remote feed.
37+
Does not compile a dependency graph.
38+
39+
## `PipReportFileLevelTimeoutSeconds`
40+
41+
Controls the timeout limit (in seconds) for generating the PipReport for individual files.
42+
This defaults to the overall timeout.
43+
44+
## `PipReportDisableFastDeps`
45+
46+
When set to "true", disables the fast deps feature in PipReport.
47+
48+
## `PipReportIgnoreFileLevelIndexUrl`
49+
50+
When set to "true", ignores the `--index-url` argument that can be provided in the requirements.txt file.
51+
See [pip install documentation](https://pip.pypa.io/en/stable/cli/pip_install/#install-index-url) for more details.
52+
53+
## `PipReportPersistReports`
54+
55+
When set to "true", allows the PipReport detector to persist the reports that it generates, rather than cleaning them up after constructing the dependency graph.
56+
1557
## `CD_DETECTOR_EXPERIMENTS`
1658

17-
When set to any value, enables detector experiments, a feature to compare the results of different detectors for the
18-
same ecosystem. The available experiments are found in the [`Experiments\Config`](../src/Microsoft.ComponentDetection.Orchestrator/Experiments/Configs)
19-
folder.
59+
When set to any value, enables detector experiments, a feature to compare the results of different detectors for the same ecosystem.
60+
The available experiments are found in the [`Experiments\Config`](../src/Microsoft.ComponentDetection.Orchestrator/Experiments/Configs) folder.
2061

2162
## `CD_GRADLE_DEV_LOCKFILES`
2263

23-
Enables dev-dependency categorization for the Gradle
24-
detector. Comma-separated list of Gradle lockfiles which contain only
25-
development dependencies. Dependencies connected to Gradle
26-
configurations matching the given regex are considered development
27-
dependencies. If a lockfile will contain a mix of development and
28-
production dependencies, see `CD_GRADLE_DEV_CONFIGURATIONS` below.
64+
Enables dev-dependency categorization for the Gradle detector.
65+
Comma-separated list of Gradle lockfiles which contain only development dependencies.
66+
Dependencies connected to Gradle configurations matching the given regex are considered development dependencies.
67+
If a lockfile will contain a mix of development and production dependencies, see `CD_GRADLE_DEV_CONFIGURATIONS` below.
2968

3069
## `CD_GRADLE_DEV_CONFIGURATIONS`
3170

32-
Enables dev-dependency categorization for the Gradle
33-
detector. Comma-separated list of Gradle configurations which refer to development dependencies.
34-
Dependencies connected to Gradle configurations matching
35-
the given configurations are considered development dependencies.
71+
Enables dev-dependency categorization for the Gradle detector.
72+
Comma-separated list of Gradle configurations which refer to development dependencies.
73+
Dependencies connected to Gradle configurations matching the given configurations are considered development dependencies.
3674
If an entire lockfile will contain only dev dependencies, see `CD_GRADLE_DEV_LOCKFILES` above.
3775

38-
[1]: https://go.dev/ref/mod#go-mod-graph
39-
4076
## `MvnCLIFileLevelTimeoutSeconds`
4177

42-
When set to any positive integer value, it controls the max execution time Mvn CLI is allowed to take per each `pom.xml` file. Default behavior is unbounded.
78+
When set to any positive integer value, it controls the max execution time Mvn CLI is allowed to take per each `pom.xml` file.
79+
Default behavior is unbounded.

0 commit comments

Comments
 (0)