Back to skill

Security audit

Interactive Brokers Suite

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed read-only Interactive Brokers reporting suite, but it includes unsafe Flex credential handling that needs review before installation.

Review this before installing if you will use Flex history or dividends. Do not run the ib-gateway python -c Flex command as written, do not pass tokens through environment variables or command text, and prefer the stdin-based configurator. Treat .ib-suite/config.yaml, snapshots, reports, and raw Flex output as sensitive financial data, and consider adding dependency locks and host validation for Flex downloads.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
ib-gateway/SKILL.md:42
Finding

Flex command exposes credentials and permits code injection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
ib-gateway/scripts/flex_fetch.py:699
Finding

Flex token can be forwarded to an unvalidated response-supplied URL

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/setup_venv.sh:24
Finding

Bootstrap installs unpinned executable third-party dependencies

Content
View full analysis
=1.0.1 requests>=2.31 pytest>=8.0 ``` The local package also declares open-ended dependencies: ```toml [build-system] requires = ["setuptools>=68"] build-backend = "setuptools.build_meta" dependencies = [ "pydantic>=2.6", "pandas>=2.2", "pyarrow>=15", "numpy>=1.26", "plotly>=5.20", "kaleido>=0.2.1", "ruamel.yaml>=0.18", ] ``` ### Technical Analysis The setup script upgrades `pip` to an unspecified latest version and installs packages constrained only by minimum versions. No lockfile, exact pins, package hashes, or verified artifact policy is present. A future release satisfying these broad constraints can therefore be selected without any source change to this project. Python package installation may execute build-backend code, and installed packages execute later when imported. This makes the effective codebase mutable after review. No evidence in the reviewed repository establishes that the currently named dependencies are malicious. The vulnerability is the lack of reproducible, integrity-verified dependency resolution, which leaves the project exposed to compromised upstream releases, dependency-account takeover, package-index compromise, or unexpected breaking releases. The runtime environment also installs `pytest`, although it is a development and testing dependency. This unnecessarily increases the production dependency surface. ### Attack Path 1. A direct or transitive dependency publishes a compromised release that satisfies an existing lower-bound constraint. 2. Alternatively, the configured pack ...[truncated 956 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (27)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 150)May include surrounding context.

md
- **`SKILL.md` with valid frontmatter.** Required `name` + `description`, and

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 157)May include surrounding context.

md
- **`SKILL.md` with valid frontmatter.** Required `name` + `description`, and

Insecure deserialization: yaml.load() without SafeLoader

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

Untrusted data is passed to an insecure deserializer (pickle, marshal, dill, jsonpickle, joblib, yaml.load without a safe Loader, or torch.load without weights_only). These deserializers reconstruct arbitrary objects and invoke callables during loading, so deserializing attacker-controlled bytes is equivalent to arbitrary code execution.

Content

Scanner excerpt · ib-common/ib_common/config.py (reported line 80)May include surrounding context.

python
yaml = YAML(typ="safe")
    try:
        with open(path, "r", encoding="utf-8") as f:
            raw = yaml.load(f)
    except (YAMLError, TypeError):
        raise ValueError("configuration YAML is malformed") from None
    if raw is None:

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · ib-dividend-income/SKILL.md (reported line 66)May include surrounding context.

md
- If `flex.dividend_query_ids` is missing, ask which numeric window the user
  wants to register, then ask for that saved Activity Flex Query's Query ID.
- For `coverage_required`, use the numeric window named in `missing` and ask for
  its Query ID; do not ask the user to choose a different key silently.
- If `flex.token` is missing, ask for the Flex Web Service token after any
  needed window and Query ID have been collected. Do not ask for a configured
  item again.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring says the entrypoint is 'Read-only and offline' and the CLI description repeats 'read-only', which implies no filesystem modification. However, the code passes an output directory to report.build_report and the CLI help explicitly says it is an 'output directory for the report + charts', indicating files are produced as a side effect.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · ib-dividend-income/flex-query-setup.md (reported line 155)May include surrounding context.

md
First ensure the ib-suite onboarding flow has created
`.ib-suite/config.yaml`. In a conversation, collect one item at a time: desired
window, matching Query ID, then the token only if it is absent. Do not ask the
user to repeat a token that is already configured.

`ib-trade-history` and `ib-dividend-income` now register independent Query IDs

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · ib-trade-history/flex-query-setup.md (reported line 154)May include surrounding context.

md
First ensure the ib-suite onboarding flow has created
`.ib-suite/config.yaml`. In a conversation, collect one item at a time: desired
window, matching Query ID, then the token only if it is absent. Do not ask the
user to repeat a token that is already configured.

`ib-trade-history` and `ib-dividend-income` now register independent Query IDs

Insecure deserialization: yaml.load() without SafeLoader

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

Untrusted data is passed to an insecure deserializer (pickle, marshal, dill, jsonpickle, joblib, yaml.load without a safe Loader, or torch.load without weights_only). These deserializers reconstruct arbitrary objects and invoke callables during loading, so deserializing attacker-controlled bytes is equivalent to arbitrary code execution.

Content

Scanner excerpt · ib-trade-history/scripts/configure_flex.py (reported line 67)May include surrounding context.

python
yaml = YAML(typ="rt")
    try:
        contents = path.read_text(encoding="utf-8")
        doc = yaml.load(contents)
        if doc is None:
            doc = yaml.load(f"{contents}\n{{}}\n")
    except (OSError, YAMLError):

Insecure deserialization: yaml.load() without SafeLoader

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

Untrusted data is passed to an insecure deserializer (pickle, marshal, dill, jsonpickle, joblib, yaml.load without a safe Loader, or torch.load without weights_only). These deserializers reconstruct arbitrary objects and invoke callables during loading, so deserializing attacker-controlled bytes is equivalent to arbitrary code execution.

Content

Scanner excerpt · ib-trade-history/scripts/configure_flex.py (reported line 69)May include surrounding context.

python
contents = path.read_text(encoding="utf-8")
        doc = yaml.load(contents)
        if doc is None:
            doc = yaml.load(f"{contents}\n{{}}\n")
    except (OSError, YAMLError):
        raise ValueError(_CONFIG_ERROR) from None

Insecure deserialization: yaml.load() without SafeLoader

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

Untrusted data is passed to an insecure deserializer (pickle, marshal, dill, jsonpickle, joblib, yaml.load without a safe Loader, or torch.load without weights_only). These deserializers reconstruct arbitrary objects and invoke callables during loading, so deserializing attacker-controlled bytes is equivalent to arbitrary code execution.

Content

Scanner excerpt · scripts/init_config.py (reported line 34)May include surrounding context.

python
yaml = YAML(typ="rt")
    with open(template, "r", encoding="utf-8") as f:
        doc = yaml.load(f)

    port = _PORT_BY_MODE[mode]
    doc.setdefault("connection", {})

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · ib-common/ib_common/dividend_income.py (reported line 129)May include surrounding context.

python
rows: list[FlexDividendAccrual], field_name: str
) -> float | None:
    """Sum one nullable lifecycle amount while preserving all-null input."""
    values = [getattr(row, field_name) for row in rows]
    known = [value for value in values if value is not None]
    return None if not known else sum(known)

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · ib-common/ib_common/dividend_income.py (reported line 1190)May include surrounding context.

python
def component(name: str) -> float | None:
        """Sum known values for one component while retaining all-null state."""
        values = [getattr(line, f"{prefix}{name}") for line in lines]
        known = [value for value in values if value is not None]
        return None if not known else sum(known)

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · ib-common/ib_common/dividend_income.py (reported line 1211)May include surrounding context.

python
"""Group dividend totals deterministically by one line attribution field."""
    grouped: dict[str, list[DividendIncomeLine]] = defaultdict(list)
    for line in lines:
        grouped[getattr(line, field_name)].append(line)
    return {
        key: _totals(grouped[key], base=base)
        for key in sorted(grouped)

Unverifiable Dependency: setuptools has 10 known advisory(ies) (CVE-2013-1633 (Setuptools vulnerable to Man-in-the-middle attacks); CVE-2025-47273 (setuptools has a path traversal vulnerability in PackageIndex.download that lead); CVE-2024-6345 (setuptools vulnerable to Command Injection via package URL) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pydantic has 4 known advisory(ies) (CVE-2021-29510 (Use of "infinity" as an input to datetime and date fields causes infinite loop i); CVE-2024-3772 (Pydantic regular expression denial of service); CVE-2021-29510 (Pydantic is a data validation and settings management using Python type hinting.) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pyarrow has 9 known advisory(ies) (CVE-2023-47248 (PyArrow: Arbitrary code execution when loading a malicious data file); CVE-2019-12408 (Missing Initialization of Resource in Apache Arrow); CVE-2019-12410 (Missing Initialization of Resource in Apache Arrow) +6 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
72% confidence
Finding

The pyarrow dependency is only lower-bounded (pyarrow>=15), and pyarrow has had serious file-parsing issues including arbitrary code execution from malicious data files. In a data/analytics skill handling portfolio or market data, permissive versioning can leave deployments exposed if a vulnerable release in the allowed range is resolved or retained.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The dependency is specified with a lower bound only (ib_async>=1.0.1), which allows future unreviewed versions to be installed and makes builds non-reproducible. While not an immediate exploitable flaw by itself, it increases supply-chain risk because a later vulnerable or malicious release could be pulled in without notice.

Content

Scanner excerpt · ib-common/requirements.txt (reported line 2)May include surrounding context.

text
-e ./ib-common
ib_async>=1.0.1
requests>=2.31
pytest>=8.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

requests>=2.31 is unpinned, so installations may resolve to different versions over time, including versions with known security defects. This weakens reproducibility and makes it difficult to verify whether deployed environments are protected from published advisories.

Content

Scanner excerpt · ib-common/requirements.txt (reported line 3)May include surrounding context.

text
-e ./ib-common
ib_async>=1.0.1
requests>=2.31
pytest>=8.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The manifest references requests without pinning a specific version, and requests has multiple known advisories across releases. Because the resolved version is unknown, the environment could install an affected release, making this more than a theoretical reproducibility issue if the package is used for network operations.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
90% confidence
Finding

pytest>=8.0 is also unpinned, which introduces supply-chain and reproducibility risk even if pytest is primarily a development dependency. In CI or test environments, pulling an unexpected version can introduce vulnerable code paths or malicious package changes.

Content

Scanner excerpt · ib-common/requirements.txt (reported line 4)May include surrounding context.

text
-e ./ib-common
ib_async>=1.0.1
requests>=2.31
pytest>=8.0

Unverifiable Dependency: pytest has 2 known advisory(ies) (CVE-2025-71176 (pytest has vulnerable tmpdir handling); CVE-2025-71176 (pytest has vulnerable tmpdir handling)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
84% confidence
Finding

pytest has known advisories in some versions, and the lack of pinning means an affected release could be installed in development or CI contexts. The risk is lower than a runtime production dependency, but compromised test infrastructure can still affect build integrity and developer systems.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · ib-dividend-income/scripts/dividend_income.py (reported line 312)May include surrounding context.

python
handler.setFormatter(logging.Formatter("%(levelname)s %(message)s"))
    LOGGER.handlers.clear()
    LOGGER.addHandler(handler)
    LOGGER.setLevel(getattr(logging, level_name))
    LOGGER.propagate = False

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · ib-options-overview/scripts/options_overview.py (reported line 48)May include surrounding context.

python
def _scaled_greek(position: OptionPositionView, name: str) -> float | None:
    """Return the signed, contract-multiplier-adjusted Greek when available."""
    value = getattr(position, name)
    if value is None or position.fx_rate is None:
        return None
    return value * position.quantity * position.multiplier * position.fx_rate