You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-8Lines changed: 39 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,38 +15,41 @@
15
15
-[Installation](#installation)
16
16
-[Docker](#docker)
17
17
-[Run](#run)
18
+
-[JSON Format](#json-format)
18
19
-[Configuration](#configuration)
19
20
-[Allowlist](#allowlist)
20
21
-[Dependency files](#dependency-files)
21
22
-[Check dependencies introduced through the CLI](#check-dependencies-introduced-through-the-cli)
22
23
-[Selector method](#selector-method)
23
24
-[Configuration file](#configuration-file)
25
+
-[Cache] (#cache)
26
+
-[Using `Twyn` as a library] (#using-twyn-as-a-library)
24
27
25
28
## Overview
26
-
Twyn is a security tool that compares the name of your dependencies against a set of the most popular ones,
29
+
`Twyn` is a security tool that compares the name of your dependencies against a set of the most popular ones,
27
30
in order to determine if there is any similarity between them, preventing you from using a potentially illegitimate one.
28
-
In short, Twyn protects you against [typosquatting attacks](https://en.wikipedia.org/wiki/Typosquatting).
31
+
In short, `Twyn` protects you against [typosquatting attacks](https://en.wikipedia.org/wiki/Typosquatting).
29
32
30
33
It works as follows:
31
34
32
35
1. Either choose to scan the dependencies in a dependencies file you specify (`--dependency-file`) or some dependencies introduced through the CLI (`--dependency`). If no option was provided, it will try to find a dependencies file in your working path.
33
36
2. If the name of your package name matches with the name of one of the most well known packages, the package is accepted.
34
-
3. If the name of your package is similar to the name of one of the most used packages, Twyn will prompt an error.
35
-
4. If your package name is not in the list of the most known ones and is not similar enough to any of those to be considered misspelled, the package is accepted. Twyn assumes that you're using either a not so popular package (therefore it can't verify its legitimacy) or a package created by yourself, therefore unknown for the rest.
37
+
3. If the name of your package is similar to the name of one of the most used packages, `Twyn` will prompt an error.
38
+
4. If your package name is not in the list of the most known ones and is not similar enough to any of those to be considered misspelled, the package is accepted. `Twyn` assumes that you're using either a not so popular package (therefore it can't verify its legitimacy) or a package created by yourself, therefore unknown for the rest.
36
39
37
40
## Quickstart
38
41
39
42
### Installation
40
43
41
-
Twyn is available on PyPi repository, you can install it by running
44
+
`Twyn` is available on PyPi repository, you can install it by running
42
45
43
46
```sh
44
47
pip install twyn
45
48
```
46
49
47
50
### Docker
48
51
49
-
Twyn provides a Docker image, which can be found [here](https://hub.docker.com/r/elementsinteractive/twyn).
52
+
`Twyn` provides a Docker image, which can be found [here](https://hub.docker.com/r/elementsinteractive/twyn).
50
53
51
54
Use it like so:
52
55
@@ -69,6 +72,18 @@ For a list of all the available options as well as their expected arguments run:
69
72
twyn run --help
70
73
```
71
74
75
+
### JSON format
76
+
If you want your output in JSON format, you can run `Twyn` with the following flag:
0 commit comments