aws_recon 0.5.30 → 0.5.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55427b9861844e442faada828be71ec501bd776b273d5a316380e34bbaab21d5
4
- data.tar.gz: cd06fa9cde28baa831c285e8220e329a09a8b28b5a73760bc6ee2f68b8e9fa18
3
+ metadata.gz: d5d30a79acd6256deaea52f09600427740cd821ae4f5d65daf6012dc95cb44e4
4
+ data.tar.gz: cc51789bcae95c1339af7edc86417de46fd92f089bf1d01e9d296d314a9342ea
5
5
  SHA512:
6
- metadata.gz: 47d8288df62a31125dd44452d5dd166597785b80ee951f9d3f23b283640c3d047c90e4522461dfb170e36618dbac02ff175fba521ed3c70b28e0bb7fbcf76aa6
7
- data.tar.gz: f4d9abf53442068c7ff5f81708642f2c3fd59b52540cd9479551586cc4ac6a9c590d4d27bb68f51490df19b5f5f0ecb659c4161bc62e51251fea47c27cd45ca6
6
+ metadata.gz: d7a7bb7de812452842f330625c714cdb6028b80af72f6034e762057a905c445c943d96a3849e7dea992db8fb76151139ebb5a5338665b836800228ef0a284f1b
7
+ data.tar.gz: 2079f1d21b47dffd3b8923e1e7ab093c363932aaa5028d3bfce15acbf9e185be9e93dbdfb33d024555675ffb91d33074b60a85bf55a18fefe29292c2f6592064
@@ -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
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.5.30"
2
+ VERSION = "0.5.31"
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,7 +1,7 @@
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.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Larsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-31 00:00:00.000000000 Z
12
+ date: 2022-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
@@ -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