Sign inSign up

devrvk/apkscan-docker

By devrvk

•Updated over 1 year ago

Image
0

93

devrvk/apkscan-docker repository overview

⁠🛡️ APK Security Scanner Docker Image

This repository provides a Docker image for the APK Security Scanner, a powerful automated security analysis tool for Android APKs. The image integrates Semgrep and JADX to decompile and scan APKs for potential vulnerabilities, generating detailed reports in JSON and HTML formats. This README guides you through pulling the image from Docker Hub, setting up your environment, and running the analysis.

⁠📦 Pulling the Docker Image

The Docker image is available on Docker Hub under the devrvk/apkscan-docker repository. You can pull the image based on your architecture (AMD64 or ARM64). Choose the appropriate command based on your system:

⁠For AMD64 Systems
docker pull devrvk/apkscan-docker:amd64
⁠For ARM64 Systems
docker pull devrvk/apkscan-docker:arm64

Note: Ensure Docker is installed and running on your system. You can verify this by running docker --version.

⁠📂 Setting Up Input and Output Folders

The Docker image expects two directories in your local filesystem to handle APK input and analysis output:

  • input/: Contains the APK file(s) to analyze.
  • output/: Stores the analysis results, including decompiled code and reports.
⁠Steps to Create the Folders
  1. Create the directories in your current working directory:
    mkdir -p input output
    
  2. Place the APK file(s) you want to analyze into the input/ directory. For example:
    cp /path/to/your/target.apk input/
    

⁠🚀 Running the Analysis

The Docker image runs an entrypoint script that automatically scans the APK file from the input/ directory and saves the results to the output/ directory. The input/ and output/ directories are mounted as volumes into the container.

⁠Command to Run the Analysis

Run the following command, replacing amd64 or arm64 with the appropriate architecture for your system:

⁠For AMD64
docker run -v $(pwd)/input:/app/input -v $(pwd)/output:/app/output devrvk/apkscan-docker:amd64
⁠For ARM64
docker run -v $(pwd)/output:/app/output -v $(pwd)/input:/app/input devrvk/apkscan-docker:arm64

Options Explained:

  • --rm: Automatically removes the container after it exits.
  • -v $(pwd)/input:/app/input: Mounts the local input/ directory to /app/input inside the container.
  • -v $(pwd)/output:/app/output: Mounts the local output/ directory to /app/output inside the container.
  • devrvk/apkscan-docker:amd64 or devrvk/apkscan-docker:arm64: Specifies the image tag to use.
⁠Output

After the command completes, the output/ directory will contain:

  • analysis.log: Log of the terminal output during the analysis.
  • decompiled/: Directory with the decompiled APK source code.
  • reports/: Subdirectory with:
    • semgrep_results.json: Detailed findings in JSON format.
    • semgrep_report.html: User-friendly HTML report with severity indicators, vulnerability descriptions, and code snippets.

You can open analysis.log to review the analysis process and semgrep_report.html in a web browser for a detailed report.

Tag summary

Content type

Image

Digest

sha256:e354bcb1c…

Size

540.8 MB

Last updated

over 1 year ago

docker pull devrvk/apkscan-docker:amd64