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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55427b9861844e442faada828be71ec501bd776b273d5a316380e34bbaab21d5
4
- data.tar.gz: cd06fa9cde28baa831c285e8220e329a09a8b28b5a73760bc6ee2f68b8e9fa18
3
+ metadata.gz: 796c2c70d8fd50ebfd30491a881dc09b7a1dbf79ce9e6c3fa0fd3ee9a748c422
4
+ data.tar.gz: 3bb41eba68b0b6bf3ee86ecc33d1fe0d30a852253599dd3afb5c451bdd1c9a70
5
5
  SHA512:
6
- metadata.gz: 47d8288df62a31125dd44452d5dd166597785b80ee951f9d3f23b283640c3d047c90e4522461dfb170e36618dbac02ff175fba521ed3c70b28e0bb7fbcf76aa6
7
- data.tar.gz: f4d9abf53442068c7ff5f81708642f2c3fd59b52540cd9479551586cc4ac6a9c590d4d27bb68f51490df19b5f5f0ecb659c4161bc62e51251fea47c27cd45ca6
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.5.30"
2
+ VERSION = "0.5.32"
3
3
  end
data/readme.md CHANGED
@@ -358,6 +358,7 @@ AWS Recon aims to collect all resources and metadata that are relevant in determ
358
358
  - [x] DynamoDB
359
359
  - [x] EC2
360
360
  - [x] ECR
361
+ - [x] ECRPublic
361
362
  - [x] ECS
362
363
  - [x] EFS
363
364
  - [x] EKS
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.30
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-03-31 00:00:00.000000000 Z
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.0.8
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: []