aws_recon 0.5.28 → 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: c8229a3057964333c58233cb39472a5fb27adadc6098660464018cd16645b5c9
4
- data.tar.gz: 222eff40d76d1eeb68a6638a59ef369d53b8ef2994a43b0b765803096933b645
3
+ metadata.gz: d5d30a79acd6256deaea52f09600427740cd821ae4f5d65daf6012dc95cb44e4
4
+ data.tar.gz: cc51789bcae95c1339af7edc86417de46fd92f089bf1d01e9d296d314a9342ea
5
5
  SHA512:
6
- metadata.gz: 7f2248fcc733f9f42ae109f5cb96ab0c6e82562182b9e3dbc4404dca72599e224a38c8be7a9fa967d846957427dd6e9edd5387441afcecc2c4de8f55ad001244
7
- data.tar.gz: 62f854284d474f8376ac15cae45bae67bd111ed064bdd4fae1c0e6d5ee4a942d905aebee4ac3f12c297c9a5635fe56c58f774f69fa70896974ac211be23a6efb
6
+ metadata.gz: d7a7bb7de812452842f330625c714cdb6028b80af72f6034e762057a905c445c943d96a3849e7dea992db8fb76151139ebb5a5338665b836800228ef0a284f1b
7
+ data.tar.gz: 2079f1d21b47dffd3b8923e1e7ab093c363932aaa5028d3bfce15acbf9e185be9e93dbdfb33d024555675ffb91d33074b60a85bf55a18fefe29292c2f6592064
@@ -1,6 +1,7 @@
1
1
  name: docker-build
2
2
 
3
3
  on:
4
+ workflow_dispatch:
4
5
  push:
5
6
  branches: build
6
7
  paths:
@@ -31,6 +32,7 @@ jobs:
31
32
  uses: docker/build-push-action@v2
32
33
  with:
33
34
  push: true
35
+ platforms: linux/amd64,linux/arm64
34
36
  build-args: |
35
37
  VERSION=${{ env.VERSION_TAG }}
36
38
  tags: |
@@ -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.28"
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.28
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