dependabot-docker 0.230.0 → 0.231.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/docker/file_fetcher.rb +7 -6
- data/lib/dependabot/docker/file_parser.rb +1 -0
- data/lib/dependabot/docker/file_updater.rb +12 -11
- data/lib/dependabot/docker/metadata_finder.rb +3 -2
- data/lib/dependabot/docker/requirement.rb +3 -2
- data/lib/dependabot/docker/tag.rb +1 -0
- data/lib/dependabot/docker/update_checker.rb +8 -7
- data/lib/dependabot/docker/utils/credentials_finder.rb +4 -3
- data/lib/dependabot/docker/utils/helpers.rb +1 -0
- data/lib/dependabot/docker/version.rb +5 -9
- data/lib/dependabot/docker.rb +3 -2
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb3d1b7715971fb63f8b1b713987da24f5c2aebbdbdcb216657146292e2f5146
|
4
|
+
data.tar.gz: f5b3ff175503a7ddbcbee37af8a2b387dc4e60c91689f80af04f25d92d1494dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e23120d2344c090f4dee22bc8086d8021365296caf864ab1fd8477326839353e77f6b2da5ce4bb0932a4ef5fdeac894ba2ee58fef0e7ccf121bb6e48a6119134
|
7
|
+
data.tar.gz: 3ddb555334b80e5d34491036070645abcb8ece0ae4a6149943d56b0020b44e767eeabf85fab2882dfc0aed29880b5c74c4d1477ac093b990439075161aae6ddc
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "dependabot/docker/utils/helpers"
|
@@ -49,9 +50,9 @@ module Dependabot
|
|
49
50
|
|
50
51
|
def dockerfiles
|
51
52
|
@dockerfiles ||=
|
52
|
-
repo_contents(raise_errors: false)
|
53
|
-
select { |f| f.type == "file" && f.name.match?(DOCKER_REGEXP) }
|
54
|
-
map { |f| fetch_file_from_host(f.name) }
|
53
|
+
repo_contents(raise_errors: false)
|
54
|
+
.select { |f| f.type == "file" && f.name.match?(DOCKER_REGEXP) }
|
55
|
+
.map { |f| fetch_file_from_host(f.name) }
|
55
56
|
end
|
56
57
|
|
57
58
|
def correctly_encoded_dockerfiles
|
@@ -64,9 +65,9 @@ module Dependabot
|
|
64
65
|
|
65
66
|
def yamlfiles
|
66
67
|
@yamlfiles ||=
|
67
|
-
repo_contents(raise_errors: false)
|
68
|
-
select { |f| f.type == "file" && f.name.match?(YAML_REGEXP) }
|
69
|
-
map { |f| fetch_file_from_host(f.name) }
|
68
|
+
repo_contents(raise_errors: false)
|
69
|
+
.select { |f| f.type == "file" && f.name.match?(YAML_REGEXP) }
|
70
|
+
.map { |f| fetch_file_from_host(f.name) }
|
70
71
|
end
|
71
72
|
|
72
73
|
def likely_kubernetes_resource?(resource)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "dependabot/docker/utils/helpers"
|
@@ -85,9 +86,9 @@ module Dependabot
|
|
85
86
|
old_declaration_regex = /^#{FROM_REGEX}\s+.*@sha256:#{old_digest}/
|
86
87
|
|
87
88
|
previous_content.gsub(old_declaration_regex) do |old_dec|
|
88
|
-
old_dec
|
89
|
-
gsub("@sha256:#{old_digest}", "@sha256:#{new_digest}")
|
90
|
-
gsub(":#{old_tag}", ":#{new_tag}")
|
89
|
+
old_dec
|
90
|
+
.gsub("@sha256:#{old_digest}", "@sha256:#{new_digest}")
|
91
|
+
.gsub(":#{old_tag}", ":#{new_tag}")
|
91
92
|
end
|
92
93
|
end
|
93
94
|
|
@@ -116,13 +117,13 @@ module Dependabot
|
|
116
117
|
end
|
117
118
|
|
118
119
|
def new_tags(file)
|
119
|
-
requirements(file)
|
120
|
-
map { |r| r.fetch(:source)[:tag] }
|
120
|
+
requirements(file)
|
121
|
+
.map { |r| r.fetch(:source)[:tag] }
|
121
122
|
end
|
122
123
|
|
123
124
|
def old_tags(file)
|
124
|
-
previous_requirements(file)
|
125
|
-
map { |r| r.fetch(:source)[:tag] }
|
125
|
+
previous_requirements(file)
|
126
|
+
.map { |r| r.fetch(:source)[:tag] }
|
126
127
|
end
|
127
128
|
|
128
129
|
def private_registry_url(source)
|
@@ -207,13 +208,13 @@ module Dependabot
|
|
207
208
|
end
|
208
209
|
|
209
210
|
def requirements(file)
|
210
|
-
dependency.requirements
|
211
|
-
|
211
|
+
dependency.requirements
|
212
|
+
.select { |r| r[:file] == file.name }
|
212
213
|
end
|
213
214
|
|
214
215
|
def previous_requirements(file)
|
215
|
-
dependency.previous_requirements
|
216
|
-
|
216
|
+
dependency.previous_requirements
|
217
|
+
.select { |r| r[:file] == file.name }
|
217
218
|
end
|
218
219
|
end
|
219
220
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "dependabot/metadata_finders"
|
@@ -30,5 +31,5 @@ module Dependabot
|
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
33
|
-
Dependabot::MetadataFinders
|
34
|
-
register("docker", Dependabot::Docker::MetadataFinder)
|
34
|
+
Dependabot::MetadataFinders
|
35
|
+
.register("docker", Dependabot::Docker::MetadataFinder)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "dependabot/utils"
|
@@ -30,5 +31,5 @@ module Dependabot
|
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
33
|
-
Dependabot::Utils
|
34
|
-
register_requirement_class("docker", Dependabot::Docker::Requirement)
|
34
|
+
Dependabot::Utils
|
35
|
+
.register_requirement_class("docker", Dependabot::Docker::Requirement)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "docker_registry2"
|
@@ -174,11 +175,11 @@ module Dependabot
|
|
174
175
|
def latest_tag
|
175
176
|
return unless latest_digest
|
176
177
|
|
177
|
-
tags_from_registry
|
178
|
-
select(&:canonical?)
|
179
|
-
sort_by { |t| comparable_version_from(t) }
|
180
|
-
reverse
|
181
|
-
find { |t| digest_of(t.name) == latest_digest }
|
178
|
+
tags_from_registry
|
179
|
+
.select(&:canonical?)
|
180
|
+
.sort_by { |t| comparable_version_from(t) }
|
181
|
+
.reverse
|
182
|
+
.find { |t| digest_of(t.name) == latest_digest }
|
182
183
|
end
|
183
184
|
|
184
185
|
def updated_digest
|
@@ -324,8 +325,8 @@ module Dependabot
|
|
324
325
|
|
325
326
|
def filter_ignored(candidate_tags)
|
326
327
|
filtered =
|
327
|
-
candidate_tags
|
328
|
-
reject do |tag|
|
328
|
+
candidate_tags
|
329
|
+
.reject do |tag|
|
329
330
|
version = comparable_version_from(tag)
|
330
331
|
ignore_requirements.any? { |r| r.satisfied_by?(version) }
|
331
332
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "aws-sdk-ecr"
|
@@ -18,9 +19,9 @@ module Dependabot
|
|
18
19
|
|
19
20
|
def credentials_for_registry(registry_hostname)
|
20
21
|
registry_details =
|
21
|
-
credentials
|
22
|
-
select { |cred| cred["type"] == "docker_registry" }
|
23
|
-
find { |cred| cred.fetch("registry") == registry_hostname }
|
22
|
+
credentials
|
23
|
+
.select { |cred| cred["type"] == "docker_registry" }
|
24
|
+
.find { |cred| cred.fetch("registry") == registry_hostname }
|
24
25
|
return unless registry_details
|
25
26
|
return registry_details unless registry_hostname.match?(AWS_ECR_URL)
|
26
27
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "dependabot/version"
|
@@ -14,16 +15,11 @@ module Dependabot
|
|
14
15
|
def initialize(version)
|
15
16
|
release_part, update_part = version.split("_", 2)
|
16
17
|
|
17
|
-
@release_part = Dependabot::Version.new(release_part.tr("-", "."))
|
18
|
+
@release_part = Dependabot::Version.new(release_part.sub("v", "").tr("-", "."))
|
18
19
|
|
19
20
|
@update_part = Dependabot::Version.new(update_part&.start_with?(/[0-9]/) ? update_part : 0)
|
20
|
-
end
|
21
21
|
|
22
|
-
|
23
|
-
super(new(version).to_semver)
|
24
|
-
rescue ArgumentError
|
25
|
-
# if we can't instantiate a version, it can't be correct
|
26
|
-
false
|
22
|
+
super(@release_part)
|
27
23
|
end
|
28
24
|
|
29
25
|
def to_semver
|
@@ -47,5 +43,5 @@ module Dependabot
|
|
47
43
|
end
|
48
44
|
end
|
49
45
|
|
50
|
-
Dependabot::Utils
|
51
|
-
register_version_class("docker", Dependabot::Docker::Version)
|
46
|
+
Dependabot::Utils
|
47
|
+
.register_version_class("docker", Dependabot::Docker::Version)
|
data/lib/dependabot/docker.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
# These all need to be required so the various classes can be registered in a
|
@@ -11,8 +12,8 @@ require "dependabot/docker/requirement"
|
|
11
12
|
require "dependabot/docker/version"
|
12
13
|
|
13
14
|
require "dependabot/pull_request_creator/labeler"
|
14
|
-
Dependabot::PullRequestCreator::Labeler
|
15
|
-
register_label_details("docker", name: "docker", colour: "21ceff")
|
15
|
+
Dependabot::PullRequestCreator::Labeler
|
16
|
+
.register_label_details("docker", name: "docker", colour: "21ceff")
|
16
17
|
|
17
18
|
require "dependabot/dependency"
|
18
19
|
Dependabot::Dependency.register_production_check("docker", ->(_) { true })
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.231.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.231.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.
|
26
|
+
version: 0.231.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 1.19.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-sorbet
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.7.3
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.7.3
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: stackprof
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,7 +216,7 @@ licenses:
|
|
202
216
|
- Nonstandard
|
203
217
|
metadata:
|
204
218
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
205
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
219
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.231.0
|
206
220
|
post_install_message:
|
207
221
|
rdoc_options: []
|
208
222
|
require_paths:
|