T01 · Skill Instruction Hijacking
- Location
scripts/advisor.py:487- Finding
Indirect Prompt Injection Through Synchronized Task and OKR Content
- Content
View full analysis
dict: """Parse Markdown content and sync OKR items to the local database. Parsing rules: - ``## ...`` (level‑2 heading) → Objective - ``### ...`` (level‑3 heading) → Key Result (child of most recent Objective) - ``#### ...`` (level‑4 heading) → Initiative (child of most recent KR) - ``进度: XX%`` or ``progress: XX%`` → progress value on the current item Existing items are matched by *(title, parent_id)* within the same *doc_token*. Items in the database for this *doc_token* that do NOT appear in the new content are marked ``completed``. Args: doc_token: The Feishu document token (stored in source_doc_token). doc_content: Markdown string to parse. Returns: A dict with keys ``added``, ``updated``, ``removed`` (counts). """ parsed_items = self._parse_markdown_okr(doc_content) ``` Stored task and OKR fields are subsequently interpolated directly into a prompt-like context intended for an upstream LLM: ```python def get_context_for_llm(self) -> str: """Aggregate all analysis results into a structured text for an LLM. The upstream Hermes Agent (pro model) uses this context to generate natural-language advice and scheduling recommendations. """ workload = self.analyze_workload() delegation = self.suggest_delegation() okr_health = self.okr_health_check() parts: list[str] = [] parts.append("=" * 60) parts.append("PERSONAL ASSISTANT — WORKLOAD CONTEXT") parts.append(f"Generated: {datetime.now().isoformat()}") parts.appen ...[truncated 3545 chars]- Remediation
View remediation
