Skip to content

Commit 7537eed

Browse files
authored
docs: update linux docs (#14)
1 parent 8a6d475 commit 7537eed

8 files changed

Lines changed: 94 additions & 88 deletions

File tree

docs/detectors/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Detectors
2+
3+
- CocoaPods
4+
- [Go](go.md)
5+
- [Gradle](gradle.md)
6+
- [Linux](linux.md)
7+
- [Maven](maven.md)
8+
- NPM
9+
- NuGet
10+
- [Pip](pip.md)
11+
- Ruby
12+
- Rust

docs/detectors/go.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Go Detection
2+
3+
## Requirements
4+
5+
Go detection depends on the following to successfully run:
6+
7+
- Go v1.11+.
8+
9+
## Detection strategy
10+
11+
Go detection is performed by parsing output from executing `go mod graph`.
12+
Full dependency graph generation is supported if Go v1.11+ is present on the build agent.
13+
If no Go v1.11+ is present, a fallback detection strategy is performed, dependent on:
14+
15+
- One or more `go.mod` or `go.sum` files.
16+
17+
For the fallback strategy:
18+
19+
Go detection is performed by parsing any `go.mod` or `go.sum` found under the scan directory.
20+
21+
Only root dependency information is generated instead of full graph.
22+
I.e. tags the top level component or explicit dependency a given transitive dependency was brought by.
23+
Given a dependency tree A -> B -> C, C's root dependency is A.
24+
25+
## Known limitations
26+
27+
Dev dependency tagging is not supported.
28+
29+
Go detection will fallback if no Go v1.11+ is present.
30+
If executing `go mod graph` takes too long (currently if it takes more than 10 seconds), go detection will fall back.
31+
This can happen if modules are not restored before the scan.
32+
33+
Due to the nature of `go.sum` containing references for all dependencies, including historical, no-longer-needed dependencies; the fallback strategy can result in over detection.
34+
Executing `go mod tidy` before detection via fallback is encouraged.
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# Gradle Detection
2+
23
## Requirements
4+
35
Gradle detection depends on the following to successfully run:
46

5-
- Gradle 7 or prior using [Single File lock](https://docs.gradle.org/6.8.1/userguide/dependency_locking.html#single_lock_file_per_project).
6-
- One or more <em>*.lockfile</em> files.
7+
- Gradle 7 or prior using [Single File lock](https://docs.gradle.org/6.8.1/userguide/dependency_locking.html#single_lock_file_per_project)
8+
- One or more `.lockfile` files
79

810
## Detection strategy
9-
Gradle detection is performed by parsing any <em>*.lockfile</em> found under the scan directory.
11+
12+
Gradle detection is performed by parsing any `*.lockfile` found under the scan directory.
1013

1114
## Known limitations
15+
1216
Gradle detection will not work if lock files are not being used.
1317

14-
*Dev dependency* tagging is not supported.
18+
Dev dependency tagging is not supported.
1519

16-
Full dependency graph generation is not supported.
20+
Full dependency graph generation is not supported.

docs/detectors/linux.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Linux Detection
2+
3+
## Requirements
4+
5+
Linux detection depends on the following:
6+
7+
- [Docker](https://www.docker.com/)
8+
9+
## Detection strategy
10+
11+
Linux package detection is performed by running [Syft](https://github.com/anchore/syft) and parsing the output.
12+
The output contains the package name, version, and the layer of the container in which it was found.
13+
14+
## Known limitations
15+
16+
- Windows container scanning is not supported
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Maven Detection
2+
23
## Requirements
4+
35
Maven detection depends on the following to successfully run:
46

57
- Maven CLI as part of your PATH. mvn should be runnable from a given command line.
68
- Maven Dependency Plugin (installed with Maven).
7-
- One or more *pom.xml* files.
9+
- One or more `pom.xml` files.
810

911
## Detection strategy
10-
Maven detection is performed by running *mvn dependency:tree -f {pom.xml}* for each pom file and parsing down the results.
1112

12-
Components tagged as a *test* dependency are marked as *development dependencies*.
13+
Maven detection is performed by running `mvn dependency:tree -f {pom.xml}` for each pom file and parsing down the results.
14+
15+
Components tagged as a test dependency are marked as development dependencies.
1316

1417
Full dependency graph generation is supported.
1518

1619
## Known limitations
17-
Maven detection will not run if *mvn* is unavailable.
20+
21+
Maven detection will not run if `mvn` is unavailable.
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
# Pip Detection
2+
23
## Requirements
4+
35
Pip detection depends on the following to successfully run:
46

5-
- Python 2 or Python 3.
6-
- Internet connection.
7-
- One or more <em>setup.py</em> or *requirements.txt* files.
7+
- Python 2 or Python 3
8+
- Internet connection
9+
- One or more `setup.py` or `requirements.txt` files
810

911
## Detection strategy
10-
Pip detection is performed by running the following code snippet on every <em>setup.py</em>:
12+
13+
Pip detection is performed by running the following code snippet on every *setup.py*:
1114

1215
```python
1316
import distutils.core;
1417
setup = distutils.core.run_setup({setup.py});
1518
print(setup.install_requires);
1619
```
1720

18-
The code above allows Pip detection to detect any runtime dependendies.
21+
The code above allows Pip detection to detect any runtime dependencies.
1922

20-
*requirements.txt* files are parsed; a Git component is created for every *git+* url.
23+
`requirements.txt` files are parsed; a Git component is created for every `git+` url.
2124

22-
For every top level component, Pip detection makes http calls to Pip in order to determine latest version available, as well as to resolve the dependency tree by parsing the *METADATA* file on a given release's *bdist_wheel* or *bdist_egg*.
25+
For every top level component, Pip detection makes http calls to Pip in order to determine latest version available, as well as to resolve the dependency tree by parsing the `METADATA` file on a given release's `bdist_wheel` or `bdist_egg`.
2326

2427
Full dependency graph generation is supported.
2528

2629
## Known limitations
27-
*Dev dependency* tagging is not supported.
2830

29-
Pip detection will not run if *python* is unavailable.
31+
Dev dependency tagging is not supported.
32+
33+
Pip detection will not run if `python` is unavailable.
3034

31-
If no *bdist_wheel* or *bdist_egg* are available for a given component, dependencies will not be fetched.
35+
If no `bdist_wheel` or `bdist_egg` are available for a given component, dependencies will not be fetched.
3236

33-
If no internet connection or a component cannot be found in Pypi, said component and its dependencies will be skipped.
37+
If no internet connection or a component cannot be found in Pypi, said component and its dependencies will be skipped.

docs/go-detection.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/linux-scanner.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)