jekyll-securitytxt 1.0.1 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19b2ae8b2d0e614e0a8de71daed37fbf2045a258030bc6ef48da08f19aa73c04
4
- data.tar.gz: 3c3bf295fcc71999ac6a1e20a192d87354441d76ab8c8e76337a5692d84ad784
3
+ metadata.gz: 781ad29a0ac4d924c4d237b028a7cd8648602af05b70f73de7137871e842cc11
4
+ data.tar.gz: e0d92992aa601f7eb4a594fee6b234311f97c349a103349af280f7bf1750b866
5
5
  SHA512:
6
- metadata.gz: 3b103c1689f8f96ba5eed716db80c6d46bb5ebee41e2e8b14304e7286a923ffee92543190fac7dd609d5c5919f68059e5b51b1046440633bea460ea9493ec68c
7
- data.tar.gz: 8853a84942ef6836d4d00e469f3c726c93f29a303696cab17455ce0b5c5ba87385db19b4d37e5db02a3ea978bef3d2d36a806e5711bd006e2b94f5ad29873307
6
+ metadata.gz: 591fd1598c32a33d526676be6054e48534af2f5c139fba07aad1208fe7453cafc011717d319f0ea2028ac4c0a6e03501dd3bd1a0b32053bd727630c48edefc37
7
+ data.tar.gz: a22ddad70f618567683069828b0bf4a39328e234538512fb22fc341b2de369c58a7533a5a24785b9fbb5b942c4f75c108a945138ff91dcaaccf05a721b7d1fd6
data/README.md CHANGED
@@ -18,15 +18,20 @@ end
18
18
  # in _config.yml
19
19
  security_txt:
20
20
  comment: If you find any security issues on this site, please contact me!
21
- contact: "mailto:<YOUR-EMAIL>"
21
+ contact:
22
+ - mailto:<YOUR-EMAIL>
23
+ - https://YOUR_DOMAIN/CONTACT
24
+ hiring:
25
+ - https://URL1
26
+ - https://URL2
22
27
  preferred_languages: "ko, en"
23
28
  ```
24
29
 
25
- if you
30
+ If you need a custom message?
26
31
  ```yaml
27
32
  security_txt:
28
33
  custom_message: |
29
- # If you would like to report a security issue you may report it to us via bugbounty platform
34
+ If you would like to report a security issue you may report it to us via bugbounty platform
30
35
  Contact: https://
31
36
  ```
32
37
 
@@ -48,4 +53,4 @@ security_txt:
48
53
  ```
49
54
 
50
55
  > [!TIP]
51
- > See here for information on the column. https://securitytxt.org*
56
+ > See here for information on the column. https://securitytxt.org*
@@ -8,14 +8,15 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["HAHWUL"]
9
9
  spec.email = ["hahwul@gmail.com"]
10
10
 
11
- spec.summary = "Jekyll plugin for security.txt"
12
- spec.description = "Jekyll plugin for security.txt"
11
+ spec.summary = "A Jekyll plugin for generating security.txt files"
12
+ spec.description = "This plugin helps you generate security.txt files for your Jekyll site, " \
13
+ "providing security contact information and policies."
13
14
  spec.homepage = "https://github.com/hahwul/jekyll-securitytxt"
14
15
  spec.required_ruby_version = ">= 2.6.0"
15
16
  spec.license = "MIT"
16
17
 
17
18
  spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = "https://github.com/hahwul/jekyll-securitytxt"
19
20
 
20
21
  spec.files = Dir.chdir(__dir__) do
21
22
  `git ls-files -z`.split("\x0").reject do |f|
@@ -26,5 +27,6 @@ Gem::Specification.new do |spec|
26
27
  spec.bindir = "exe"
27
28
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
29
  spec.require_paths = ["lib"]
29
- spec.add_dependency "jekyll"
30
+
31
+ spec.add_runtime_dependency "jekyll", "~> 4.0"
30
32
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Securitytxt
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
@@ -5,7 +5,7 @@ require "jekyll"
5
5
 
6
6
  module Jekyll
7
7
  module Securitytxt
8
- # Jekyll plugin for security.txt
8
+ # Jekyll plugin for generating security.txt
9
9
  class Generator < Jekyll::Generator
10
10
  safe true
11
11
  priority :lowest
@@ -13,35 +13,38 @@ module Jekyll
13
13
  # Plugin entry point.
14
14
  def generate(site)
15
15
  @site = site
16
- @site.pages << verification_file unless a_verification_file_exist?
16
+ @site.pages << create_security_txt_file unless security_txt_file_exists?
17
17
  end
18
18
 
19
19
  private
20
20
 
21
21
  # Check if a security.txt file already exists in the source tree.
22
- def a_verification_file_exist?
22
+ def security_txt_file_exists?
23
23
  file_pattern = %r{.well-known/security\.txt?}
24
24
  exists = @site.static_files.any? { |p| p.url =~ file_pattern }
25
- warn_msg = "Found a security.txt file in source tree matching /#{file_pattern.source}/; not generating one..."
26
- Jekyll.logger.warn "Jekyll-securitytxt", warn_msg if exists
25
+ if exists
26
+ Jekyll.logger.warn "Jekyll-securitytxt",
27
+ "Found a security.txt file in source tree matching",
28
+ "/#{file_pattern.source}/; not generating one..."
29
+ end
27
30
  exists
28
31
  end
29
32
 
30
33
  # Get path of the template file.
31
- def source_path(file = "template.html")
32
- File.expand_path file.to_s, __dir__
34
+ def template_file_path(file = "template.html")
35
+ File.expand_path(file.to_s, __dir__)
33
36
  end
34
37
 
35
38
  # Path of the security.txt file.
36
- def securitytxt_path
39
+ def security_txt_file_path
37
40
  ".well-known/security.txt"
38
41
  end
39
42
 
40
43
  # Construct a file object from a template with content that can be added to generated pages
41
- def verification_file
42
- Jekyll.logger.info "Jekyll-securitytxt", "Generating #{securitytxt_path}"
43
- page = PageWithoutAFile.new(@site, __dir__, "", securitytxt_path)
44
- page.content = File.read(source_path)
44
+ def create_security_txt_file
45
+ Jekyll.logger.info "Jekyll-securitytxt", "Generating #{security_txt_file_path}"
46
+ page = PageWithoutAFile.new(@site, __dir__, "", security_txt_file_path)
47
+ page.content = File.read(template_file_path)
45
48
  page.data["layout"] = nil
46
49
  page
47
50
  end
@@ -2,25 +2,33 @@
2
2
  # {{ site.security_txt.comment }}
3
3
  {% endif -%}
4
4
  {% if site.security_txt.contact -%}
5
- Contact: {{ site.security_txt.contact }}
5
+ {% for contact in site.security_txt.contact %}
6
+ Contact: {{ contact }}
7
+ {% endfor %}
6
8
  {% endif -%}
7
9
  {% if site.security_txt.expires -%}
8
10
  Expires: {{ site.security_txt.expires }}
9
11
  {% endif -%}
10
12
  {% if site.security_txt.encryption -%}
11
- Encryption: {{ site.security_txt.encryption }}
13
+ {% for encryption in site.security_txt.encryption %}
14
+ Encryption: {{ encryption }}
15
+ {% endfor %}
12
16
  {% endif -%}
13
17
  {% if site.security_txt.preferred_languages -%}
14
18
  Preferred-Languages: {{ site.security_txt.preferred_languages }}
15
19
  {% endif -%}
16
20
  {% if site.security_txt.acknowledgments -%}
17
- Acknowledgments: {{ site.security_txt.acknowledgments }}
21
+ {% for acknowledgment in site.security_txt.acknowledgments %}
22
+ Acknowledgments: {{ acknowledgment }}
23
+ {% endfor %}
18
24
  {% endif -%}
19
25
  {% if site.security_txt.policy -%}
20
26
  Policy: {{ site.security_txt.policy }}
21
27
  {% endif -%}
22
28
  {% if site.security_txt.hiring -%}
23
- Hiring: {{ site.security_txt.hiring }}
29
+ {% for hiring in site. security_txt.hiring %}
30
+ Hiring: {{ hiring }}
31
+ {% endfor %}
24
32
  {% endif -%}
25
33
  {% if site.security_txt.csaf -%}
26
34
  CSAF: {{ site.security_txt.csaf }}
@@ -28,6 +36,8 @@ CSAF: {{ site.security_txt.csaf }}
28
36
  {% if site.security_txt.canonical -%}
29
37
  Canonical: {{ site.security_txt.canonical }}
30
38
  {% endif -%}
31
- {% if site.security_txt.custom_message -%}
32
- {{ site.security_txt.custom_message }}
39
+ {% if site.security_txt.custom_messages -%}
40
+ {% for custom_message in site.security_txt.custom_messages %}
41
+ {{ custom_message }}
42
+ {% endfor %}
33
43
  {% endif -%}
metadata CHANGED
@@ -1,30 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-securitytxt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - HAHWUL
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-19 00:00:00.000000000 Z
11
+ date: 2024-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
27
- description: Jekyll plugin for security.txt
26
+ version: '4.0'
27
+ description: This plugin helps you generate security.txt files for your Jekyll site,
28
+ providing security contact information and policies.
28
29
  email:
29
30
  - hahwul@gmail.com
30
31
  executables: []
@@ -61,8 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
62
  - !ruby/object:Gem::Version
62
63
  version: '0'
63
64
  requirements: []
64
- rubygems_version: 3.5.3
65
+ rubygems_version: 3.5.16
65
66
  signing_key:
66
67
  specification_version: 4
67
- summary: Jekyll plugin for security.txt
68
+ summary: A Jekyll plugin for generating security.txt files
68
69
  test_files: []