jekyll-cve-badge 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/jekyll-cve-badge/api-helper.rb +2 -2
- data/lib/jekyll-cve-badge/version.rb +1 -1
- data/lib/jekyll-cve-badge.rb +8 -7
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 737df8a05fa7812337b5bf897ead3981dac7767c871b38cdb045c58f69d4e0f6
|
4
|
+
data.tar.gz: cbee11548d847afd5078fa58877c769662ecbc0b3e18a1f969e57c695fa2f901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a2d5eb678b1c49400aef9787ac62153e3e42feda1eafa0508a5b2630b400d6d4774c6c3f3fefabdb22aacd97fe352087e18477776ce0120ede0b24f7242862
|
7
|
+
data.tar.gz: 4a0bea45819fd1f7f8ba7a8db72363804984476820fccc309727f8c559611636001fbcf632838fc7e894adc07b6cc60cba1ffa7c8be5ca8de901738b90de7959
|
data/README.md
CHANGED
@@ -8,12 +8,12 @@ It uses CVSSv3 by default. If the CVE is old and a CVSSv3 is not available, CVSS
|
|
8
8
|
|
9
9
|
### Installation and usage
|
10
10
|
|
11
|
-
Add the following to your Gemfile's jekyll_plugins group:
|
11
|
+
Add the following to your Gemfile's `jekyll_plugins` group:
|
12
12
|
```rb
|
13
|
-
gem "jekyll-cve-badge"
|
13
|
+
gem "jekyll-cve-badge"
|
14
14
|
```
|
15
15
|
|
16
|
-
Run `bundler install`.
|
16
|
+
Run `bundler install`. This will install the plugin from the [RubyGems repository](https://rubygems.org/gems/jekyll-cve-badge).
|
17
17
|
|
18
18
|
You can then use the tag `cve_badge` anywhere. For example:
|
19
19
|
```md
|
@@ -27,4 +27,4 @@ You can then use the tag `cve_badge` anywhere. For example:
|
|
27
27
|
|
28
28
|
### TODO
|
29
29
|
|
30
|
-
* Add flag to just add the badge with no CVSS rating
|
30
|
+
* Add flag to just add the badge with no CVSS rating
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Jekyll
|
2
2
|
module CVEBadge
|
3
3
|
module APIHelper
|
4
|
-
|
4
|
+
|
5
5
|
def get_cvss_severity_score(cve_id)
|
6
6
|
uri = URI.parse("https://services.nvd.nist.gov/rest/json/cve/1.0/#{cve_id}")
|
7
7
|
|
@@ -11,7 +11,7 @@ module Jekyll
|
|
11
11
|
response = http.request(request)
|
12
12
|
|
13
13
|
if response.code != "200"
|
14
|
-
[
|
14
|
+
["", ""]
|
15
15
|
end
|
16
16
|
|
17
17
|
result = JSON.parse(response.body)
|
data/lib/jekyll-cve-badge.rb
CHANGED
@@ -39,30 +39,30 @@ class CVEBadge < Liquid::Tag
|
|
39
39
|
font-weight: 300;
|
40
40
|
font-size: 1.5rem;
|
41
41
|
}
|
42
|
-
|
42
|
+
|
43
43
|
.cve-id {
|
44
44
|
border-radius: 4px 0px 0px 4px;
|
45
45
|
background-color: #8963BA;
|
46
46
|
background-image: linear-gradient(to top right, #8963BA, #EF476F);
|
47
47
|
}
|
48
|
-
|
48
|
+
|
49
49
|
.cve-score {
|
50
50
|
border-radius: 0px 4px 4px 0px;
|
51
51
|
box-shadow: inset 7px 0 10px -7px rgb(0 0 0 / 0.4);
|
52
52
|
}
|
53
|
-
|
53
|
+
|
54
54
|
.cve-score.severity-critical {
|
55
55
|
background-color: #333333;
|
56
56
|
}
|
57
|
-
|
57
|
+
|
58
58
|
.cve-score.severity-high {
|
59
59
|
background-color: #d62f2c;
|
60
60
|
}
|
61
|
-
|
61
|
+
|
62
62
|
.cve-score.severity-medium {
|
63
63
|
background-color: #de7f0b;
|
64
64
|
}
|
65
|
-
|
65
|
+
|
66
66
|
.cve-score.severity-low {
|
67
67
|
background-color: #eadc38;
|
68
68
|
color: #3f3f3f;
|
@@ -72,4 +72,5 @@ class CVEBadge < Liquid::Tag
|
|
72
72
|
end
|
73
73
|
|
74
74
|
Liquid::Template.register_tag "cve_badge", self
|
75
|
-
end
|
75
|
+
end
|
76
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-cve-badge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rasmus Moorats
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -72,7 +72,7 @@ homepage: https://github.com/neonsea/jekyll-cve-badge
|
|
72
72
|
licenses:
|
73
73
|
- MIT
|
74
74
|
metadata: {}
|
75
|
-
post_install_message:
|
75
|
+
post_install_message:
|
76
76
|
rdoc_options: []
|
77
77
|
require_paths:
|
78
78
|
- lib
|
@@ -87,8 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
91
|
-
signing_key:
|
90
|
+
rubygems_version: 3.3.5
|
91
|
+
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: Jekyll plugin to embed a shields-like badge for CVE IDs
|
94
94
|
test_files: []
|