an atomdrift project
Hostile 100% github Download

fro-bot/agent

Legitimate AI agent evaluation harness

Paste-and-run destructive shell commandAArch64 (ARM64) architecture string

Evidence

Imports the Vitest test runner lines 5–15
5:53… t is constructed here.
6 */
7
8import type {GatewayLogger} from '../discord/client.js'
9import type {PermissionReply, PermissionRequest, SettlementReason} from './coordinator.js'
10
11import {describe, expect, it, vi} from 'vitest'
12
13import {createPermissionCoordinator, parsePermissionReply, parsePermissionRequest} from './coordinator.js'
14
15// ------------- …
Temp or Tmp path segment lines 26–34
26:15… 'ses_1',
27 permission: 'external_directory',
28 patterns: ['/tmp/x/*'],
29 title: 'Access outside workspace: /tmp/x/secret.txt',
30 ...overrides,
⋯4 lines
Calls an expect assertion matcher lines 36–65
36:17… --------------------------------------------------------------
37
38describe('parsePermissionRequest', () => {
39 it('parses a well-formed permission.asked payload', () => {
40 // #given a real-shaped properties payload (probe 4367)
41 const payload = {
⋯5 lines
47 }
48 // #when parsed
49 const result = parsePermissionRequest(payload)
50 // #then all fields map and the title is redaction-safe + descriptive
51 expect(result).not.toBeNull()
52 expect(result?.requestID).toBe('per_e871')
53 expect(result?.sessionID).toBe('ses_178e')
54 expect(result?.permission).toBe('external_directory')
55 expect(result?.patterns).toEqual(['/tmp/oc-iso-outside/*'])
56 expect(result?.title).toContain('/tmp/oc-iso-outside/secret.txt')
57 })
58
59 it('returns null when requestID (id) is missing', () => {
60 const result = parsePermissionRequest({sessionID: 'ses_1', permission: 'bash'})
61 expect(result).toBeNull()
62 })
63
64 it('returns null when sessionID is missing', () => {
65 const result = parsePermissionRequest({id: 'per_1', …
Run/paste the following `rm -rf` lines 80–99
⋯6 lines
86 sessionID: 'ses_1',
87 permission: 'bash',
88 metadata: {command: 'rm -rf /tmp/x'},
89 })
90 expect(result?.title).toBe('Run command: rm -rf /tmp/x')
91 })
92})
⋯7 lines
JavaScript references the passwd database path lines 204–209
204:16… : 'ses_1',
205 permission: 'bash',
206 metadata: {command: 'cat /etc/passwd', filepath: '/etc/passwd'},
207 }
208 const result = parsePermissionRequest(payload)
209 expect(result?.command).toBe('cat /etc …

Showing the top 5 files — 5 more files (152 regions) not shown.

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.