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
{{ message }}
This repository was archived by the owner on Nov 26, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+56-3Lines changed: 56 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@ This tool parses Go binary dependencies and calls [NVD database](https://nvd.nis
8
8
2.[Usage](#usage)
9
9
3.[Configuration](#configuration)
10
10
4.[Cache](#cache)
11
+
-[Memcachier](#memcachier)
12
+
-[Memcached](#memcached)
13
+
-[Memory](#memory)
11
14
5.[Version](#versions)
12
15
6.[How to Fix Vulnerabilities](#how-to-fix-vulnerabilities)
13
16
7.[Data Source](#data-source)
@@ -46,7 +49,7 @@ Exit code is *1* if exposed vulnerabilities were found, *2* if there was an erro
46
49
47
50
You can pass *-verbose* option on command line to print vulnerability report, even if binary is not vulnerable and for all vulnerabilities, even if they are ignored or not exposed.
48
51
49
-
You can set *-strict* flag on command line so that vulnerabilities without version are considered matching vulnerability. In this case, you should check vulnerability manually and disable it in configuration file if necessary.
52
+
You can set *-strict* flag on command line so that vulnerabilities without version are considered matching dependency version. In this case, you should check vulnerability manually and disable it in configuration file if necessary.
50
53
51
54
You can pass configuration file with *-config config.yml*, see configuration section below.
52
55
@@ -63,6 +66,11 @@ Configuration file is in YAML format as follows:
@@ -74,6 +82,7 @@ Configuration fields are the following:
74
82
75
83
-**api-key**: this is your NVD API key
76
84
-**strict**: tells if we should consider vulnerability matches without version as matching dependency
85
+
-**memcachier** is the configuration for *memcachier*, with **address**, **expiration** (time in seconds), **username** and **password**
77
86
-**memcached** is the configuration for *memcached*, with **address** and **expiration** time in seconds
78
87
-**ignore**: a list of CVE vulnerabilities to ignore
79
88
@@ -83,9 +92,53 @@ Note that without API key, you will be limited to *10* requests in a rolling *60
83
92
84
93
## Cache
85
94
86
-
If you define the *memcached* configuration in your configuration file, *memcached* will be used to cache calls to NVD database. This is useful because if you perform more call that allowed, your calls will significantly slow down. An sample [docker-compose.yml](https://github.com/intercloud/gobinsec/blob/main/docker-compose.yml) to start a *memcached* instance is proposed in this project.
95
+
A cache is useful because if you perform more call to NVD database that allowed, your calls will significantly slow down. Gobinsec tries to build caches in this order:
96
+
97
+
### Memcachier
98
+
99
+
A cache is built with *Memcachier* if following section is found in configuration file:
100
+
101
+
```yaml
102
+
memcachier:
103
+
address: ...
104
+
expiration: ...
105
+
username: ...
106
+
password: ...
107
+
```
108
+
109
+
Else, il will look for following environment variables:
110
+
111
+
```
112
+
MEMCACHIER_ADDRESS
113
+
MEMCACHIER_EXPIRATION
114
+
MEMCACHIER_USERNAME
115
+
MEMCACHIER_PASSWORD
116
+
```
117
+
118
+
[Memcachier](https://www.memcachier.com) is an online cache provider with free tiers.
119
+
120
+
### Memcached
121
+
122
+
If no configuration is found for *Memcachier*, it will try to build a cache for *Memcached*, if following section is found in configuration file:
123
+
124
+
```yaml
125
+
memcached:
126
+
address: ...
127
+
expiration: ...
128
+
```
129
+
130
+
Else it will look for following environment variables:
131
+
132
+
```
133
+
MEMCACHED_ADDRESS
134
+
MEMCACHED_EXPIRATION
135
+
```
136
+
137
+
A sample [docker-compose.yml](https://github.com/intercloud/gobinsec/blob/main/docker-compose.yml) file to start a *memcached* instance is provided in this project.
138
+
139
+
### Memory
87
140
88
-
If you don't define the *memcached* configuration, the program will use a memory cache when you pass more than one binary to analyse on command line.
141
+
If no configuration is found for *Memcachier* and *Memcached*, it will instantiate a memory cache. This cache will be useful if you pass more than one binary on command line.
0 commit comments