Skip to content

Commit

Permalink
Merge pull request #3 from hexrom/feature/output-to-s3
Browse files Browse the repository at this point in the history
export wpscan output to s3
  • Loading branch information
hexrom authored Dec 26, 2023
2 parents 9bc5c34 + 5ff49a6 commit 48d7cd8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,22 @@ jobs:
- name: Run WPScan
run: |
docker pull wpscanteam/wpscan
docker run --network dvwp_default wpscanteam/wpscan wpscan --url http://wordpress/ --force
docker run --network dvwp_default wpscanteam/wpscan wpscan --url http://wordpress/ --force --output wpscan-output.json
docker cp $(docker ps -aqf "ancestor=wpscanteam/wpscan"):wpscan-output.json .
- name: Install AWS CLI
run: sudo apt-get install awscli

- name: Assume AWS Role and Upload Output to S3
env:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
run: |
TEMP_ROLE=$(aws sts assume-role --role-arn $AWS_ROLE_ARN --role-session-name github-actions)
AWS_ACCESS_KEY_ID=$(echo $TEMP_ROLE | jq -r .Credentials.AccessKeyId)
AWS_SECRET_ACCESS_KEY=$(echo $TEMP_ROLE | jq -r .Credentials.SecretAccessKey)
AWS_SESSION_TOKEN=$(echo $TEMP_ROLE | jq -r .Credentials.SessionToken)
aws s3 cp wpscan-output.json s3://wpscan-output-staging/
- name: Cleanup Docker Compose Services
run: docker-compose down
Expand Down

0 comments on commit 48d7cd8

Please sign in to comment.