pre-trade-discipline-gate

Warn

Audited by Gen Agent Trust Hub on Sep 5, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The script scripts/check_pre_trade_discipline.py dynamically loads the module trader-memory-core/scripts/thesis_store.py at runtime using importlib.util.spec_from_file_location. The module path is computed relative to the script's location using Path(__file__).resolve().parents[2]. Dynamic loading from relative, computed paths is a vector for local code execution if the filesystem structure or sibling skill contents are compromised.
  • [INDIRECT_PROMPT_INJECTION]: The skill ingests untrusted data from a user-controlled file to generate discipline reports.
  • Ingestion points: The load_candidates function reads raw data and notes from the path provided via the --answers-file argument.
  • Boundary markers: The skill does not use specific delimiters or instructions to prevent the agent from following instructions embedded within the user data during later reviews of the reports.
  • Capability inventory: The skill performs filesystem writes to generate JSON/Markdown reports (write_reports) and journals (write_journal), and it invokes logic within the dynamically loaded thesis_store module.
  • Sanitization: The skill uses json.dumps and yaml.safe_dump for structured output but lacks content-level sanitization for text fields like notes, allowing potentially malicious instructions to be persisted in markdown reports.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 5, 2026, 05:42 PM
Security Audit — agent-trust-hub — pre-trade-discipline-gate