Back to skill

Security audit

sber-business

Security checks for vulnerabilities and agentic risk

Overview

This banking integration needs review because its credential handling and privacy controls fall short of its advertised protections.

Wait for fixes before connecting live banking credentials. Request protected credential transport, enforced memory-only temporary storage, validated download destinations, and reliable alert state handling. Use restricted notification recipients; masking does not protect custom webhook payloads. Preserve certificate recovery copies and do not rely on the claimed hardware or backup protection.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (33)

Tainted flow: 'cmd_cert' from input (line 258, user input) → subprocess.run (code execution)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

External input (network, user) flows to a code execution sink. This enables remote code execution or command injection.

Content

Scanner excerpt · scripts/sber_vault.py (reported line 262)May include surrounding context.

python
"openssl", "pkcs12", "-in", str(p12_path), "-clcerts", "-nokeys",
            "-out", str(cert_tmp), "-passin", "stdin"
        ]
        res = subprocess.run(cmd_cert, input=p12_password.encode("utf-8"), capture_output=True)
        if res.returncode != 0:
            print(f"❌ Неверный пароль от .p12 или повреждённый файл: {res.stderr.decode()}", file=sys.stderr)
            sys.exit(1)

Tainted flow: 'cmd_key' from input (line 268, user input) → subprocess.run (code execution)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

External input (network, user) flows to a code execution sink. This enables remote code execution or command injection.

Content

Scanner excerpt · scripts/sber_vault.py (reported line 272)May include surrounding context.

python
"openssl", "pkcs12", "-in", str(p12_path), "-nocerts", "-nodes",
            "-out", str(key_tmp), "-passin", "stdin"
        ]
        res = subprocess.run(cmd_key, input=p12_password.encode("utf-8"), capture_output=True)
        if res.returncode != 0:
            print(f"❌ Ошибка извлечения закрытого ключа: {res.stderr.decode()}", file=sys.stderr)
            sys.exit(1)

Code capability 'network' detected in scripts/poller.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'shell' detected in scripts/poller.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

TLS secrets can be written to disk despite the documented RAM-only guarantee.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

When /dev/shm is absent, the code silently writes the decrypted banking private key and certificates into the ordinary temporary directory, contradicting its RAM-only guarantee. Directory permissions restrict ordinary local users, but disk persistence, snapshots, backups, and forensic recovery can still expose the private key; the setup flow uses the same fallback.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/sber_vault.py (reported line 183)May include surrounding context.

python
def pack_profile_from_disk(profile: str, env_path: Path, cert_dir: Path, account: str = "", inn: str = "", org_name: str = "") -> None:
    """Упаковывает существующие открытые файлы .env и .pem в зашифрованный .vault."""
    if not env_path.exists():
        raise FileNotFoundError(f"Файл окружения {env_path} не найден")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/sber_vault.py (reported line 348)May include surrounding context.

python
parser = argparse.ArgumentParser(description="SberBank Zero-Knowledge Vault Management")
    sub = parser.add_subparsers(dest="cmd")

    pack_p = sub.add_parser("pack", help="Упаковать существующие .env и .pem в .vault")
    pack_p.add_argument("--profile", default="default", help="Имя профиля (по умолчанию default)")
    pack_p.add_argument("--env", default=None, help="Путь к .env файлу с токенами")
    pack_p.add_argument("--cert-dir", default=None, help="Путь к папке с client_cert.pem, client_key.pem, trust_bundle.pem")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/sber_vault.py (reported line 350)May include surrounding context.

python
pack_p = sub.add_parser("pack", help="Упаковать существующие .env и .pem в .vault")
    pack_p.add_argument("--profile", default="default", help="Имя профиля (по умолчанию default)")
    pack_p.add_argument("--env", default=None, help="Путь к .env файлу с токенами")
    pack_p.add_argument("--cert-dir", default=None, help="Путь к папке с client_cert.pem, client_key.pem, trust_bundle.pem")
    pack_p.add_argument("--account", default="", help="Номер расчётного счёта")
    pack_p.add_argument("--inn", default="", help="ИНН организации/ИП")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/sber_vault.py (reported line 187)May include surrounding context.

python
if not env_path.exists():
        raise FileNotFoundError(f"Файл окружения {env_path} не найден")

    # Читаем .env
    env_vars = {}
    with open(env_path, encoding="utf-8") as fh:
        for line in fh:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/sber_vault.py (reported line 364)May include surrounding context.

python
args = parser.parse_args()
    if args.cmd == "pack":
        env_file = Path(args.env) if args.env else SECRETS_DIR / f"sber_{args.profile}.env"
        cert_dir = Path(args.cert_dir) if args.cert_dir else SECRETS_DIR / f"sber_{args.profile}"
        if not cert_dir.exists() and (SECRETS_DIR / "sber").exists():
            cert_dir = SECRETS_DIR / "sber"

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Financial notifications are configured for external messaging services without a privacy warning.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

This standalone setup guide enables transmission of transaction amounts and balances to third-party services without explaining confidentiality risks or requiring a restricted recipient. SKILL.md provides a warning, which mitigates the overall risk, but users following this reference directly can configure sensitive banking disclosures without seeing it.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/NOTIFICATION_CHANNELS.md (reported line 90)May include surrounding context.

md
"channel": "webhook",
    "webhook": {
      "enabled": true,
      "url": "https://api.mycompany.ru/webhooks/sber",
      "secretHeader": "X-Auth-Token",
      "secretValue": "YOUR_SECRET_TOKEN"
    }

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/config.example.json (reported line 30)May include surrounding context.

json
},
  "webhook": {
    "enabled": false,
    "url": "https://api.mycompany.ru/webhooks/sber",
    "secretHeader": "X-Auth-Token",
    "secretValue": "YOUR_SECRET_TOKEN"
  }

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/poller.py (reported line 119)May include surrounding context.

python
import urllib.request
    if not token or not chat_id:
        return False
    url = f"https://api.telegram.org/bot{token}/sendMessage"
    payload = json.dumps({"chat_id": chat_id, "text": text, "parse_mode": "HTML"}, ensure_ascii=False).encode("utf-8")
    req = urllib.request.Request(url, data=payload, method="POST", headers={"Content-Type": "application/json"})
    try:

The documented logging-only --dry mode persists notification state and consumes transactions.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Dry mode skips delivery but still adds transactions to the seen set, advances last_modify, and saves the shared production state. A diagnostic run can therefore suppress subsequent real banking alerts, reducing visibility into potentially unauthorized transactions.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

Although the argument-list invocation avoids shell injection, callers place the Bearer token in curl's -H command-line argument. Users or monitoring tools with access to process arguments can capture a live banking access token, undermining the vault's protection while requests execute.

Content

Scanner excerpt · scripts/sber_api.py (reported line 119)May include surrounding context.

python
cmd += ["-H", f"{k}: {v}"]
            cmd.append(url)

            out = subprocess.run(cmd, capture_output=True, timeout=timeout + 10)
            raw = out.stdout
            body, _, code = raw.rpartition(b"\n")
            try:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

Token refresh places client_secret and refresh_token directly in curl's --data-urlencode command-line arguments. These values can be exposed through process inspection or execution telemetry despite being encrypted at rest; shell=False does not prevent this credential leak.

Content

Scanner excerpt · scripts/sber_api.py (reported line 141)May include surrounding context.

python
]
            for k, v in fields.items():
                cmd += ["--data-urlencode", f"{k}={v}"]
            out = subprocess.run(cmd, capture_output=True, timeout=timeout + 10)
            raw = out.stdout
            body, _, code = raw.rpartition(b"\n")
            try:

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The subprocess uses an argument list without a shell, so this is not shell-command injection. However, it places the banking access token in process arguments, potentially exposing it to process inspection or execution telemetry; additionally, the missing header flag makes curl interpret the authorization string as another URL instead of an HTTP header.

Content

Scanner excerpt · scripts/sber_download.py (reported line 45)May include surrounding context.

python
url,
            "Authorization: Bearer " + api.access_token,
        ]
        return subprocess.run(cmd, capture_output=True, text=True)

    res = api._execute_with_tls(_run)
    if res.returncode != 0:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

Polling repeatedly launches curl with the banking access token embedded in its process arguments, creating opportunities for disclosure through process inspection or execution telemetry. Although the argument-list invocation avoids shell injection, the authorization string also lacks the required header flag and is treated as an additional URL.

Content

Scanner excerpt · scripts/sber_download.py (reported line 74)May include surrounding context.

python
url,
                "Authorization: Bearer " + api.access_token,
            ]
            return subprocess.run(cmd, capture_output=True, text=True)

        res = api._execute_with_tls(_run)
        if res.returncode == 0:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The download URL comes from the task response and reaches curl without scheme, host, port, or option validation, allowing an attacker who influences that response to trigger unintended network requests, local-file retrieval, or curl-option interpretation. The request also uses the banking client certificate without restricting its destination, and the access token is exposed in process arguments rather than supplied correctly as a header.

Content

Scanner excerpt · scripts/sber_download.py (reported line 105)May include surrounding context.

python
download_url,
            "Authorization: Bearer " + api.access_token,
        ]
        return subprocess.run(cmd, capture_output=True)

    res = api._execute_with_tls(_run)
    if res.returncode != 0 or not res.stdout.startswith(b"PK\x03\x04"):