Back to skill

Security audit

Ca Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is not malicious, but it needs review because it can read and change Tally accounting data and its endpoint and trigger safeguards are looser than the authority requires.

Install only if you intend to let the agent operate on your TallyPrime accounting data. Set TALLY_URL to a local loopback address such as localhost or 127.0.0.1, avoid remote HTTP endpoints, confirm the company/report/date range before exports, and require an explicit review of every voucher, master, or cancellation before it is sent.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:15
Finding

Unrestricted TALLY_URL Can Transmit Sensitive Accounting Data to an Attacker-Controlled Endpoint

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:15-29
Vulnerability Type: Unrestricted network destination for sensitive accounting operations
Risk Level: Medium

Vulnerable Code Snippet

yaml
requires:
  env:
    - TALLY_URL
metadata:
  openclaw:
    requiredEnv:
      - TALLY_URL
    bins:
      - curl
    primaryCredential: TALLY_URL
---

# TallyPrime (CA) Skill

Connect to a **locally running** TallyPrime instance via its **XML-over-HTTP** interface. All requests are HTTP POST to `$TALLY_URL` (commonly `http://localhost:9000`) with an XML body.

Technical Analysis

The Skill relies on the environment-controlled TALLY_URL as the destination for all TallyPrime XML-over-HTTP requests. Although the documentation describes the service as locally running and gives http://localhost:9000 as a common value, it does not require the hostname to resolve to a loopback address or otherwise validate the destination.

The templates can send company names, party names, GST identifiers, addresses, invoice numbers, ledger details, voucher amounts, and other confidential accounting data to this endpoint. They also support create, alter, and cancel operations. Consequently, an attacker who can influence the environment variable can redirect sensitive payloads and operational requests to an attacker-controlled Tally-compatible HTTP service.

Using plaintext HTTP is appropriate for a strictly local loopback connection, but it presents interception and integrity risks if TALLY_URL points to a remote host. The unrestricted destination therefore exceeds the minimum network scope implied by the Skill's declared local-only functionality.

Attack Path

  1. An attacker, compromised launcher, or unsafe deployment configuration sets TALLY_URL to an attacker-controlled HTTP endpoint.
  2. The user asks the agent to retrieve a financial report or post an accounting voucher.
  3. The agent follows the Skill instructions and sends an XML request to the con ...[truncated 1296 chars]
Remediation
View remediation

Remediation Suggestions

  1. Restrict the endpoint to loopback by default

    • Parse TALLY_URL before every request.
    • Permit only localhost, 127.0.0.0/8, or ::1 under the default local-only mode.
    • Resolve hostnames and verify that every resolved address is loopback to prevent DNS-based bypasses.
  2. Require explicit authorization for remote endpoints

    • If remote TallyPrime access is a supported use case, stop and show the resolved scheme, hostname, port, and IP address.
    • Require explicit user confirmation before transmitting accounting information to a non-loopback destination.
    • Do not treat the environment variable alone as sufficient authorization.
  3. Enforce transport security for remote use

    • Reject plaintext HTTP for non-loopback endpoints.
    • Require HTTPS with certificate verification.
    • Do not use options that disable TLS or hostname validation.
  4. Separate destination configuration from credentials

    • Do not classify TALLY_URL as a credential unless it actually contains secret material.
    • Prohibit embedded URL usernames, passwords, tokens, and query-string secrets.
    • Store authentication secrets in dedicated protected environment variables or a secret manager.
  5. Add destination visibility

    • Before read or write operations, report the sanitized destination to the user.
    • Redact credentials if legacy URLs containing user information must be handled.
    • Log the resolved destination and operation type without recording sensitive XML bodies.
  6. Preserve write-operation safeguards

    • Continue requiring explicit confirmation of the company and user intent before create, alter, or cancel operations.
    • Verify the response format and import statistics rather than trusting arbitrary success text from the endpoint.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · reference/errors.md (reported line 21)May include surrounding context.

md
| Connection refused / timeout | TallyPrime not running or wrong port | Open TallyPrime; confirm port; check `$TALLY_URL` |
| Response doesn’t contain “Server is Running” | Wrong URL or Tally integration not enabled | Verify TallyPrime is running and integration is enabled |
| XML parser throws `ParseError` / "no element found" | Export Data responses are XML fragments (no single root) — this is by design | Use Python regex instead of `xml.etree.ElementTree`; see parsing guide in `reference/reports.md` |
| `curl ... > file` produces truncated or empty file | Shell redirect can silently truncate in compound commands | Use `curl --output /tmp/file.xml` (the `-o` flag) |
| `Could not find Report 'X'` | Wrong `REPORTNAME` | Use report names in `reference/reports.md`; if still failing, verify in TallyPrime Developer |
| `Could not find Collection 'X'` | Collection not available | Use custom TDL pattern (see `reference/reports.md`) |
| `Ledger 'X' does not exist` | Missing ledger master | Create ledger first (see `reference/masters.md`) |

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · reference/vouchers.md (reported line 50)May include surrounding context.

When CLASSNAME is set, always include all four GST header fields. Missing any one of them will cause Tally to reject the voucher or save it with incorrect GST treatment.

xml
<CLASSNAME>Purchase @ 18 %</CLASSNAME>   <!-- exact name as configured in Tally -->
<CMPGSTIN>COMPANY_GSTIN</CMPGSTIN>
<PARTYGSTIN>PARTY_GSTIN</PARTYGSTIN>
<GSTREGISTRATIONTYPE>Regular</GSTREGISTRATIONTYPE>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · reference/vouchers.md (reported line 394)May include surrounding context.

md
</BILLALLOCATIONS.LIST>
            </LEDGERENTRIES.LIST>

            <!-- Purchase / expense ledger -->
            <LEDGERENTRIES.LIST>
              <LEDGERNAME>PURCHASE_LEDGER</LEDGERNAME>
              <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger guidance is broad enough to activate on many generic accounting or finance-related mentions, which can route users into a high-impact skill capable of reading reports and posting or altering vouchers. In this context, unintended activation is more dangerous than usual because the skill performs sensitive financial operations against a local Tally instance, so an over-broad trigger increases the chance of mistaken reads, write attempts, or confusing the agent into taking accounting actions in the wrong workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill metadata says it is for reading reports and posting/updating vouchers, but this file additionally provides full templates to create and alter masters such as groups and ledgers. That scope expansion enables persistent structural changes to accounting data, which can be abused to create fraudulent ledgers, reroute postings, or manipulate tax configuration in a way the user may not expect from the declared capability set.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The XML sets <LANGUAGEID>1033</LANGUAGEID>, which corresponds to an English locale, and similar hard-coded values recur elsewhere in the file. The skill does not offer a language choice or explain why English is required, so this is a natural-language locale policy issue under the stated rule.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file gives ready-to-use export templates for financial, inventory, ledger, receivables/payables, and GST reports, but does not warn that the returned XML/HTML can contain highly sensitive business and tax data. In the context of a local CA/accounting automation skill, this omission increases the chance that an agent will export, log, display, or persist confidential data without appropriate minimization or user confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The custom TDL template enumerates all companies configured in the local Tally environment, which can disclose the existence and names of multiple client entities in a CA setup. Without a warning or access-control guidance, an agent could use this broad discovery mechanism unnecessarily, exposing confidential client metadata even before accessing detailed books.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The cancellation template enables destructive accounting actions without explicitly requiring user confirmation, scope verification, or a warning that the operation voids an existing voucher. In a local accounting integration, an agent could cancel the wrong voucher due to prompt ambiguity, stale context, or user misunderstanding, causing data integrity and audit problems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.