[TOC] # Environment Setup ## 1. Install Python & Setup virtual-env Create a folder and go into it ``` mkdir scan_env cd scan_env ``` Install Python3 ``` sudo apt install python3-pip python3 --version ```  Observe the installed Python version to decide which venv version to install (The following are examples) ``` sudo apt install python3.8-venv sudo apt install python3.10-venv ``` Create a virtual-env and activate it ``` python3 -m venv env_one source env_one/bin/activate ```  ## 2. Install Python requirements ==Need activate virtual-env== ``` pip install pandas pip install XlsxWriter pip install progress pip install openpyxl pip install matplotlib pip install seaborn sudo apt-get update sudo apt-get install python3-tk ```  ## 3. Install LibreOffice Calc Install LibreOffice Calc to open Excel .xlsx files ``` sudo apt-get update sudo apt-get install libreoffice ``` ## 4. Install Docker Install ``` sudo apt update sudo apt install apt-transport-https ca-certificates curl software-properties-common -y curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" apt-cache policy docker-ce sudo apt install docker-ce -y ``` Check Docker Status : ==active (running)== ``` sudo systemctl status docker ```  Installing Docker from the Official Repository (Option 1): https://phoenixnap.com/kb/install-docker-on-ubuntu-20-04 ## 5. Install Grype Install Grype v0.64.1 ``` wget -qO - https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo bash -s -- -b /usr/local/bin v0.64.1 ``` Check ``` grype version ``` --- # "auto_scan.sh" Operation ## 1. Docker Hub Login ``` sudo chmod 666 /var/run/docker.sock docker login -u <LOGIN> -p <PASSWORD> ```  ref: https://newbedev.com/got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket-at-unix-var-run-docker-sock-post-http-2fvar-2frun-2fdocker-sock-v1-24-auth-dial-unix-var-run-docker-sock-connect-permission-denied-code-example ## 2. Executing Shell Script ``` cd auto_scan chmod +x auto_scan.sh ./auto_scan.sh <number:1=cloud,2=edge> ```  Check executing finish  ### ==If no target is specified==  ## 3. Report Location ..../scan_env/auto_scan/<type>/<time>/report_file  --- # "compare.py" Operation You need to "activate" virtual env to execute this program ``` source ../env_one/bin/activate python compare.py <number:1=cloud,2=edge> ```  ## leave virtual env ``` deactivate ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up