GithubHelp home page GithubHelp logo

aws-samples / amazon-ecr-continuous-scan Goto Github PK

View Code? Open in Web Editor NEW
48.0 11.0 12.0 806 KB

Example container image re-scan with Amazon ECR

Home Page: https://aws.amazon.com/blogs/containers/amazon-ecr-native-container-image-scanning/

License: Apache License 2.0

Makefile 5.11% Go 94.89%
aws aws-ecr security container-image image-scanning

amazon-ecr-continuous-scan's Issues

Missing go sdk moduules

Hi,

Am trying to build the code. I run a make deploy but the code cannot load two modules, s3manager and external.

I do not see these directories in github. How can I proceed?

[johnson@haysimp amazon-ecr-continuous-scan]$ make deploy
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/configs ./configs
configs/main.go:14:2: no required module provides package github.com/aws/aws-sdk-go-v2/aws/external; to add it:
go get github.com/aws/aws-sdk-go-v2/aws/external
configs/main.go:16:2: no required module provides package github.com/aws/aws-sdk-go-v2/service/s3/s3manager; to add it:
go get github.com/aws/aws-sdk-go-v2/service/s3/s3manager
make: *** [bconfigs] Error 1
[johnson@haysimp amazon-ecr-continuous-scan]$ go get github.com/aws/aws-sdk-go-v2/aws/external
go get: module github.com/aws/aws-sdk-go-v2@upgrade found (v1.3.0), but does not contain package github.com/aws/aws-sdk-go-v2/aws/external
[johnson@haysimp amazon-ecr-continuous-scan]$ go get github.com/aws/aws-sdk-go-v2/service/s3/s3manager
go get: module github.com/aws/aws-sdk-go-v2/service/s3@upgrade found (v1.3.0), but does not contain package github.com/aws/aws-sdk-go-v2/service/s3/s3manager
[johnson@haysimp amazon-ecr-continuous-scan]$

Thank you for your help.

Johnson Hays

Problems with getting dependencies

I'm having trouble running make deploy as instructed in the Installation section.

I've started with a relatively clean (has docker installed already but that's about it) CentOS 7 VM, and then installed AWS CLI, SAM CLI, go 1.17, and jq. I was able to create the buckets using the commands in the instructions. I ran go get github.com/gorilla/feeds.

The instructions for getting the Go SDK were not clear so I ran a few commands that were in the Download instructions from the Go SDK repo:

go get github.com/aws/aws-sdk-go-v2/aws
go get github.com/aws/aws-sdk-go-v2/config

I cloned this repo to ~/go/src so it was within the go project directory

I then tried to run make deploy from the ~/go/src/amazon-ecr-continuous-scan folder and got

GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/configs ./configs
go: cannot find main module, but found .git/config in /home/jadair/go/src/amazon-ecr-continuous-scan
	to create a module there, run:
	go mod init
make: *** [bconfigs] Error 1

So I ran go mod init then ran make deploy again. This time I got

$ make deploy
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/configs ./configs
configs/main.go:12:2: no required module provides package github.com/aws/aws-lambda-go/events; to add it:
	go get github.com/aws/aws-lambda-go/events
configs/main.go:13:2: no required module provides package github.com/aws/aws-lambda-go/lambda; to add it:
	go get github.com/aws/aws-lambda-go/lambda
configs/main.go:14:2: no required module provides package github.com/aws/aws-sdk-go-v2/aws/external; to add it:
	go get github.com/aws/aws-sdk-go-v2/aws/external
configs/main.go:15:2: no required module provides package github.com/aws/aws-sdk-go-v2/service/s3; to add it:
	go get github.com/aws/aws-sdk-go-v2/service/s3
configs/main.go:16:2: no required module provides package github.com/aws/aws-sdk-go-v2/service/s3/s3manager; to add it:
	go get github.com/aws/aws-sdk-go-v2/service/s3/s3manager
configs/main.go:17:2: no required module provides package github.com/aws/aws-sdk-go/aws; to add it:
	go get github.com/aws/aws-sdk-go/aws
configs/main.go:19:2: no required module provides package github.com/satori/go.uuid; to add it:
	go get github.com/satori/go.uuid`

So then I try to pull down those packages. Most of them were successful, except for these two

$ go get github.com/aws/aws-sdk-go-v2/aws/external
go get: module github.com/aws/aws-sdk-go-v2@upgrade found (v1.8.0), but does not contain package github.com/aws/aws-sdk-go-v2/aws/external
$ go get github.com/aws/aws-sdk-go-v2/service/s3/s3manager
go get: module github.com/aws/aws-sdk-go-v2/service/s3@upgrade found (v1.12.0), but does not contain package github.com/aws/aws-sdk-go-v2/service/s3/s3manager

It looks like aws/external got renamed to config at some point.

I can't seem to find anything on service/s3/s3mananger. Maybe it's feature/s3/manager now?

I'm new to go, so any help you can provide is appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.