T09 · Insecure Skill Coding Practices
- Location
templates/validate.js:49- Finding
Systematic fail-open behavior bypasses CAPTCHA protection during validation failures
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent SmartCaptcha integration guide, but it includes unsafe default validation and runnable example patterns that could weaken protected forms if copied unchanged.
Review this skill before installing or using it for production. Treat the SmartCaptcha provider calls and secret handling as normal for this integration, but do not copy the validation helpers unchanged for login, registration, payment, password reset, or other abuse-sensitive flows: make failure policy explicit, prefer fail-closed for sensitive actions, escape or return JSON for user-submitted output, restrict WebView origins and navigation, pin dependencies, and require deliberate approval before cloud resource deletion or broad Terraform/API changes.
templates/validate.js:49Systematic fail-open behavior bypasses CAPTCHA protection during validation failures
examples/express-fullstack/server.js:84Reflected cross-site scripting in runnable Express and Flask examples
docs/mobile-android.md:45Android WebView JavaScript bridge is exposed without mandatory origin and navigation restrictions
examples/flask-fullstack/requirements.txt:2Dependency manifests permit installation of unaudited future package versions
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
Поле message — только для диагностики, не сравнивайте его в коде.
"""
try:
resp = requests.post(
"https://smartcaptcha.yandexcloud.net/validate",
data={
"secret": SMARTCAPTCHA_SERVER_KEY,
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
* Консоль: выбери капчу → меню **...** → **Удалить** → подтверди.
* CLI: `yc smartcaptcha captcha delete <имя_или_идентификатор_капчи>`.
* Terraform: удали блок `resource "yandex_smartcaptcha_captcha"` из конфигурации и выполни `terraform apply`.
* API: `DELETE /smartcaptcha/v1/captchas/{captchaId}` (метод `Captcha.Delete`).
## Роли доступа
The guidance says an empty host in /validate can be treated as trusted, even though the same section warns that disabling domain validation requires strict server-side host checks. If implementers follow this advice, attackers may be able to bypass origin validation during service failure or ambiguous conditions, allowing tokens from unexpected origins to be accepted.
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Страница с формой и автоматическим виджетом SmartCaptcha. Подробности: ../../../docs/widget-auto.md -->
<!DOCTYPE html>
<html lang="ru">
<head>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Cтpaницa c фopмoй и aвтoмaтичecким виджeтoм SmartCaptcha. Пoдpo6нocти: ../../../docs/widget-auto.md -->
<!DOCTYPE html>
<html lang="ru">
<head>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Шаблон Jinja2: форма с автоматическим виджетом SmartCaptcha. Подробности: ../../../docs/widget-auto.md -->
<!DOCTYPE html>
<html lang="ru">
<head>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Шa6лoн Jinja2: фopмa c aвтoмaтичecким виджeтoм SmartCaptcha. Пoдpo6нocти: ../../../docs/widget-auto.md -->
<!DOCTYPE html>
<html lang="ru">
<head>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SmartCaptcha: пример Flask</title>
<!-- captcha.js сам найдет все div с классом smart-captcha и отрисует в них виджет -->
<script src="https://smartcaptcha.yandexcloud.net/captcha.js" defer></script>
</head>
<body>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SmartCaptcha: пример Flask</title>
<!-- captcha.js сам найдет все div с классом smart-captcha и отрисует в них виджет -->
<script src="https://smartcaptcha.yandexcloud.net/captcha.js" defer></script>
</head>
<body>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SmartCaptcha: пpимep Flask</title>
<!-- captcha.js caм нaйдeт вce div c клaccoм smart-captcha и oтpиcyeт в ниx виджeт -->
<script src="https://smartcaptcha.yandexcloud.net/captcha.js" defer></script>
</head>
<body>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SmartCaptcha: пpимep Flask</title>
<!-- captcha.js caм нaйдeт вce div c клaccoм smart-captcha и oтpиcyeт в ниx виджeт -->
<script src="https://smartcaptcha.yandexcloud.net/captcha.js" defer></script>
</head>
<body>
This finding appears to involve visually confusable Cyrillic/Latin substitutions in comment text ('Пoдпиcкa...' instead of normal Russian spelling), which is a known obfuscation technique. Even though the payload here is not itself malicious, hidden or spoofed text in skill documentation can evade review, conceal instructions, or create ambiguity for downstream tooling and auditors.
<!-- Подписка на событие виджета; подробности — в ../docs/widget-advanced.md -->
<div id="container"></div>
<script src="https://smartcaptcha.yandexcloud.net/captcha.js?render=onload&onload=onloadFunction" async defer></script>
This finding appears to involve visually confusable Cyrillic/Latin substitutions in comment text ('Пoдпиcкa...' instead of normal Russian spelling), which is a known obfuscation technique. Even though the payload here is not itself malicious, hidden or spoofed text in skill documentation can evade review, conceal instructions, or create ambiguity for downstream tooling and auditors.
<!-- Пoдпиcкa нa co6ытиe виджeтa; пoдpo6нocти — в ../docs/widget-advanced.md -->
<div id="container"></div>
<script src="https://smartcaptcha.yandexcloud.net/captcha.js?render=onload&onload=onloadFunction" async defer></script>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Шаблон: страница с невидимой Yandex SmartCaptcha (invisible: true, execute() по submit формы). Подробности: docs/invisible-captcha.md -->
<!doctype html>
<html lang="ru">
<head>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Шa6лoн: cтpaницa c нeвидимoй Yandex SmartCaptcha (invisible: true, execute() пo submit фopмы). Пoдpo6нocти: docs/invisible-captcha.md -->
<!doctype html>
<html lang="ru">
<head>
This finding indicates a homoglyph/obfuscated variant of the same hidden comment, mixing Latin-looking and Cyrillic-looking characters. Even though the visible content appears harmless, such obfuscation can conceal instructions from reviewers and automated tools, which is especially sensitive in agent-skill content where hidden text may be used to manipulate downstream analysis or behavior.
<!-- Шаблон: расширенный метод подключения SmartCaptcha — отложенная загрузка скрипта,
window.smartCaptcha.render с callback, отправка токена на бэкенд fetch'ем.
Подробности: docs/widget-advanced.md -->
<!DOCTYPE html>
This finding indicates a homoglyph/obfuscated variant of the same hidden comment, mixing Latin-looking and Cyrillic-looking characters. Even though the visible content appears harmless, such obfuscation can conceal instructions from reviewers and automated tools, which is especially sensitive in agent-skill content where hidden text may be used to manipulate downstream analysis or behavior.
<!-- Шa6лoн: pacwиpeнный мeтoд пoдключeния SmartCaptcha — oтлoжeннaя зarpyзкa cкpиптa,
window.smartCaptcha.render c callback, oтпpaвкa тoкeнa нa 6экeнд fetch'eм.
Пoдpo6нocти: docs/widget-advanced.md -->
<!DOCTYPE html>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Шаблон: HTML-страница с формой входа и автоматическим виджетом Yandex SmartCaptcha. Подробности: docs/widget-auto.md -->
<!DOCTYPE html>
<html lang="ru">
<head>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<!-- Шa6лoн: HTML-cтpaницa c фopмoй вxoдa и aвтoмaтичecким виджeтoм Yandex SmartCaptcha. Пoдpo6нocти: docs/widget-auto.md -->
<!DOCTYPE html>
<html lang="ru">
<head>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Вход</title>
<!-- Скрипт виджета: после загрузки сам найдет все div с классом smart-captcha
и отрисует в них виджет. defer — чтобы не блокировать отрисовку страницы. -->
<script src="https://smartcaptcha.yandexcloud.net/captcha.js" defer></script>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bxoд</title>
<!-- Cкpипт виджeтa: пocлe зarpyзки caм нaйдeт вce div c клaccoм smart-captcha
и oтpиcyeт в ниx виджeт. defer — чтo6ы нe 6лoкиpoвaть oтpиcoвкy cтpaницы. -->
<script src="https://smartcaptcha.yandexcloud.net/captcha.js" defer></script>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<input id="userpass" type="password" name="password" required>
</p>
<!-- Контейнер виджета капчи.
ЗАМЕНИТЕ <ключ_клиента> на «Ключ клиента» со страницы капчи
в консоли Yandex Cloud (вкладка «Обзор»).
height: 100px задана заранее: при загрузке виджет меняет высоту
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<input id="userpass" type="password" name="password" required>
</p>
<!-- Koнтeйнep виджeтa кaпчи.
3AMEHИTE <ключ_клиeнтa> нa «Kлюч клиeнтa» co cтpaницы кaпчи
в кoнcoли Yandex Cloud (вклaдкa «O6зop»).
height: 100px зaдaнa зapaнee: пpи зarpyзкe виджeт мeняeт выcoтy
Suspicious Unicode normalization or mixed-script content
The skill clearly instructs use of environment secrets and outbound network access, but it declares no explicit tool/permission scope. In an agent platform, that can cause overbroad execution capability, making it easier for the skill to access secrets or call external endpoints without clear least-privilege boundaries.