$ circleci build
Docker image digest: sha256:e8c08f3dc363f9b90915266df7220b9d4c1413fd66aed162a854da5ae1ae88c4
====>> Spin up Environment
Build-agent version 1.0.17801-1d37c01b (2019-10-15T22:27:37+0000)
Error: Configuration errors: 1 error occurred:
- Error in config file: The schema/shape of the YAML is incorrect: json: cannot unmarshal array into Go struct field JobDescription.machine of type machine.MachineOpts
Step failed
Task failed
Error: 1 error occurred:
- Error in config file: The schema/shape of the YAML is incorrect: json: cannot unmarshal array into Go struct field JobDescription.machine of type machine.MachineOpts
Here is config.yml file
version: 2
workflows:
main:
jobs:
- build
jobs:
build:
machine:
- image: opensecurity/mobile-security-framework-mobsf:latest
#port: 8000
docker_layer_caching: true
steps:
- checkout
- run:
name: Mobile Security Framework
command: |
#docker build -f /Users/venkata.neelakantam/Downloads/bc-mobile-android/Dockerfile run -it --env-file ./env.list -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest
sleep 30s
#sudo apt-get update
#sudo apt-get install git
#sudo apt-get install jq
./gradlew assembleProductionRelease
mv app/build/outputs/apk/production/release/*.apk ./app.apk
response=curl -F 'file=@./app.apk' http://localhost:8000/api/v1/upload -H "Authorization:$MOBSF_API_KEY"
SCAN_TYPE=echo $response | jq '.scan_type' | sed 's/"//g'
FILE_NAME=echo $response | jq '.file_name' | sed 's/"//g'
HASH=echo $response | jq '.hash' | sed 's/"//g'
echo “export SCAN_TYPE=$SCAN_TYPE” >> $BASH_ENV
echo “export FILE_NAME=$FILE_NAME” >> $BASH_ENV
echo “export HASH=$HASH” >> $BASH_ENV
response=curl -X POST --url http://localhost:8000/api/v1/scan --data "scan_type=$SCAN_TYPE&file_name=$FILE_NAME&hash=$HASH" -H "Authorization:$MOBSF_API_KEY"
echo response >> report.json docker run -it -v (pwd):/app owasp/glue:raw-latest ruby bin/glue -t Dynamic -T /app/report.json --mapping-file mobsf --finding-file-path /app/android.json