Skip to content

Handle non-numeric manifest icon keys in icon selection fallback #186

@harshal-paltse

Description

@harshal-paltse

Title: Handle Non-Numeric Manifest Icon Keys to Prevent ValueError Crash
Severity: CRITICAL
Component: src/extension_shield/core/extension_analyzer.py / icon extraction logic
Status: Already has PR #132 open (needs review)

Problem

The extension icon extraction crashes when manifest.json contains non-numeric icon keys. The code tries to convert all keys to integers without validation.

# BUGGY CODE (Somewhere in icon extraction):
icons = manifest.get("icons", {})
for key in icons.keys():
    size = int(key)  # ❌ CRASHES if key is "192x192" or non-numeric

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions