aws_recon 0.5.30 → 0.5.32
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/lib/aws_recon/collectors/ecrpublic.rb +58 -0
- data/lib/aws_recon/services.yaml +27 -1
- data/lib/aws_recon/version.rb +1 -1
- data/readme.md +1 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 796c2c70d8fd50ebfd30491a881dc09b7a1dbf79ce9e6c3fa0fd3ee9a748c422
|
4
|
+
data.tar.gz: 3bb41eba68b0b6bf3ee86ecc33d1fe0d30a852253599dd3afb5c451bdd1c9a70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f425e8fe76be0ce0ee6de7fae5f78f68ff636cebe5f5d9a921c355af43775125a23d80dbc6529af7adee9e727403021a1284f8b011b12adc89b1eb3f297e2ef7
|
7
|
+
data.tar.gz: eb1b658869cd865a28e237ca9f7134c4c1a39935dc845e5c8b6ad08fef2c3617d9e454ffb4450af7e7a59ae6b4a308f52a4db785c962420ae0147af540531e7a
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Collect ECRPublic resources
|
5
|
+
#
|
6
|
+
class ECRPublic < Mapper
|
7
|
+
#
|
8
|
+
# Returns an array of resources.
|
9
|
+
#
|
10
|
+
def collect
|
11
|
+
resources = []
|
12
|
+
|
13
|
+
#
|
14
|
+
# describe_repositories
|
15
|
+
#
|
16
|
+
|
17
|
+
puts(@client.describe_repositories)
|
18
|
+
@client.describe_repositories.each_with_index do |response, page|
|
19
|
+
log(response.context.operation_name, page)
|
20
|
+
|
21
|
+
response.repositories.each do |repo|
|
22
|
+
struct = OpenStruct.new(repo.to_h)
|
23
|
+
struct.type = "repository"
|
24
|
+
struct.arn = repo.repository_arn
|
25
|
+
struct.policy = @client
|
26
|
+
.get_repository_policy({ repository_name: repo.repository_name }).policy_text.parse_policy
|
27
|
+
|
28
|
+
struct.images = []
|
29
|
+
#
|
30
|
+
# describe images
|
31
|
+
#
|
32
|
+
@client.describe_images({ repository_name: repo.repository_name }).image_details.each_with_index do |image, page|
|
33
|
+
log(response.context.operation_name, "describe_images", page)
|
34
|
+
image_hash = image.to_h
|
35
|
+
struct.images << image_hash
|
36
|
+
end
|
37
|
+
rescue Aws::ECR::Errors::ServiceError => e
|
38
|
+
log_error(e.code)
|
39
|
+
|
40
|
+
raise e unless suppressed_errors.include?(e.code) && !@options.quit_on_exception
|
41
|
+
ensure
|
42
|
+
resources.push(struct.to_h)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
resources
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
# not an error
|
52
|
+
def suppressed_errors
|
53
|
+
%w[
|
54
|
+
RepositoryPolicyNotFoundException,
|
55
|
+
ScanNotFoundException
|
56
|
+
]
|
57
|
+
end
|
58
|
+
end
|
data/lib/aws_recon/services.yaml
CHANGED
@@ -55,6 +55,33 @@
|
|
55
55
|
alias: rds
|
56
56
|
- name: ECR
|
57
57
|
alias: ecr
|
58
|
+
- name: ECRPublic
|
59
|
+
alias: ecrpublic
|
60
|
+
excluded_regions:
|
61
|
+
- af-south-1
|
62
|
+
- ap-east-1
|
63
|
+
- ap-northeast-1
|
64
|
+
- ap-northeast-2
|
65
|
+
- ap-northeast-3
|
66
|
+
- ap-south-1
|
67
|
+
- ap-southeast-1
|
68
|
+
- ap-southeast-2
|
69
|
+
- ca-central-1
|
70
|
+
- eu-central-1
|
71
|
+
- eu-north-1
|
72
|
+
- eu-south-1
|
73
|
+
- eu-west-1
|
74
|
+
- eu-west-2
|
75
|
+
- eu-west-3
|
76
|
+
- me-south-1
|
77
|
+
- sa-east-1
|
78
|
+
- us-east-2
|
79
|
+
- us-west-1
|
80
|
+
- us-west-2
|
81
|
+
- af-south-1
|
82
|
+
- ap-east-1
|
83
|
+
- eu-south-1
|
84
|
+
- me-south-1
|
58
85
|
- name: DynamoDB
|
59
86
|
alias: dynamodb
|
60
87
|
- name: KMS
|
@@ -125,7 +152,6 @@
|
|
125
152
|
- name: WorkSpaces
|
126
153
|
alias: workspaces
|
127
154
|
excluded_regions:
|
128
|
-
- af-south-1
|
129
155
|
- ap-east-1
|
130
156
|
- ap-northeast-3
|
131
157
|
- eu-north-1
|
data/lib/aws_recon/version.rb
CHANGED
data/readme.md
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_recon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Larsen
|
8
8
|
- Darkbit
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -154,7 +154,7 @@ dependencies:
|
|
154
154
|
description: AWS Recon is a command line tool to collect resources from an Amazon
|
155
155
|
Web Services (AWS) account. The tool outputs JSON suitable for processing with other
|
156
156
|
tools.
|
157
|
-
email:
|
157
|
+
email:
|
158
158
|
executables:
|
159
159
|
- aws_recon
|
160
160
|
- console
|
@@ -203,6 +203,7 @@ files:
|
|
203
203
|
- lib/aws_recon/collectors/dynamodb.rb
|
204
204
|
- lib/aws_recon/collectors/ec2.rb
|
205
205
|
- lib/aws_recon/collectors/ecr.rb
|
206
|
+
- lib/aws_recon/collectors/ecrpublic.rb
|
206
207
|
- lib/aws_recon/collectors/ecs.rb
|
207
208
|
- lib/aws_recon/collectors/efs.rb
|
208
209
|
- lib/aws_recon/collectors/eks.rb
|
@@ -263,7 +264,7 @@ homepage: https://github.com/darkbitio/aws-recon
|
|
263
264
|
licenses:
|
264
265
|
- MIT
|
265
266
|
metadata: {}
|
266
|
-
post_install_message:
|
267
|
+
post_install_message:
|
267
268
|
rdoc_options: []
|
268
269
|
require_paths:
|
269
270
|
- lib
|
@@ -278,8 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
279
|
- !ruby/object:Gem::Version
|
279
280
|
version: '0'
|
280
281
|
requirements: []
|
281
|
-
rubygems_version: 3.
|
282
|
-
signing_key:
|
282
|
+
rubygems_version: 3.1.6
|
283
|
+
signing_key:
|
283
284
|
specification_version: 4
|
284
285
|
summary: A multi-threaded AWS security-focused inventory collection tool.
|
285
286
|
test_files: []
|