This guide outlines the process of adding a new test image to the LEAPP project's image manifest (admin/image_manifest.json). The manifest is used to track metadata about publicly available test images (which are typically too large to store in the repository) and allows the make_test_data.py script to locate these images on a contributor's local system to generate focused test case data. Accurate image metadata, especially os_version, is also helpful for creating targeted test cases for conditional module logic.
-
Obtain the Test Image:
- Acquire a publicly available test image containing sample data for iOS artifacts.
- Note the source, creation date, and any relevant information about the image.
-
Extract File Path List:
- Extract a list of file paths from the test image.
- Save this list as a CSV file in the
admin/data/filepath-lists/directory. - Compress the CSV file as a zip archive.
-
Analyze File Path Patterns:
- Run the file path analysis script to generate search pattern results.
- Review the results in
admin/docs/filepath_results.csvandadmin/docs/filepath_search_summary.md.
-
Update the Image Manifest:
- Open the
admin/image_manifest.jsonfile. - Add a new entry to the
"images"array with the following structure:
- Open the
{
"image_name": "unique_image_name",
"description": "Brief description of the image and its contents",
"local_image_paths": [
"~/path/to/image/on/your/system.tar.gz",
"/alternative/path/to/image.zip"
],
"file_path_list": "admin/data/filepath-lists/your-image-name.csv.zip",
"download_url": "https://example.com/download/link/for/image",
"author": {
"name": "Author Name",
"organization": "Organization Name (if applicable)"
},
"image_info": {
"creation_date": "YYYY-MM-DD",
"os_name": "iPhone OS",
"os_version": "iOS X.X.X",
"device_model": "iPhone Model (if known)",
"extraction_method": "Full Filesystem / Logical / etc.",
"extraction_tool": "Tool used for extraction"
},
"file_info": {
"file_count": 123456,
"md5_hash": "md5_hash_of_the_image_file"
},
"notes": "Any additional notes or comments about the image"
}-
Verify Local Paths:
- Ensure that at least one of the
local_image_pathsexists on your system. - Add multiple paths to accommodate different contributor environments.
- Ensure that at least one of the
-
Commit Changes:
- Commit the updated
image_manifest.jsonfile to the repository. - Include the new file path list zip file in your commit.
- Commit the updated
- Use concise and unique names for the
image_namefield. - Provide as much detail as possible in the
descriptionandnotesfields.
- If the
make_test_data.pyscript fails to locate your image, check that at least one of thelocal_image_pathsis correct for your system. - Ensure that the
file_path_listpoints to a valid CSV zip file in the correct directory.