T01 · Skill Instruction Hijacking
- Location
curriculum.py:145- Finding
Untrusted User Intent Is Converted into Instructions for an Autonomous Agent
- Content
View full analysis
Curriculum: """Use the LLM to generate a training curriculum from a user intent string.""" prompt = CURRICULUM_DESIGN_PROMPT.format( stage_min=config.STAGE_COUNT_MIN, stage_max=config.STAGE_COUNT_MAX, tasks_min=config.TASKS_PER_STAGE_MIN, tasks_max=config.TASKS_PER_STAGE_MAX, ) conv = Conversation(system_prompt=prompt) conv.add( "user", f"Please design a training curriculum for the following requirement:\n\n" f"{user_intent}", ) logger.info("Generating training curriculum...") data = await llm.chat_json(conv, temperature=config.CURRICULUM_TEMPERATURE) return Curriculum.from_dict(data) ``` ```python if attempt == 1: instruction = ( f"Present the following training task to the Claw agent. " f"Craft a clear, well-structured message that the agent " f"will receive directly.\n\n" f"Task ID: {task.task_id}\n" f"Description: {task.description}\n" f"Scenario:\n{task.scenario}\n" f"Expected behavior: {task.expected_behavior}" ) else: instruction = ( f"The agent's previous response did not fully meet the " f"standards. Here is the evaluation:\n\n" f"Score: {result.score}/10\n" f"Weaknesses: {', '.join(result.weaknesses)}\n" f"Feedback: {result.feedback}\n" f"Suggestion: {result.suggestion}\n\n" f"Generate a follow-up message to help the agent improve. " f"You may rephrase the task, provide hints, or break it " f"into smaller steps — whatever you think will be most " f"effective as a trainer." ) trainer_msg ...[truncated 2436 chars]- Remediation
View remediation
