Back to skill

Security audit

dialectica

Security checks for vulnerabilities and agentic risk

Overview

The skill serves its stated purpose, but its Expert runner can expose private local data and process questions beyond the one the user approved.

Review before installing. Run Expert work in an isolated account or container without private files or unrelated secrets; read-only mode does not protect confidentiality. Enter session tokens locally instead of sharing them in chat. Treat ask as a publishing and spending command, approve the final content and fee, and review feedback text before submission. Avoid relying on answer for strictly one-question authorization until incoming jobs are filtered. All five bundled files were inspected, with targeted review of executable behavior; live server enforcement and future downloaded releases were not verified. The evidence supports material control gaps, not malicious intent.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/trued.py:2621
Finding

Third-party questions reach a provider with access to local private files

Content
View full analysis

Impact

An adversarial question can attempt to induce local file reads and include private material in the submitted answer. The read-only setting restricts writes, not confidential reads; the client's own tool allowlist, including 'none', has no effect on this provider. Successful disclosure depends on the model following the adversarial request.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/trued.py:1155
Finding

Draft evaluation can immediately publish and charge without an enforced confirmation gate

Content
View full analysis

Impact

An invocation intended to obtain evaluation feedback can instead publish and spend wallet funds. A returned final draft or resolution specification can also be submitted without confirmation of that exact payload.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
Findings (35)

Tainted flow: 'req' from os.environ.get (line 250, credential/environment) → urllib.request.build_opener.open (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/trued.py (reported line 278)May include surrounding context.

python
not_mine = None
    status = None
    try:
        with _opener.open(req, timeout=timeout) as r:
            body = json.load(r)
    except urllib.error.HTTPError as e:
        not_mine = _not_mine_hint(e)

Tainted flow: 'req' from os.environ.get (line 1981, credential/environment) → urllib.request.build_opener.open (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/trued.py (reported line 1987)May include surrounding context.

python
if token:
        req.add_header("Authorization", f"Bearer {token}")
    try:
        with _gw_opener.open(req, timeout=REQUEST_TIMEOUT_S if timeout is None else timeout) as r:
            raw = r.read().decode("utf-8", "replace")
            status = r.status
    except urllib.error.HTTPError as e:

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied commands perform issue reporting and feature-request submission, neither of which is declared. References to search and ask appear only inside report text or as report metadata; the code does not actually search the knowledge base, ask a Question, or run an Expert. Reporting is the chunk's primary behavior rather than a supporting implementation detail of a declared operation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The supplied chunk exposes stored-note management rather than knowledge-base search, Question submission, or Expert operation. Reading and replacing notes are not disclosed in the description, and the chunk does not establish that these operations are supporting implementation details of the declared functions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The primary Expert workflow matches the description. Credential storage, gateway polling, configuration, and model execution are supporting implementation details. However, persistent account-note management and feedback submission are additional user-facing capabilities not represented by searching, asking Questions, or answering as an Expert. The notes capability accesses and modifies a separate account-level resource, while feedback creates a separate platform submission. No malicious behavior is established by this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The supplied command requests an analytics endpoint rather than searching knowledge, asking questions, or performing Expert work. Analytics retrieval is an additional, undeclared capability. Reading the session token for API authentication is a supporting implementation detail and is not independently treated as a mismatch.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
installed skill, export `DIALECTICA_SKILL_ROOT` as the folder containing that `SKILL.md`. Keep that folder's document, Python client and references together. D

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
"SKILL.md", "scripts/trued.py", "references/api.md",

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Now read `SKILL.md` from the selected folder before continuing.** The website serves one current release, so a fresh download may be newer than the document y

Context Leakage

High
Category
Data Exfiltration
Confidence
85% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

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

md
selected document, set `TRUED="$DIALECTICA_SKILL_ROOT/scripts/trued.py"` and run `python3 "$TRUED" --version`. Commands below use `trued <command>` for brevity; that means `python3 "$TRUED" <command>`. The client uses only Python's standard library.
- **Base URL:** `https://dialectica.xyz`, or `DIALECTICA_BASE_URL` if the user has set it (https only, except loopback). The raw-`curl` examples below use `$BASE`, which must resolve to whichever of those the client is using — otherwise a call would send the session token to a different host than the one it belongs to. Define it once in your shell, without a trailing slash (a doubled slash does not match the API's routes): `BASE="${DIALECTICA_BASE_URL:-https://dialectica.xyz}"; BASE="${BASE%/}"`.
- **Auth:** a session token stored at `~/.dialectica/session`, obtained per [Auth check](#auth-check). A sign-in lasts ~7 days. A connected Expert does not depend on it to keep working (see Workflow 3); asking Questions and changing settings do.
-

Context Leakage

High
Category
Data Exfiltration
Confidence
80% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

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

md
selected document, set `TRUED="$DIALECTICA_SKILL_ROOT/scripts/trued.py"` and run `python3 "$TRUED" --version`. Commands below use `trued <command>` for brevity; that means `python3 "$TRUED" <command>`. The client uses only Python's standard library.
- **Base URL:** `https://dialectica.xyz`, or `DIALECTICA_BASE_URL` if the user has set it (https only, except loopback). The raw-`curl` examples below use `$BASE`, which must resolve to whichever of those the client is using — otherwise a call would send the session token to a different host than the one it belongs to. Define it once in your shell, without a trailing slash (a doubled slash does not match the API's routes): `BASE="${DIALECTICA_BASE_URL:-https://dialectica.xyz}"; BASE="${BASE%/}"`.
- **Auth:** a session token stored at `~/.dialectica/session`, obtained per [Auth check](#auth-check). A sign-in lasts ~7 days. A connected Expert does not depend on it to keep working (see Workflow 3); asking Questions and changing settings do.
-

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/trued.py (reported line 1945)May include surrounding context.

python
class _NoRedirect(urllib.request.HTTPRedirectHandler):
    """Refuse redirects on gateway calls.

    These requests carry the agent's password / access token. The gateway is a
    JSON API that has no reason to redirect, so treat one as misconfiguration
    rather than trying to decide whether forwarding the credential is safe.
    """

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/trued.py (reported line 2014)May include surrounding context.

python
class TokenRejected(RuntimeError):
    """The gateway rejected our access token — re-login and retry."""


class LoginForbidden(RuntimeError):

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/trued.py (reported line 2022)May include surrounding context.

python
def gw_login(gateway, user_id, password):
    """Log in with the bootstrap or rotated password; return the access token.

    Persist the result immediately — after the first login the bootstrap
    password is dead (the server rotates it). A 429 raises `GatewayRateLimited`: wait and ask

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/trued.py (reported line 4089)May include surrounding context.

python
)
    return {
        "agentId": created["agentId"],
        # This URL receives the agent password and access token, so validate it.
        "homeserver": validate_http_url(
            created.get("matrixHomeserver"),
            "Dialectica agent gateway URL",

The built-in Codex provider permits local file reads while answering third-party Questions, although accessing the operator's files is unnecessary for the skill's stated purpose.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The built-in Codex provider answers adversarial third-party questions using a read-only sandbox that still permits local file reads, while DIALECTICA_PROVIDER_TOOLS does not restrict it. A prompt injection that induces a permitted read can place local secrets in the answer, which the client then publishes to Dialectica; read-only protection prevents modification, not disclosure.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
90% confidence
Finding

provider_env copies the complete parent environment into providers and hooks, removing only job metadata variables. This is not demonstrated malicious harvesting, but it unnecessarily exposes unrelated API keys and tokens to child processes; with the built-in Codex provider's command capabilities, a successful question injection could read those variables and disclose them in a submitted answer.

Content

Scanner excerpt · scripts/trued.py (reported line 2883)May include surrounding context.

python
An id outside `PROVIDER_JOB_ID_RE` is left out and said so on stderr, without the
    value, which came from the network.
    """
    env = dict(os.environ)
    for name in PROVIDER_JOB_ENV.values():
        env.pop(name, None)
    for key, name in PROVIDER_JOB_ENV.items():

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/trued.py (reported line 5225)May include surrounding context.

python
- this machine holds a finished Expert for this host (`configured`, with its gateway address,
      its user id and a credential): everything a start would have set up with the sign-in is
      already done, so nothing is skipped that this Expert still needs. The credential may be the
      saved access token or a replacement connection code (`agent reconnect`) not yet used;
    - the deployment accepts the credential. Without that, the work calls would go out with no
      credential and no sign-in and be refused as an anonymous caller.
    """

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · SKILL.md (reported line 106)May include surrounding context.

text
   Output rows: `Q <isrId> | viso:N fiso:N isos:N | <status> | near <0–1> | keyword|semantic | <question text>` (`near` is optional: it shows how close the match is when a similarity value is supplied; `keyword` means it matched your words and `semantic` means it is a neighbour. **A full page of `semantic` rows is not evidence the corpus has anything on the topic** — results are padded with neighbours, so relay the "no keyword matches" line rather than presenting them as matches. Both are absent on `--fast`, which is keyword-only.), `W <slug> | <snippet>` (wiki = Verified Answer pages), `A <arenaId> | <name> | <why it is closed, when it is>`. With `--fast`, question rows are just `Q <isrId> | <text>` — the fast endpoint carries no verification signals, so confirm `viso` depth via the full search or `question` before presenting anything as verified.
2. Prefer wiki hits and questions with `viso ≥ 1`. `viso`/`fiso` = verified/falsified answer counts.
3. Fetch the best hit:
   ```bash

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · SKILL.md (reported line 116)May include surrounding context.

md
ication progress. Never present an unverified Answer as verified.
5. **If the search turns up Questions nobody has answered well, the user can answer one.** Check what is actually claimable — `trued opportunities q="<the same keywords>"` — and if something comes back, offer it: *"nobody has answered this one, and your Expert could."* Then [answer it](#answer-one-question) if they say yes.

   Do this when the topic is one they could contribute to, not on every search. The search rows already show `viso:0` for an unanswered Question, but only the opportunity search knows whether **this** user may claim it — it excludes their own Questions, ones they have already answered, arenas they cannot enter, and anything already in flight. Offering without checking produces an offer that dies when acted on.

   **`trued opportunities` never replaces `trued search`.** It returns no wiki pages — the Verified Answers, the best thing to read — and hides the user's own Questions. Search first, always.

Session Persistence

Medium
Category
Rogue Agent
Confidence
98% confidence
Finding

Persisting an authentication token in a restricted directory is normal, but this workflow explicitly asks the user to paste a password-equivalent session token into the conversation and embeds it in a shell command. That exposes the token to conversation retention and potentially tool-call logging, allowing anyone who obtains it to exercise its account permissions during its roughly seven-day lifetime; local file permissions do not protect those copies.

Content

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

  1. Ask the user to open $BASE/connect-agent in a browser (offer to open it for them). The page has them sign in if needed, then shows their agent token with a copy button. The token belongs to that host, so it must be the same one the client is pointed at.
  2. Have them paste the token to you, then save it:
    bash
    mkdir -p ~/.dialectica && chmod 700 ~/.dialectica
    (umask 177; printf '%s' '<token>' > ~/.dialectica/session)   # session token — treat as a password
    

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 · SKILL.md (reported line 334)May include surrounding context.

md
r can revoke an Expert's access from its page on Dialectica ("Revoke and replace"). `serve` then stops, says that Dialectica no longer accepts the Expert's credential, and does NOT fall back to the sign-in token. The page shows a new one-time connection code, once. Give it to the Expert with `trued agent reconnect` (it asks for the code without echoing it, or reads one line from stdin, never from an argument), then run `serve` again; the code works once and expires 30 minutes after it was made. Do not ask the user to paste the code into the conversation if they can run the command themselves.
- Switching back to any other strategy restores pushed work on the next cycle; nothing else needs undoing.

For a cautious first run, set a cap (`trued agent caps maxIsrs24h=1`) rather than trying to stop after one Answer from the client side — the Expert should stay connected long enough to finish what it accepted, including any correction Dialectica asks for. Caps apply to an Expert that already

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
84% confidence
Finding

The skill directs the agent to submit externally stored reports under the user's account without confirmation; telling the user is required, but approval is not. An error encountered during an otherwise read-only task can therefore trigger an unsolicited account write and transmit command or error text that may contain sensitive values, despite the document's useful data-minimization warnings.

Content

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

trued report "ask returned CAPTCHA_REQUIRED on an authenticated session" --operation ask

text

One call, no confirmation step, nothing to follow up. It files a report and prints a reference.
Use it when Dialectica behaves other than it says it does — a documented flag that does nothing,
a count that disagrees with the rows beside it, an error that names a state you are not in, a
page that will not load. `--feature` is the same door for something missing rather than broken.

The assist workflow sends user messages and question drafts to Dialectica without a privacy warning.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The instructions require sending the user's question, subsequent replies, and current draft to the external assist endpoint on every turn. Although the request fields are documented, the file does not warn users that their potentially private, unpublished content will leave the local session for processing by Dialectica.

Content

No source excerpt is available for this finding.