dependabot-common 0.118.3 → 0.118.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 845830fad18e1ab13ddd0595967f4b92e669ba13c45f4a682bad0591cb7864d0
|
|
4
|
+
data.tar.gz: 3ded0bc265a44c5d15492a7dbe51f323d99232ff752c12e261f6e094d6912d28
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca234ac529c0ae36d5fd0283bf3b4e30d5d6a63e1fb544a7cf60d471065619cd8e45a53095b2af1e7d8ef5df200f667770887210d58f79595812234080f8470a
|
|
7
|
+
data.tar.gz: c25caa46c1ffd80d407471e6027907a31b63868c3c04476c1f3659b90f754e1c30ff82b6c5e79ca447430b99b4a0bbaa187492b04284670901257957fe6da05c
|
|
@@ -323,7 +323,7 @@ module Dependabot
|
|
|
323
323
|
msg += commits_cascade(dep)
|
|
324
324
|
msg += maintainer_changes_cascade(dep)
|
|
325
325
|
msg += break_tag unless msg == ""
|
|
326
|
-
"\n" + sanitize_links_and_mentions(msg)
|
|
326
|
+
"\n" + sanitize_links_and_mentions(msg, unsafe: true)
|
|
327
327
|
end
|
|
328
328
|
|
|
329
329
|
def vulnerabilities_cascade(dep)
|
|
@@ -437,7 +437,7 @@ module Dependabot
|
|
|
437
437
|
|
|
438
438
|
build_details_tag(
|
|
439
439
|
summary: "Maintainer changes",
|
|
440
|
-
body: maintainer_changes(dep) + "\n"
|
|
440
|
+
body: sanitize_links_and_mentions(maintainer_changes(dep)) + "\n"
|
|
441
441
|
)
|
|
442
442
|
end
|
|
443
443
|
|
|
@@ -680,12 +680,12 @@ module Dependabot
|
|
|
680
680
|
end
|
|
681
681
|
end
|
|
682
682
|
|
|
683
|
-
def sanitize_links_and_mentions(text)
|
|
683
|
+
def sanitize_links_and_mentions(text, unsafe: false)
|
|
684
684
|
return text unless source.provider == "github"
|
|
685
685
|
|
|
686
686
|
LinkAndMentionSanitizer.
|
|
687
687
|
new(github_redirection_service: github_redirection_service).
|
|
688
|
-
sanitize_links_and_mentions(text: text)
|
|
688
|
+
sanitize_links_and_mentions(text: text, unsafe: unsafe)
|
|
689
689
|
end
|
|
690
690
|
|
|
691
691
|
def sanitize_template_tags(text)
|
|
@@ -17,9 +17,8 @@ module Dependabot
|
|
|
17
17
|
MENTION_REGEX = %r{(?<![A-Za-z0-9`~])@#{GITHUB_USERNAME}/?}.freeze
|
|
18
18
|
# End of string
|
|
19
19
|
EOS_REGEX = /\z/.freeze
|
|
20
|
-
# We rely on GitHub to do the HTML sanitization
|
|
21
20
|
COMMONMARKER_OPTIONS = %i(
|
|
22
|
-
|
|
21
|
+
GITHUB_PRE_LANG FULL_INFO_STRING
|
|
23
22
|
).freeze
|
|
24
23
|
COMMONMARKER_EXTENSIONS = %i(
|
|
25
24
|
table tasklist strikethrough autolink tagfilter
|
|
@@ -31,14 +30,15 @@ module Dependabot
|
|
|
31
30
|
@github_redirection_service = github_redirection_service
|
|
32
31
|
end
|
|
33
32
|
|
|
34
|
-
def sanitize_links_and_mentions(text:)
|
|
33
|
+
def sanitize_links_and_mentions(text:, unsafe: false)
|
|
35
34
|
doc = CommonMarker.render_doc(
|
|
36
35
|
text, :LIBERAL_HTML_TAG, COMMONMARKER_EXTENSIONS
|
|
37
36
|
)
|
|
38
37
|
|
|
39
38
|
sanitize_mentions(doc)
|
|
40
39
|
sanitize_links(doc)
|
|
41
|
-
|
|
40
|
+
mode = unsafe ? :UNSAFE : :DEFAULT
|
|
41
|
+
doc.to_html(([mode] + COMMONMARKER_OPTIONS), COMMONMARKER_EXTENSIONS)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
private
|
data/lib/dependabot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-common
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.118.
|
|
4
|
+
version: 0.118.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-06-
|
|
11
|
+
date: 2020-06-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-codecommit
|