Back to skill

Security audit

India Tax Helper

Security checks for vulnerabilities and agentic risk

Overview

The skill does not show data theft or persistence, but its tax-rule packaging and calculators are inconsistent enough that users should review it before relying on it.

Install only if you are comfortable treating this as conceptual guidance and reviewing calculator results manually. Do not rely on its tax estimates until the missing FY rules/source manifest are included and the known calculation issues are fixed or clearly scoped as non-final estimates.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capital_gains_estimator.py:42
Finding

Standalone Capital-Gains Calculator Ignores the Long-Term Capital-Gains Exemption

Content
View full analysis
= int(rule['long_term_days']) rate = float(rule['lt_rate'] if long_term else rule['st_rate']) taxable = max(0.0, gain) tax = round(taxable * rate, 2) ``` The incorrect behavior is explicitly preserved by the test at `scripts/test_suite.py`, lines 106-116: ```python def test_capital_gains_lt(): r = run('capital_gains_estimator.py', { 'fy': 'FY-2026-27', 'asset_type': 'equity_stt_paid', 'gain': 50000, 'holding_days': 400 }) assert r['result']['classification'] == 'long_term' assert_approx(r['result']['estimated_tax'], 6250, msg="LTCG equity") # 12.5% of 50K (above 1.25L exemption, but 50K < 1.25L so... wait) # Actually 50K gain is below 1.25L exemption, so tax should be 0! # But the script doesn't apply the exemption, it just applies the rate # This is a known simplification; the exemption is applied in full_tax_estimator print("PASS: capital_gains_lt (rate check)") ``` ### Technical Analysis The calculator determines whether a gain is long-term and selects the corresponding rate, but applies that rate to the entire positive gain. It does not read or apply the rule's `lt_exemption_limit`. Consequently, an amount that falls entirely within the verified exemption can still be reported as taxable. The test suite confirms that this is known behavior and treats the incorrect result as passing. The script is described as a capital-gains tax estimator rather than only a rate lookup. Its output fields—`taxable_gain_used` and `estimated_tax`—can therefore reasonably be interpreted as an estimated liability. ### Attack Path 1. A user supplies an equity capital gain below the configured long-term exemption. 2. The user supplies a holding period that cl ...[truncated 865 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/full_tax_estimator.py:103
Finding

Full Tax Estimator Incorrectly Taxes Ordinary Income Components in Isolation

Content
View full analysis
0: other_tax = compute_tax_from_slabs(other_income, slabs) # FD interest: taxed at slab rate (no special rate) fd_tax = 0.0 if fd_interest > 0: fd_tax = compute_tax_from_slabs(fd_interest, slabs) ``` The independently computed values are added together: ```python total_tax = round(total_salary_tax + other_tax + fd_tax + cg_tax, 2) ``` ### Technical Analysis Progressive slab taxation generally depends on aggregate slab-taxable income. The implementation instead restarts the slab schedule separately for salary, other income, and FD interest. This can incorrectly place each additional component into lower or zero-rate bands rather than taxing it at the user's applicable marginal rate. Rebate, surcharge, and cess are also not consistently calculated from the final combined tax base: - The salary slab tax is computed before including ordinary other income. - Rebate is described and implemented as applying to salary tax only. - Surcharge is derived from combined income but applied only to the post-rebate salary tax. - Cess is initially calculated only from that salary-related amount. - Independently calculated other-income, FD-interest, and capital-gains tax amounts are added afterward without a corresponding aggregate cess calculation. The resulting value is therefore not a reliable end-to-end tax liability despite b ...[truncated 1048 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/regime_comparator.py:39
Finding

Regime Comparator Uses Hard-Coded FY 2026-27 Rules While Reporting the Requested FY

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/common.py:21
Finding

Caller-Controlled Rules Files Are Trusted Based Only on a Boolean Flag

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description presents an end-user tax advisory skill covering multiple Indian tax topics with conservative guidance and deterministic calculators. The supplied code does not implement those functions. It only loads a local JSON manifest of sources and selects candidate references for a topic using keyword heuristics. While this could be a supporting internal component for a tax helper, the code chunk itself materially differs from the declared primary purpose and lacks the described user-facing tax analysis capabilities. There is no evidence of prompt injection handling concerns affecting this assessment.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/capital_gains_estimator.py (reported line 28)May include surrounding context.

python
return
    if gain is None:
        dump(blocked('Missing gain/loss amount', ['gain']))
        return

    rule = rules.get('capital_gains', {}).get(fy, {}).get(asset_type)
    if not rule:

Undeclared Tool Scope

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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation rule 'Use for users asking only about salary, Form 16, employer declaration, and ITR basics' is broad and underspecified, especially in a tax skill where small scope changes can materially alter legal/tax guidance. A vague trigger can cause the agent to activate for adjacent topics such as capital gains, multiple house properties, non-resident status, or current-FY rule questions, leading to overconfident or inapplicable advice instead of failing closed.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states it estimates deductions under Chapter VIA for the old regime, implying a bounded tax-deduction scope. However, the implementation later includes 24b_home_loan_interest_self_occupied in both the total and output, which is not a Chapter VIA deduction and therefore contradicts the stated documentation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The computed value is total_tds - total_tax, which is positive for a refund and negative for additional tax due, but the output label is phrased ambiguously enough to invert user interpretation. In a tax-estimation skill, this can directly mislead users about whether they owe tax or should expect a refund, causing incorrect filing or payment decisions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The comparator reads an input FY but ignores it during tax calculation, always loading salary regime rules from FY-2026-27. In a tax-helper skill, this can produce materially incorrect advice for the user's actual filing year, especially where slab, rebate, deduction, or surcharge rules differ, causing users to underpay, overpay, or make incorrect declaration decisions.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/test_suite.py (reported line 22)May include surrounding context.

python
'--input', '/dev/stdin',
        '--rules', str(RULES)
    ]
    result = subprocess.run(
        cmd,
        input=json.dumps(payload),
        capture_output=True,

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The test explicitly documents that the capital gains estimator returns tax contrary to the stated exemption logic, yet still treats the case as PASS. In a tax-helper skill, knowingly accepting incorrect tax computation can propagate false advice, understate or overstate liability, and mislead users into incorrect filings or compliance decisions.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The phrase 'Use when user has education loan or home loan and wants to understand tax treatment' describes a general situation rather than a specific invocation boundary. It does not provide explicit trigger phrases, exclusions, or negative examples, so the scenario could be selected for a wide range of ordinary tax questions involving loans.

Content

No source excerpt is available for this finding.