|
|
|
@@ -105,11 +105,11 @@ var (
|
|
|
|
|
filesystemScanIncludePaths = filesystemScan.Flag("include-paths", "Path to file with newline separated regexes for files to include in scan.").Short('i').String()
|
|
|
|
|
filesystemScanExcludePaths = filesystemScan.Flag("exclude-paths", "Path to file with newline separated regexes for files to exclude in scan.").Short('x').String()
|
|
|
|
|
|
|
|
|
|
s3Scan = cli.Command("s3", "Find credentials in S3 buckets.")
|
|
|
|
|
s3ScanKey = s3Scan.Flag("key", "S3 key used to authenticate. Can be provided with environment variable AWS_ACCESS_KEY_ID.").Envar("AWS_ACCESS_KEY_ID").String()
|
|
|
|
|
s3ScanRoleArns = s3Scan.Flag("role-arn", "Specify the ARN of an IAM role to assume for scanning. You can repeat this flag.").Strings()
|
|
|
|
|
s3ScanSecret = s3Scan.Flag("secret", "S3 secret used to authenticate. Can be provided with environment variable AWS_SECRET_ACCESS_KEY.").Envar("AWS_SECRET_ACCESS_KEY").String()
|
|
|
|
|
s3ScanSessionToken = s3Scan.Flag("session-token", "S3 session token used to authenticate temporary credentials. Can be provided with environment variable AWS_SESSION_TOKEN.").Envar("AWS_SESSION_TOKEN").String()
|
|
|
|
|
s3Scan = cli.Command("s3", "Find credentials in S3 buckets.")
|
|
|
|
|
s3ScanKey = s3Scan.Flag("key", "S3 key used to authenticate. Can be provided with environment variable AWS_ACCESS_KEY_ID.").Envar("AWS_ACCESS_KEY_ID").String()
|
|
|
|
|
s3ScanRoleArns = s3Scan.Flag("role-arn", "Specify the ARN of an IAM role to assume for scanning. You can repeat this flag.").Strings()
|
|
|
|
|
s3ScanSecret = s3Scan.Flag("secret", "S3 secret used to authenticate. Can be provided with environment variable AWS_SECRET_ACCESS_KEY.").Envar("AWS_SECRET_ACCESS_KEY").String()
|
|
|
|
|
s3ScanSessionToken = s3Scan.Flag("session-token", "S3 session token used to authenticate temporary credentials. Can be provided with environment variable AWS_SESSION_TOKEN.").Envar("AWS_SESSION_TOKEN").String()
|
|
|
|
|
s3ScanCloudEnv = s3Scan.Flag("cloud-environment", "Use IAM credentials in cloud environment.").Bool()
|
|
|
|
|
s3ScanBuckets = s3Scan.Flag("bucket", "Name of S3 bucket to scan. You can repeat this flag.").Strings()
|
|
|
|
|
s3ScanMaxObjectSize = s3Scan.Flag("max-object-size", "Maximum size of objects to scan. Objects larger than this will be skipped. (Byte units eg. 512B, 2KB, 4MB)").Default("250MB").Bytes()
|
|
|
|
@@ -138,6 +138,8 @@ var (
|
|
|
|
|
|
|
|
|
|
dockerScan = cli.Command("docker", "Scan Docker Image")
|
|
|
|
|
dockerScanImages = dockerScan.Flag("image", "Docker image to scan. Use the file:// prefix to point to a local tarball, otherwise a image registry is assumed.").Required().Strings()
|
|
|
|
|
|
|
|
|
|
usingTUI = false
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
@@ -160,6 +162,7 @@ func init() {
|
|
|
|
|
// Overwrite the Args slice so overseer works properly.
|
|
|
|
|
os.Args = os.Args[:1]
|
|
|
|
|
os.Args = append(os.Args, args...)
|
|
|
|
|
usingTUI = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cmd = kingpin.MustParse(cli.Parse(os.Args[1:]))
|
|
|
|
@@ -199,7 +202,7 @@ func main() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if !*noUpdate {
|
|
|
|
|
updateCfg.Fetcher = updater.Fetcher(version.BuildVersion)
|
|
|
|
|
updateCfg.Fetcher = updater.Fetcher(usingTUI)
|
|
|
|
|
}
|
|
|
|
|
if version.BuildVersion == "dev" {
|
|
|
|
|
updateCfg.Fetcher = nil
|
|
|
|
@@ -469,7 +472,7 @@ func run(state overseer.State) {
|
|
|
|
|
Secret: *s3ScanSecret,
|
|
|
|
|
SessionToken: *s3ScanSessionToken,
|
|
|
|
|
Buckets: *s3ScanBuckets,
|
|
|
|
|
Roles: *s3ScanRoleArns,
|
|
|
|
|
Roles: *s3ScanRoleArns,
|
|
|
|
|
CloudCred: *s3ScanCloudEnv,
|
|
|
|
|
MaxObjectSize: int64(*s3ScanMaxObjectSize),
|
|
|
|
|
}
|
|
|
|
|