portfolio-analysis
Pass
Audited by Gen Agent Trust Hub on Oct 31, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONDATA_EXFILTRATIONCOMMAND_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted financial statements (XML) which provides a potential injection surface for instructions embedded in data fields.
- Ingestion points: External XML statements are read and parsed by the
scripts/adapters/ibkr.pyscript. - Boundary markers: The
SKILL.mdfile contains explicit instructions for the agent to treat all statement fields and retrieved documents strictly as data and not as instructions. - Capability inventory: The skill possesses the ability to execute sibling skill scripts via the CLI and write local report files using
scripts/analyze_portfolio.py. - Sanitization: A
safe()function inscripts/analyze_portfolio.pyescapes Markdown control characters and HTML tags (e.g.,|,<,>) before interpolating parsed data into workpapers and reports. - [DYNAMIC_EXECUTION]: The XML parsing logic in
scripts/adapters/ibkr.pyutilizes the standard library'sxml.etree.ElementTreemodule. - Mitigation: The script implements a manual check for
<!DOCTYPEand<!ENTITYdeclarations within the raw XML content to prevent XML External Entity (XXE) attacks. - [DATA_EXFILTRATION]: The skill is designed to handle sensitive financial data from broker exports.
- Mitigation: Sensitive account identifiers are replaced with run-local pseudonyms (e.g.,
account-1,account-2) during normalization. - Mitigation: The instructions explicitly direct the agent to keep raw exports and balances local and out of version control, emphasizing that external research should only utilize anonymous instrument identifiers like ISINs or tickers.
- [COMMAND_EXECUTION]: The skill provides a CLI for local parsing and instructs the agent to coordinate research by executing scripts from sibling skills (
financial-reports-scraperandfundamental-analysis). These operations are scoped to the local environment to preserve data privacy and are consistent with the skill's stated purpose.
Audit Metadata