mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
Update dockerfile and scripts
This commit is contained in:
+5
-3
@@ -1,8 +1,10 @@
|
||||
FROM python
|
||||
MAINTAINER Bridgecrew <www.bridgecrew.io>
|
||||
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install jq -y && pip install awscli detect-secrets
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install jq -y && pip install awscli detect-secrets boto3
|
||||
|
||||
RUN curl -sL https://github.com/bridgecrewio/prowler/archive/master.tar.gz | tar xz
|
||||
RUN curl -sL https://github.com/bridgecrewio/prowler/archive/feature/dockerized_prowler.tar.gz | tar xz
|
||||
|
||||
RUN run.sh
|
||||
WORKDIR "./prowler-feature-dockerized_prowler"
|
||||
|
||||
ENTRYPOINT ["./run.sh"]
|
||||
|
||||
+2
-2
@@ -22,5 +22,5 @@ print('Got account details, assuming role')
|
||||
|
||||
temporary_creds = sts.assume_role(RoleArn=account_details['cross_account_role_arn'], ExternalId=account_details['external_id'], RoleSessionName='prowler')['Credentials']
|
||||
|
||||
os.environ['AWS_ACCESS_KEY_ID2'] = temporary_creds['AccessKeyId']
|
||||
os.environ['AWS_SECRET_ACCESS_KEY2'] = temporary_creds['SecretAccessKey']
|
||||
os.environ['AWS_ACCESS_KEY_ID'] = temporary_creds['AccessKeyId']
|
||||
os.environ['AWS_SECRET_ACCESS_KEY'] = temporary_creds['SecretAccessKey']
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
#!/bin/bash
|
||||
AccountId=$1
|
||||
Alias=$2
|
||||
|
||||
echo $AWS_ACCESS_KEY_ID
|
||||
python3 credentials.py $AccountId
|
||||
python3 credentials.py $ACCOUNT_ID
|
||||
|
||||
echo $AWS_ACCESS_KEY_ID
|
||||
echo $AWS_ACCESS_KEY_ID2
|
||||
echo "Running prowler on $Alias"
|
||||
echo "Running prowler on $ALIAS"
|
||||
./prowler -c extra741 -M json > output.json
|
||||
|
||||
unset AWS_ACCESS_KEY_ID
|
||||
echo $AWS_ACCESS_KEY_ID
|
||||
aws s3api put-object --bucket $BUCKET --key prowler/$ACCOUNT_ID/results
|
||||
Reference in New Issue
Block a user