|
| 1 | +task_id: skill-audit-login-history-e2e |
| 2 | +description: > |
| 3 | + End-to-end test: agent runs Investigation 2 from |
| 4 | + audit-workflow-guide.md ("login history for user X, failed attempts |
| 5 | + only"). Sequence is: list `sources` to find the User Login type GUID |
| 6 | + (Identity → Authentication → User Login), then query `events` with |
| 7 | + `--user-id`, `--type`, and `--status Failure` inside a bounded |
| 8 | + window. Validates the agent uses server-side filters instead of |
| 9 | + pulling everything and post-filtering. |
| 10 | +
|
| 11 | + Command-construction only — no live tenant available for |
| 12 | + side-effect verification. |
| 13 | +tags: [uipath-audit, e2e, investigation, login-history] |
| 14 | +max_iterations: 2 |
| 15 | + |
| 16 | +agent: |
| 17 | + type: claude-code |
| 18 | + permission_mode: acceptEdits |
| 19 | + max_turns: 40 |
| 20 | + turn_timeout: 600 |
| 21 | + allowed_tools: ["Skill", "Bash", "Read", "Write", "Edit", "Glob", "Grep"] |
| 22 | + |
| 23 | +sandbox: |
| 24 | + driver: tempdir |
| 25 | + python: {} |
| 26 | + |
| 27 | +initial_prompt: | |
| 28 | + Show me failed login attempts for jane.doe@example.com on the |
| 29 | + active tenant during April 2026. Use the uipath-audit skill |
| 30 | + end-to-end. |
| 31 | +
|
| 32 | + Save a summary to report.json with at minimum: |
| 33 | + { |
| 34 | + "sources_command": "<uip admin audit tenant sources ... command>", |
| 35 | + "events_command": "<uip admin audit tenant events ... command>", |
| 36 | + "user_filter": "<the --user-id value or the --search term you used to resolve them>", |
| 37 | + "type_filter": "<the --type value you used to scope to User Login>", |
| 38 | + "status": "<the --status value, expected: Failure>", |
| 39 | + "from": "<the --from-date value>", |
| 40 | + "to": "<the --to-date value>", |
| 41 | + "commands_used": ["<every uip command you attempted>"] |
| 42 | + } |
| 43 | +
|
| 44 | + Important: |
| 45 | + - The `uip` CLI is available but the `admin` subcommand may not be |
| 46 | + installed and/or the CLI is not connected to a live tenant. |
| 47 | + Commands WILL fail — that is expected and acceptable. |
| 48 | + Run each command exactly once regardless of errors. |
| 49 | + Do NOT retry, do NOT attempt to login, do NOT try to install tools, |
| 50 | + do NOT troubleshoot errors. |
| 51 | + - Use --output json on every uip admin audit command. |
| 52 | + - The skill teaches that login filtering is done server-side via |
| 53 | + --user-id / --type / --status — do NOT pull everything and |
| 54 | + post-filter on the client. |
| 55 | + - Do NOT prompt the user for confirmation — this is an automated test. |
| 56 | +
|
| 57 | +success_criteria: |
| 58 | + - type: command_executed |
| 59 | + description: "Agent invoked `uip admin audit tenant sources` to discover the User Login type GUID" |
| 60 | + tool_name: "Bash" |
| 61 | + command_pattern: 'uip\s+admin\s+audit\s+tenant\s+sources\b.*--output\s+json' |
| 62 | + min_count: 1 |
| 63 | + weight: 2.0 |
| 64 | + pass_threshold: 1.0 |
| 65 | + |
| 66 | + - type: command_executed |
| 67 | + description: "Agent invoked `uip admin audit tenant events` with --status Failure" |
| 68 | + tool_name: "Bash" |
| 69 | + command_pattern: 'uip\s+admin\s+audit\s+tenant\s+events\b.*--status\s+(?i:Failure|1)' |
| 70 | + min_count: 1 |
| 71 | + weight: 2.5 |
| 72 | + pass_threshold: 1.0 |
| 73 | + |
| 74 | + - type: command_executed |
| 75 | + description: "Agent passed --user-id (or --search to resolve the user) on the events call" |
| 76 | + tool_name: "Bash" |
| 77 | + command_pattern: 'uip\s+admin\s+audit\s+tenant\s+events\b.*(?:--user-id\s+\S+|--search\s+\S+)' |
| 78 | + min_count: 1 |
| 79 | + weight: 2.0 |
| 80 | + pass_threshold: 1.0 |
| 81 | + |
| 82 | + - type: command_executed |
| 83 | + description: "Agent kept a bounded time window via --from-date/--to-date covering April 2026" |
| 84 | + tool_name: "Bash" |
| 85 | + command_pattern: 'uip\s+admin\s+audit\s+tenant\s+events\b.*--from-date\s+2026-04.*--to-date\s+2026-0[45]' |
| 86 | + min_count: 1 |
| 87 | + weight: 1.5 |
| 88 | + pass_threshold: 1.0 |
| 89 | + |
| 90 | + - type: file_exists |
| 91 | + description: "report.json was created" |
| 92 | + path: "report.json" |
| 93 | + weight: 1.0 |
| 94 | + pass_threshold: 1.0 |
| 95 | + |
| 96 | + - type: file_contains |
| 97 | + description: "report.json references sources discovery and the events filter chain" |
| 98 | + path: "report.json" |
| 99 | + includes: |
| 100 | + - "uip admin audit tenant sources" |
| 101 | + - "uip admin audit tenant events" |
| 102 | + - "--status" |
| 103 | + excludes: |
| 104 | + - "--before " |
| 105 | + - "--after " |
| 106 | + - "--before-id" |
| 107 | + - "--after-id" |
| 108 | + weight: 1.5 |
| 109 | + pass_threshold: 1.0 |
| 110 | + |
| 111 | + - type: json_check |
| 112 | + description: "report.json captures the user filter, type filter, and Failure status" |
| 113 | + path: "report.json" |
| 114 | + assertions: |
| 115 | + - expression: "length(user_filter)" |
| 116 | + operator: gte |
| 117 | + expected: 1 |
| 118 | + - expression: "status" |
| 119 | + operator: contains |
| 120 | + expected: "ailure" |
| 121 | + - expression: "length(commands_used)" |
| 122 | + operator: gte |
| 123 | + expected: 2 |
| 124 | + weight: 1.5 |
| 125 | + pass_threshold: 0.75 |
0 commit comments