Giter VIP home page Giter VIP logo

aws-cis-scanner's People

Contributors

adamcrosby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-cis-scanner's Issues

Segfault when running on default region

Hi,

When running v1.1 on Ubuntu 16.04, it segfaults with the following error:

./aws-cis-scanner-linux-x64-v1.1
BucketRegionError: incorrect region, the bucket is not in 'ap-northeast-1' region
	status code: 301, request id:
BucketRegionError: incorrect region, the bucket is not in 'ap-northeast-1' region
	status code: 301, request id:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x491419]

goroutine 1 [running]:
panic(0x9c4bc0, 0xc42000a0a0)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/adamcrosby/aws-cis-scanner/benchmark.s3BucketPolicyChecks(0xc4200240b0, 0xc420443420, 0x1b, 0xaacf01)
	/Users/adam/code/golang/src/github.com/adamcrosby/aws-cis-scanner/benchmark/logging.go:203 +0x139
github.com/adamcrosby/aws-cis-scanner/benchmark.ensureS3LogsBucketNotPublic(0xc42043da70, 0x2, 0x2, 0xc4200240b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/adam/code/golang/src/github.com/adamcrosby/aws-cis-scanner/benchmark/logging.go:152 +0x17e
github.com/adamcrosby/aws-cis-scanner/benchmark.LoggingChecks(0xc4200240d0, 0xc4200240c0, 0xc4200240b0, 0xc4200240a0, 0xc4200119b0, 0xc420024110)
	/Users/adam/code/golang/src/github.com/adamcrosby/aws-cis-scanner/benchmark/logging.go:52 +0x2b5
main.checkRegion(0xc4200119b0, 0xc420070c60, 0x0, 0x0, 0x0, 0xc42000bbd0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/adam/code/golang/src/github.com/adamcrosby/aws-cis-scanner/aws-cis-scanner.go:99 +0x4f3
main.main()
	/Users/adam/code/golang/src/github.com/adamcrosby/aws-cis-scanner/aws-cis-scanner.go:61 +0x2b9

When running with -r "eu-west-1", it completes within a second, without checking anything:

real	0m0.013s
user	0m0.008s
sys	0m0.004s

Suggestion on how to fix this? This tools surely looks nice!

Add isolated region support

GovCloud, Beijing and C2S regions need to be added as flags.

Need to verify if each of the regions even supports the services necessary. I might break this into 3 different issues to track each separately. I have no way of testing Beijing or C2S.

Add testing!

Right now there is no testing, and barely any error catching.
Add automated testing and test coverage.

Add GovCloud support

Part of #1 requires special handling logic for GovCloud:

  • not all services exist (verify that CIS benchmark ones do)
  • only the one region needs to be checked for a govcloud account

Add support for Beijing (CN) region

Part of #1 requires special handling logic for Beijing Region:

  • not all services exist (verify that CIS benchmark ones do)
  • only the one region needs to be checked for a Beijing account

Need: someway to TEST this?

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.