Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This change updates the gRPC test agent to use regular expressions for parsing commands from the Eldritch tome. This allows for more complex and realistic testing scenarios, where a single task can trigger multiple actions on the agent. The test suite has been updated to verify this new functionality. A bug in the reverseShell handler that caused it to block indefinitely has also been fixed.


PR created automatically by Jules for task 15084810439855126938 started by @KCarretto

Updates the gRPC test agent to use regular expressions for parsing commands from the `Eldritch` tome.

This allows the agent to handle multiple commands within a single tome, and also supports commands with arguments.

The following commands are supported:
- `report.file("path")`
- `process.list()`
- `report.process_list()`
- `report.credential("principal", "secret")`
- `pivot.reverse_shell_pty()`
- `fetch.asset("name")`

The test suite has been updated to verify the new multi-command functionality. A bug in the `reverseShell` handler that caused it to block indefinitely has also been fixed.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Adds a new package `tavern/internal/testdata/agent` that simulates a gRPC agent.

The agent connects to the `tavern` server and periodically claims tasks. It implements mock handlers for all supported gRPC methods, including:
- `report.file`
- `report.process_list`
- `process.list`
- `report.credential`
- `pivot.reverse_shell_pty`
- `fetch.asset`
- `reportTaskOutput`

The agent's behavior is configurable with a functional options pattern, allowing for the setting of a callback interval, host identifier, error rate, and kill chance.

The mock data generated by the agent is humorous and D&D-themed.

A comprehensive test suite is included to verify the agent's behavior.
Adds a new package `tavern/internal/testdata/user` that simulates a user interacting with the GraphQL API.

The user periodically performs a weighted random action. The initial implementation includes the following actions:
- `createQuest`: Queries for available hosts, beacons, and tomes, and then creates a new quest with a random tome and beacon.

The user is configured with a functional options pattern, allowing for the setting of the GraphQL URL, action interval, and a map of action weights.

A test suite is included to verify the user's behavior.
@KCarretto KCarretto changed the title feat: use regex for task parsing Nov 16, 2025
@KCarretto
Copy link
Collaborator

Will come back to this after #977 is merged

@google-labs-jules
Copy link
Contributor Author

Will come back to this after #977 is merged

Acknowledged. I will await further instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants