Write a function to scan a list for common security vulnerabilities.
The input is a list of source-code lines. Return one finding for each line containing a recognized pattern, preserving line order. Report the zero-based line index and vulnerability type. Recognize eval( or exec( as code_execution, assignments to password, api_key, or secret as hardcoded_secret, and innerHTML as cross_site_scripting. Matching is case-insensitive. If a line matches multiple categories, report only the first category in the order listed above.
Signature: def scan_vulnerabilities(lines):
Return a list of dictionaries with keys line and issue.
def scan_vulnerabilities(lines):