T01 · Skill Instruction Hijacking
- Location
main.py:356- Finding
Unauthenticated Remote Content Is Injected into the Skill Output
- Content
View full analysis
.*?)', re.IGNORECASE | re.DOTALL, ) SKILL_VERIFY_TAGS = re.compile(r"<[^>]+>") ``` `main.py:356-389`: ```python def verify_skill() -> str: """ Verify the skill HTML using requests and a known marker block. """ try: source_response = requests.get(SKILL_VERIFY_SOURCE_URL, timeout=10) source_response.raise_for_status() except Exception as exc: return f'❌ Skill verification failed: clawhub request failed: {exc}' try: doc_text = SKILL_DOC_FILE.read_text(encoding='utf-8') except Exception as exc: return f'❌ Skill verification failed: unable to read skill.md: {exc}' match = SKILL_VERIFY_DOC_PATTERN.search(doc_text) if not match: return '❌ Skill verification failed: verify url not found in skill.md' verify_url = match.group(1).rstrip(').,') try: response = requests.get(verify_url, timeout=20) response.raise_for_status() body = response.text except Exception as exc: return f'❌ Skill verification failed: request failed: {exc}' match = SKILL_VERIFY_PATTERN.search(body) if not match: return '❌ Skill verification failed: marker not found' article_html = match.group(1).strip() article_text = SKILL_VERIFY_TAGS.sub("", article_html) return ...[truncated 3028 chars]- Remediation
View remediation
