pwn 0.5.706 → 0.5.708
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/documentation/Reinforcement-Learning.md +2 -2
- data/documentation/Reporting.md +1 -0
- data/etc/default_skills/pwn/ai/agent/curriculum/SKILL.md +1 -0
- data/etc/default_skills/pwn/ai/agent/metrics/SKILL.md +4 -0
- data/etc/default_skills/pwn/ai/agent/policy/SKILL.md +1 -1
- data/etc/default_skills/pwn/ai/agent/reward/SKILL.md +2 -0
- data/etc/default_skills/pwn/ai/agent/tool_guard/SKILL.md +2 -0
- data/etc/default_skills/pwn/reports/SKILL.md +4 -2
- data/etc/default_skills/pwn/reports/csv/SKILL.md +47 -0
- data/etc/default_skills/pwn/reports/html/SKILL.md +47 -0
- data/etc/default_skills/pwn/reports/json/SKILL.md +47 -0
- data/etc/default_skills/pwn/reports/markdown/SKILL.md +47 -0
- data/etc/default_skills/pwn/reports/pdf/SKILL.md +47 -0
- data/etc/default_skills/pwn/reports/xml/SKILL.md +47 -0
- data/lib/pwn/ai/agent/curriculum.rb +73 -27
- data/lib/pwn/ai/agent/dispatch.rb +7 -0
- data/lib/pwn/ai/agent/learning.rb +22 -14
- data/lib/pwn/ai/agent/loop.rb +112 -45
- data/lib/pwn/ai/agent/metrics.rb +68 -1
- data/lib/pwn/ai/agent/mistakes.rb +11 -3
- data/lib/pwn/ai/agent/policy.rb +62 -33
- data/lib/pwn/ai/agent/prompt_builder.rb +17 -5
- data/lib/pwn/ai/agent/reward.rb +36 -29
- data/lib/pwn/ai/agent/tool_guard.rb +19 -0
- data/lib/pwn/ai/agent/turn_finalizer.rb +0 -1
- data/lib/pwn/config.rb +7 -6
- data/lib/pwn/reports/ai_red_team.rb +1 -1
- data/lib/pwn/reports/csv.rb +38 -0
- data/lib/pwn/reports/fuzz.rb +1 -1
- data/lib/pwn/reports/html.rb +58 -0
- data/lib/pwn/reports/json.rb +32 -0
- data/lib/pwn/reports/markdown.rb +40 -0
- data/lib/pwn/reports/pdf.rb +93 -0
- data/lib/pwn/reports/phone.rb +1 -1
- data/lib/pwn/reports/sast.rb +1 -1
- data/lib/pwn/reports/uri_buster.rb +1 -1
- data/lib/pwn/reports/xml.rb +44 -0
- data/lib/pwn/reports.rb +54 -6
- data/lib/pwn/version.rb +1 -1
- data/spec/integration/prompt_builder_spec.rb +1 -1
- data/spec/integration/reinforced_feedback_loop_spec.rb +27 -12
- data/spec/lib/pwn/ai/agent/injection_guard_spec.rb +65 -0
- data/spec/lib/pwn/ai/agent/loop_spec.rb +61 -12
- data/spec/lib/pwn/ai/agent/metrics_spec.rb +15 -0
- data/spec/lib/pwn/ai/agent/mistakes_spec.rb +5 -2
- data/spec/lib/pwn/ai/agent/policy_spec.rb +45 -4
- data/spec/lib/pwn/ai/agent/reward_spec.rb +72 -0
- data/spec/lib/pwn/ai/agent/scoreboard_roadmap_spec.rb +61 -0
- data/spec/lib/pwn/reports/csv_spec.rb +19 -0
- data/spec/lib/pwn/reports/formats_spec.rb +90 -0
- data/spec/lib/pwn/reports/html_spec.rb +19 -0
- data/spec/lib/pwn/reports/json_spec.rb +19 -0
- data/spec/lib/pwn/reports/markdown_spec.rb +19 -0
- data/spec/lib/pwn/reports/pdf_spec.rb +19 -0
- data/spec/lib/pwn/reports/xml_spec.rb +19 -0
- data/third_party/pwn_rdoc.jsonl +45 -2
- metadata +24 -3
|
@@ -131,13 +131,24 @@ describe PWN::AI::Agent::Policy do
|
|
|
131
131
|
grind = described_class.observe_step(
|
|
132
132
|
action: 'shell', ok: true, session_id: 'en_credit', ts_state: ts
|
|
133
133
|
)
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
poc = "/tmp/pwn-policy-#{Process.pid}.poc"
|
|
135
|
+
File.write(poc, 'poc')
|
|
136
|
+
Thread.current[:pwn_loop_deliverables] = {
|
|
137
|
+
paths: [],
|
|
138
|
+
min_seconds: 0,
|
|
139
|
+
skills: [],
|
|
140
|
+
proofs: [poc],
|
|
141
|
+
hosts: [],
|
|
142
|
+
techniques: []
|
|
143
|
+
}
|
|
136
144
|
advance = described_class.observe_step(
|
|
137
145
|
action: 'shell', ok: true, session_id: 'en_credit', ts_state: ts
|
|
138
146
|
)
|
|
139
|
-
expect(advance[:reward].to_f).to
|
|
147
|
+
expect(advance[:reward].to_f).to eq(0.0)
|
|
148
|
+
expect(grind[:reward].to_f).to eq(0.0)
|
|
140
149
|
ensure
|
|
150
|
+
FileUtils.rm_f(poc) if defined?(poc)
|
|
151
|
+
Thread.current[:pwn_loop_deliverables] = nil
|
|
141
152
|
described_class.reset
|
|
142
153
|
FileUtils.remove_entry(tmp) if tmp && Dir.exist?(tmp)
|
|
143
154
|
end
|
|
@@ -214,7 +225,7 @@ describe PWN::AI::Agent::Policy do
|
|
|
214
225
|
FileUtils.remove_entry(tmp) if tmp && Dir.exist?(tmp)
|
|
215
226
|
end
|
|
216
227
|
|
|
217
|
-
describe '
|
|
228
|
+
describe 'episode handoff' do
|
|
218
229
|
it 'detach_episode! snapshots and clears current_episode' do
|
|
219
230
|
tmp = Dir.mktmpdir
|
|
220
231
|
stub_const('PWN::AI::Agent::Policy::POLICY_FILE', File.join(tmp, 'policy.json'))
|
|
@@ -233,6 +244,36 @@ describe PWN::AI::Agent::Policy do
|
|
|
233
244
|
expect(described_class.current_episode[:session_id]).to eq('detach1')
|
|
234
245
|
ensure
|
|
235
246
|
described_class.attach_episode!(episode: nil)
|
|
247
|
+
described_class.reset
|
|
248
|
+
FileUtils.remove_entry(tmp) if tmp && Dir.exist?(tmp)
|
|
236
249
|
end
|
|
237
250
|
end
|
|
251
|
+
|
|
252
|
+
it 'observe_step does not pay per successful tool call' do
|
|
253
|
+
tmp = Dir.mktmpdir
|
|
254
|
+
stub_const('PWN::AI::Agent::Policy::POLICY_FILE', File.join(tmp, 'policy.json'))
|
|
255
|
+
stub_const('PWN::AI::Agent::Policy::TRAJECTORY_FILE', File.join(tmp, 'policy_traj.jsonl'))
|
|
256
|
+
described_class.reset
|
|
257
|
+
allow(described_class).to receive(:enabled?).and_return(true)
|
|
258
|
+
PWN::Env[:ai] ||= {}
|
|
259
|
+
PWN::Env[:ai][:agent] ||= {}
|
|
260
|
+
PWN::Env[:ai][:agent][:policy] = true
|
|
261
|
+
described_class.begin_episode(session_id: 'p0_step', request: 'scan', kind: :autonomous_goal, engine: :grok)
|
|
262
|
+
first = described_class.observe_step(action: 'shell', ok: true, session_id: 'p0_step')
|
|
263
|
+
expect(first[:reward].to_f).to eq(0.0)
|
|
264
|
+
8.times { described_class.observe_step(action: 'shell', ok: true, session_id: 'p0_step') }
|
|
265
|
+
extra = described_class.observe_step(action: 'shell', ok: true, session_id: 'p0_step')
|
|
266
|
+
expect(extra[:reward].to_f).to be_within(0.001).of(-0.01)
|
|
267
|
+
fin = described_class.finish(session_id: 'p0_step', score: 0.9, confidence: 1.0, verdict: :solved)
|
|
268
|
+
expect(fin[:score].to_f).to eq(0.9)
|
|
269
|
+
expect(fin[:return]).not_to be_nil
|
|
270
|
+
ensure
|
|
271
|
+
described_class.reset
|
|
272
|
+
FileUtils.remove_entry(tmp) if tmp && Dir.exist?(tmp)
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
it 'terminal reward is judge score scaled by confidence, not step hygiene' do
|
|
276
|
+
expect(described_class.send(:terminal_reward, score: 1.0, confidence: 0.5)).to be_within(0.01).of(0.5)
|
|
277
|
+
expect(described_class.send(:terminal_reward, score: 0.0, confidence: 1.0)).to be_within(0.01).of(-1.0)
|
|
278
|
+
end
|
|
238
279
|
end
|
|
@@ -328,3 +328,75 @@ describe PWN::AI::Agent::Reward do
|
|
|
328
328
|
expect(src).to include('quiet: true')
|
|
329
329
|
end
|
|
330
330
|
end
|
|
331
|
+
|
|
332
|
+
describe 'PWN::AI::Agent::Reward vs TUI plan' do
|
|
333
|
+
it 'does not let a TUI plan_cover_low haircut a high-evidence original-request answer' do
|
|
334
|
+
stub_const('PWN::AI::Agent::Reward::SENTINEL_FILE', File.join(Dir.mktmpdir, 's.json'))
|
|
335
|
+
allow(PWN::AI::Agent::Reward).to receive(:reflect_available?).and_return(false)
|
|
336
|
+
plan = [
|
|
337
|
+
'Load and review rules of engagement, submission criteria, and the full in-scope subdomain list',
|
|
338
|
+
'Inventory applicable unauthenticated testing skills and techniques',
|
|
339
|
+
'Enumerate and resolve all in-scope subdomains and map reachable services',
|
|
340
|
+
'Fingerprint stacks, configurations, and exposure on every subdomain',
|
|
341
|
+
'Run exhaustive unauthenticated analysis across the full attack surface',
|
|
342
|
+
'Prioritize and deep-dive each promising lead to confirm exploitability',
|
|
343
|
+
'Develop evidence-backed proof-of-concept demonstrations',
|
|
344
|
+
'Combine related weaknesses into higher-impact attack chains',
|
|
345
|
+
'Assign evidence-backed severity and filter to submission-eligible issues',
|
|
346
|
+
'Use graphical applications where they improve validation',
|
|
347
|
+
'Compile submission-ready writeups with reproduction steps',
|
|
348
|
+
'Re-verify each finding still reproduces and present the final set'
|
|
349
|
+
]
|
|
350
|
+
final = <<~TXT
|
|
351
|
+
Path-backed answer for the original request. Hosts scanned: 10.9.8.7 and 10.9.8.8.
|
|
352
|
+
Verified complete. Evidence in /tmp/pwn-eval-hosts.json. 12 hosts live. rspec passed.
|
|
353
|
+
TXT
|
|
354
|
+
klass = PWN::AI::Agent::Reward
|
|
355
|
+
v = klass.judge(
|
|
356
|
+
request: 'what live hosts can you find on this box and write /tmp/pwn-eval-hosts.json',
|
|
357
|
+
final: final,
|
|
358
|
+
plan: plan,
|
|
359
|
+
trace: [
|
|
360
|
+
'{"success":true,"result":{"stdout":"10.9.8.7 up","exit":0},"effect":"eval"}',
|
|
361
|
+
'{"success":true,"result":{"stdout":"wrote /tmp/pwn-eval-hosts.json","exit":0},"effect":"write"}'
|
|
362
|
+
],
|
|
363
|
+
commit: false
|
|
364
|
+
)
|
|
365
|
+
expect(v[:source].to_s).to eq 'heuristic'
|
|
366
|
+
expect(v[:score]).to be >= 0.6
|
|
367
|
+
expect(v[:verdict].to_s).to eq 'solved'
|
|
368
|
+
args = {
|
|
369
|
+
request: 'what live hosts can you find on this box and write /tmp/pwn-eval-hosts.json',
|
|
370
|
+
final: final,
|
|
371
|
+
trace: [
|
|
372
|
+
'{"success":true,"result":{"stdout":"10.9.8.7 up","exit":0},"effect":"eval"}',
|
|
373
|
+
'{"success":true,"result":{"stdout":"wrote /tmp/pwn-eval-hosts.json","exit":0},"effect":"write"}'
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
base = klass.send(:evidence_prior, **args)
|
|
377
|
+
mixed = klass.send(:evidence_prior, **args, plan: plan)
|
|
378
|
+
expect(mixed[:score]).to eq(base[:score])
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
it 'always grades the original request even when a stub compass or TUI plan is supplied' do
|
|
382
|
+
stub_const('PWN::AI::Agent::Reward::SENTINEL_FILE', File.join(Dir.mktmpdir, 's.json'))
|
|
383
|
+
allow(PWN::AI::Agent::Reward).to receive(:reflect_available?).and_return(false)
|
|
384
|
+
klass = PWN::AI::Agent::Reward
|
|
385
|
+
src = File.read(klass.method(:judge).source_location.first)
|
|
386
|
+
expect(src).not_to include('llm_judge(request: request, final: final, trace: trace, plan: opts[:plan])')
|
|
387
|
+
expect(src).not_to include('heuristic_judge(request: request, final: final, trace: trace, plan: opts[:plan])')
|
|
388
|
+
request = 'using hping3 what live hosts can you find in this subnet and write /tmp/x.json'
|
|
389
|
+
final = 'Live hosts: 10.1.2.3. Verified. Wrote /tmp/x.json. 4 hosts up. rspec passed.'
|
|
390
|
+
trace = [
|
|
391
|
+
'{"success":true,"result":{"stdout":"10.1.2.3 up","exit":0},"effect":"eval"}',
|
|
392
|
+
'{"success":true,"result":{"stdout":"wrote /tmp/x.json","exit":0},"effect":"write"}'
|
|
393
|
+
]
|
|
394
|
+
a = klass.judge(request: request, final: final, trace: trace, commit: false)
|
|
395
|
+
b = klass.judge(request: request, final: final, trace: trace, plan: ['Carry out the core work'], commit: false)
|
|
396
|
+
c = klass.judge(request: request, final: final, trace: trace, plan: ['Enumerate subdomains', 'Compile writeups'], commit: false)
|
|
397
|
+
expect(a[:score]).to eq(b[:score])
|
|
398
|
+
expect(b[:score]).to eq(c[:score])
|
|
399
|
+
expect(a[:score]).to be >= 0.6
|
|
400
|
+
expect(a[:verdict].to_s).to eq('solved')
|
|
401
|
+
end
|
|
402
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'tmpdir'
|
|
5
|
+
require 'fileutils'
|
|
6
|
+
|
|
7
|
+
describe 'scoreboard roadmap gates' do
|
|
8
|
+
it 'heuristic judge never stamps solved 0.9 from overlap' do
|
|
9
|
+
v = PWN::AI::Agent::Reward.send(
|
|
10
|
+
:heuristic_judge,
|
|
11
|
+
request: 'how does the feedback loop work in pwn-ai',
|
|
12
|
+
final: 'The feedback loop in pwn-ai works via a keep-working harness. ' * 8,
|
|
13
|
+
trace: ['{"success":false,"error":"PATH=/usr/bin"}']
|
|
14
|
+
)
|
|
15
|
+
expect(v[:source].to_s).to eq('heuristic')
|
|
16
|
+
expect(v[:score].to_f).to be < 0.9
|
|
17
|
+
expect(v[:score].to_f).to be <= 0.70
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'promote_to_success requires two of ORM, verify, critic' do
|
|
21
|
+
expect(PWN::AI::Agent::Reward.promote_to_success?(orm: true, verify: false, critic: false)).to be false
|
|
22
|
+
expect(PWN::AI::Agent::Reward.promote_to_success?(orm: true, verify: true, critic: false)).to be true
|
|
23
|
+
expect(PWN::AI::Agent::Reward.promote_to_success?(orm: false, verify: true, critic: true)).to be true
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it 'calibration_green? is overconfidence at or below 0.08 with enough samples' do
|
|
27
|
+
stub_const('PWN::AI::Agent::Metrics::METRICS_FILE', File.join(Dir.mktmpdir, 'metrics.json'))
|
|
28
|
+
PWN::AI::Agent::Metrics.reset
|
|
29
|
+
expect(PWN::AI::Agent::Metrics.calibration_green?).to be false
|
|
30
|
+
12.times { PWN::AI::Agent::Metrics.record_calibration(predicted: 0.52, actual: 0.50, brier: 0.0004, engine: :grok) }
|
|
31
|
+
expect(PWN::AI::Agent::Metrics.calibration_green?).to be true
|
|
32
|
+
12.times { PWN::AI::Agent::Metrics.record_calibration(predicted: 0.87, actual: 0.49, brier: 0.1444, engine: :ollama) }
|
|
33
|
+
expect(PWN::AI::Agent::Metrics.calibration_green?).to be false
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'policy is off when calibration is red' do
|
|
37
|
+
stub_const('PWN::AI::Agent::Metrics::METRICS_FILE', File.join(Dir.mktmpdir, 'metrics.json'))
|
|
38
|
+
PWN::AI::Agent::Metrics.reset
|
|
39
|
+
12.times { PWN::AI::Agent::Metrics.record_calibration(predicted: 0.87, actual: 0.49, brier: 0.1444, engine: :grok) }
|
|
40
|
+
PWN::Env[:ai] ||= {}
|
|
41
|
+
PWN::Env[:ai][:agent] ||= {}
|
|
42
|
+
PWN::Env[:ai][:agent][:policy] = true
|
|
43
|
+
expect(PWN::AI::Agent::Policy.enabled?).to be false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it 'mistakes to_context defaults to fixes only' do
|
|
47
|
+
src = File.read(PWN::AI::Agent::Mistakes.method(:to_context).source_location.first)
|
|
48
|
+
expect(src).to match(/fixes_only|KNOWN FIXES/)
|
|
49
|
+
expect(src).to match(/include_open|full/)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
it 'skills catalog is names only without skill bodies' do
|
|
53
|
+
src = File.read(PWN::AI::Agent::PromptBuilder.method(:build).source_location.first)
|
|
54
|
+
expect(src).to match(/skills_block/)
|
|
55
|
+
expect(src).not_to match(/meta\[:content\]\.to_s\[0,\s*1200\]/)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it 'curriculum reclassify_backlog exists' do
|
|
59
|
+
expect(PWN::AI::Agent::Curriculum).to respond_to(:reclassify_backlog)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe PWN::Reports::CSV do
|
|
6
|
+
it 'should display information for authors' do
|
|
7
|
+
authors_response = PWN::Reports::CSV
|
|
8
|
+
expect(authors_response).to respond_to :authors
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should display information for existing help method' do
|
|
12
|
+
help_response = PWN::Reports::CSV
|
|
13
|
+
expect(help_response).to respond_to :help
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should respond to generate' do
|
|
17
|
+
expect(PWN::Reports::CSV).to respond_to :generate
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'json'
|
|
5
|
+
require 'csv'
|
|
6
|
+
require 'tmpdir'
|
|
7
|
+
|
|
8
|
+
describe 'PWN::Reports format generators' do
|
|
9
|
+
let(:payload) do
|
|
10
|
+
{
|
|
11
|
+
title: 'PWN Format Spec',
|
|
12
|
+
report_name: 'pwn_format_spec',
|
|
13
|
+
executive_summary: 'One finding.',
|
|
14
|
+
findings: [
|
|
15
|
+
{
|
|
16
|
+
id: 'CFG-001',
|
|
17
|
+
title: 'Missing Security Headers',
|
|
18
|
+
severity: 'Low',
|
|
19
|
+
cvss: 4.3,
|
|
20
|
+
description: 'No X-Frame-Options',
|
|
21
|
+
poc: 'GET /',
|
|
22
|
+
recommendation: 'Add headers'
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
{
|
|
29
|
+
PDF: { ext: 'pdf', const: 'PDF' },
|
|
30
|
+
HTML: { ext: 'html', const: 'HTML' },
|
|
31
|
+
Markdown: { ext: 'md', const: 'Markdown' },
|
|
32
|
+
XML: { ext: 'xml', const: 'XML' },
|
|
33
|
+
CSV: { ext: 'csv', const: 'CSV' },
|
|
34
|
+
JSON: { ext: 'json', const: 'JSON' }
|
|
35
|
+
}.each do |label, meta|
|
|
36
|
+
describe "PWN::Reports::#{meta[:const]}" do
|
|
37
|
+
it 'responds to generate, authors, and help' do
|
|
38
|
+
klass = PWN::Reports.const_get(meta[:const])
|
|
39
|
+
expect(klass).to respond_to(:generate)
|
|
40
|
+
expect(klass).to respond_to(:authors)
|
|
41
|
+
expect(klass).to respond_to(:help)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it "writes a .#{meta[:ext]} report via generate" do
|
|
45
|
+
klass = PWN::Reports.const_get(meta[:const])
|
|
46
|
+
Dir.mktmpdir('pwn_report_fmt') do |dir|
|
|
47
|
+
path = klass.generate(
|
|
48
|
+
dir_path: dir,
|
|
49
|
+
report_name: 'pwn_format_spec',
|
|
50
|
+
results_hash: payload
|
|
51
|
+
)
|
|
52
|
+
expect(path).to eq(File.join(dir, "pwn_format_spec.#{meta[:ext]}"))
|
|
53
|
+
expect(File.file?(path)).to eq(true)
|
|
54
|
+
expect(File.size(path)).to be > 0
|
|
55
|
+
body = File.binread(path)
|
|
56
|
+
case label
|
|
57
|
+
when :PDF
|
|
58
|
+
expect(body.start_with?('%PDF')).to eq(true)
|
|
59
|
+
when :HTML
|
|
60
|
+
expect(body).to match(/<!DOCTYPE html>/i)
|
|
61
|
+
expect(body).to include('Missing Security Headers')
|
|
62
|
+
when :Markdown
|
|
63
|
+
expect(body).to include('# PWN Format Spec')
|
|
64
|
+
expect(body).to include('Missing Security Headers')
|
|
65
|
+
when :XML
|
|
66
|
+
expect(body).to include('<?xml')
|
|
67
|
+
expect(body).to include('Missing Security Headers')
|
|
68
|
+
when :CSV
|
|
69
|
+
rows = CSV.parse(body)
|
|
70
|
+
expect(rows.first).to include('title')
|
|
71
|
+
expect(body).to include('Missing Security Headers')
|
|
72
|
+
when :JSON
|
|
73
|
+
parsed = JSON.parse(body)
|
|
74
|
+
expect(parsed['title']).to eq('PWN Format Spec')
|
|
75
|
+
expect(parsed['findings'].first['id']).to eq('CFG-001')
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
it 'honours an explicit path: override' do
|
|
83
|
+
Dir.mktmpdir('pwn_report_path') do |dir|
|
|
84
|
+
out = File.join(dir, 'custom.json')
|
|
85
|
+
path = PWN::Reports::JSON.generate(path: out, results_hash: payload)
|
|
86
|
+
expect(path).to eq(out)
|
|
87
|
+
expect(JSON.parse(File.read(out))['title']).to eq('PWN Format Spec')
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe PWN::Reports::HTML do
|
|
6
|
+
it 'should display information for authors' do
|
|
7
|
+
authors_response = PWN::Reports::HTML
|
|
8
|
+
expect(authors_response).to respond_to :authors
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should display information for existing help method' do
|
|
12
|
+
help_response = PWN::Reports::HTML
|
|
13
|
+
expect(help_response).to respond_to :help
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should respond to generate' do
|
|
17
|
+
expect(PWN::Reports::HTML).to respond_to :generate
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe PWN::Reports::JSON do
|
|
6
|
+
it 'should display information for authors' do
|
|
7
|
+
authors_response = PWN::Reports::JSON
|
|
8
|
+
expect(authors_response).to respond_to :authors
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should display information for existing help method' do
|
|
12
|
+
help_response = PWN::Reports::JSON
|
|
13
|
+
expect(help_response).to respond_to :help
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should respond to generate' do
|
|
17
|
+
expect(PWN::Reports::JSON).to respond_to :generate
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe PWN::Reports::Markdown do
|
|
6
|
+
it 'should display information for authors' do
|
|
7
|
+
authors_response = PWN::Reports::Markdown
|
|
8
|
+
expect(authors_response).to respond_to :authors
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should display information for existing help method' do
|
|
12
|
+
help_response = PWN::Reports::Markdown
|
|
13
|
+
expect(help_response).to respond_to :help
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should respond to generate' do
|
|
17
|
+
expect(PWN::Reports::Markdown).to respond_to :generate
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe PWN::Reports::PDF do
|
|
6
|
+
it 'should display information for authors' do
|
|
7
|
+
authors_response = PWN::Reports::PDF
|
|
8
|
+
expect(authors_response).to respond_to :authors
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should display information for existing help method' do
|
|
12
|
+
help_response = PWN::Reports::PDF
|
|
13
|
+
expect(help_response).to respond_to :help
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should respond to generate' do
|
|
17
|
+
expect(PWN::Reports::PDF).to respond_to :generate
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe PWN::Reports::XML do
|
|
6
|
+
it 'should display information for authors' do
|
|
7
|
+
authors_response = PWN::Reports::XML
|
|
8
|
+
expect(authors_response).to respond_to :authors
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should display information for existing help method' do
|
|
12
|
+
help_response = PWN::Reports::XML
|
|
13
|
+
expect(help_response).to respond_to :help
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should respond to generate' do
|
|
17
|
+
expect(PWN::Reports::XML).to respond_to :generate
|
|
18
|
+
end
|
|
19
|
+
end
|
data/third_party/pwn_rdoc.jsonl
CHANGED
|
@@ -40,10 +40,12 @@
|
|
|
40
40
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.ollama_create Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.ollama_create`: "}]}
|
|
41
41
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.practice Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.practice`: "}]}
|
|
42
42
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.practice_kpi Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.practice_kpi`: "}]}
|
|
43
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.practice_poc_ok? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.practice_poc_ok?`: "}]}
|
|
43
44
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.practice_skip? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.practice_skip?`: "}]}
|
|
44
45
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.preference_balance Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.preference_balance`: "}]}
|
|
45
46
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.preference_diet_gate Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.preference_diet_gate`: "}]}
|
|
46
47
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.python_site_package_roots Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.python_site_package_roots`: "}]}
|
|
48
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.reclassify_backlog Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.reclassify_backlog`: "}]}
|
|
47
49
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.red_team_plan Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.red_team_plan`: Supported Method Parameters\n\nhint = PWN::AI::Agent::Curriculum.red_team_plan(\n\nrequest: 'required - user goal',\nplan: 'required - numbered plan text from plan_first'\n\n)\n"}]}
|
|
48
50
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.reflect_available? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.reflect_available?`: "}]}
|
|
49
51
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Curriculum.repeating_trend Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Curriculum.repeating_trend`: "}]}
|
|
@@ -328,6 +330,7 @@
|
|
|
328
330
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.call_engine Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.call_engine`: Supported Method Parameters\n\nmsg = PWN::AI::Agent::Loop.call_engine(\n\nmessages: 'required - OpenAI-format messages array',\ntools: 'optional - OpenAI tools array'\n\n)\n\nReturns a normalised assistant message hash:\n\n{ role: 'assistant', content: String|nil,\n tool_calls: [ {id:, type:'function', function:{name:, arguments:}} ],\n _native_content: <provider raw> (when adapter needs round-trip) }\n"}]}
|
|
329
331
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.catalog_lookup? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.catalog_lookup?`: "}]}
|
|
330
332
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.chat_response_history Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.chat_response_history`: "}]}
|
|
333
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.checkpoint_result Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.checkpoint_result`: "}]}
|
|
331
334
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.compact_history! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.compact_history!`: "}]}
|
|
332
335
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.debug_final_text! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.debug_final_text!`: "}]}
|
|
333
336
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.debug_msgs_line Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.debug_msgs_line`: "}]}
|
|
@@ -377,6 +380,7 @@
|
|
|
377
380
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.ollama_wire_tool_call Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.ollama_wire_tool_call`: "}]}
|
|
378
381
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.openai_wire_messages Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.openai_wire_messages`: Supported Method Parameters\n\nwire = PWN::AI::Agent::Loop.openai_wire_messages(\n\nmessages: 'required - in-memory OpenAI-ish messages (may have Hash args / internal keys)'\n\n)\n\nReturns a deep-copied array safe for OpenAI / xAI chat.completions:\n\ndrops _native_content / _text_tool_coerced / thinking private keys\n\nstringifies function.arguments maps\n\ncoerces Hash/non-string content to JSON/string (nil kept for assistant tool turns)\n\n"}]}
|
|
379
382
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.openai_wire_tool_call Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.openai_wire_tool_call`: "}]}
|
|
383
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.operator_bound_refusal Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.operator_bound_refusal`: "}]}
|
|
380
384
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.parse_contract Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.parse_contract`: "}]}
|
|
381
385
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.parse_tool_arguments Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.parse_tool_arguments`: "}]}
|
|
382
386
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.payload_sig Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.payload_sig`: "}]}
|
|
@@ -392,6 +396,8 @@
|
|
|
392
396
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.run Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.run`: Supported Method Parameters\n\nfinal = PWN::AI::Agent::Loop.run(\n\nrequest: 'required - what the human typed',\nsession_id: 'optional - PWN::Sessions id (transcript is appended to it)',\nenabled_toolsets: 'optional - subset of Registry.toolsets, or nil for all',\non_tool: 'optional - ->(name, args, result) callback for live UI',\nsystem_role_content: 'optional - override default system prompt (built from session_id if not provided)'\n\n)\n"}]}
|
|
393
397
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.session_chat_history Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.session_chat_history`: "}]}
|
|
394
398
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.should_auto_introspect? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.should_auto_introspect?`: "}]}
|
|
399
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.spill_tool_body Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.spill_tool_body`: "}]}
|
|
400
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.spill_tool_history! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.spill_tool_history!`: "}]}
|
|
395
401
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.stamped_effect Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.stamped_effect`: "}]}
|
|
396
402
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.start_debug_session Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.start_debug_session`: "}]}
|
|
397
403
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.stringify_tool_arguments Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.stringify_tool_arguments`: "}]}
|
|
@@ -404,6 +410,7 @@
|
|
|
404
410
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.tool_effects Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.tool_effects`: "}]}
|
|
405
411
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.wait_trace_step! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.wait_trace_step!`: "}]}
|
|
406
412
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.world_knowledge? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.world_knowledge?`: "}]}
|
|
413
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.wrap_untrusted_tool Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.wrap_untrusted_tool`: "}]}
|
|
407
414
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Loop.write_verified? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Loop.write_verified?`: "}]}
|
|
408
415
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.advantage Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.advantage`: Supported Method Parameters\n\na = PWN::AI::Agent::Metrics.advantage(name: ‘shell’)\n\nC1 — tool.success_rate − global_rate over the rolling window.\n"}]}
|
|
409
416
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.authors Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
@@ -411,11 +418,12 @@
|
|
|
411
418
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.blank_bucket Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.blank_bucket`: "}]}
|
|
412
419
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.bump Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.bump`: "}]}
|
|
413
420
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.calibration Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.calibration`: Supported Method Parameters\n\ncal = PWN::AI::Agent::Metrics.calibration(engine: :ollama)\n"}]}
|
|
421
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.calibration_green? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.calibration_green?`: Supported Method Parameters\n\nPWN::AI::Agent::Metrics.reset\n"}]}
|
|
414
422
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.changepoints Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.changepoints`: Supported Method Parameters\n\ncps = PWN::AI::Agent::Metrics.changepoints\n\nE1 — tools whose CUSUM tripped (success_rate regime change). The caller (Mistakes.record / Curriculum) triggers extro_snapshot + correlate on these so a Mistake caused by env drift is tagged cause: :env_drift and does NOT count toward [REPEATING].\n"}]}
|
|
415
423
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.decay Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.decay`: "}]}
|
|
416
424
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.effective_rate Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.effective_rate`: "}]}
|
|
417
425
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.gamma_sample Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.gamma_sample`: "}]}
|
|
418
|
-
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.health_line Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.health_line`:
|
|
426
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.health_line Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.health_line`: "}]}
|
|
419
427
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.help Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.help`: "}]}
|
|
420
428
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.judge_confidence Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.judge_confidence`: "}]}
|
|
421
429
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.judge_rate Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.judge_rate`: "}]}
|
|
@@ -429,6 +437,8 @@
|
|
|
429
437
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.record_step_reward Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.record_step_reward`: "}]}
|
|
430
438
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.reset Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.reset`: "}]}
|
|
431
439
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.save Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.save`: Supported Method Parameters\n\nPWN::AI::Agent::Metrics.save(\n\nmetrics: 'required - Hash returned by .load / mutated in place'\n\n)\n"}]}
|
|
440
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.scale_prediction Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.scale_prediction`: "}]}
|
|
441
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.scoreboard Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.scoreboard`: "}]}
|
|
432
442
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.summary Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.summary`: Supported Method Parameters\n\nrows = PWN::AI::Agent::Metrics.summary(\n\nlimit: 'optional - cap number of tools returned (default 25)',\nengine: 'optional - only that engine\\'s sub-bucket (falls back to global when absent)'\n\n)\n"}]}
|
|
433
443
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.thompson Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.thompson`: Supported Method Parameters\n\np = PWN::AI::Agent::Metrics.thompson(name: ‘shell’)\n\nC1 — Thompson sample from Beta(ok+1, fail+1). Naturally balances exploit/explore; used by Registry.rank as the tie-breaker.\n"}]}
|
|
434
444
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Metrics.to_context Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Metrics.to_context`: Supported Method Parameters\n\nctx = PWN::AI::Agent::Metrics.to_context(\n\nlimit: 'optional - cap number of tools included (default 8)',\nengine: 'optional - restrict to one engine\\'s telemetry'\n\n)\n"}]}
|
|
@@ -479,6 +489,7 @@
|
|
|
479
489
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Policy.bump_visit! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Policy.bump_visit!`: "}]}
|
|
480
490
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Policy.cold? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Policy.cold?`: "}]}
|
|
481
491
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Policy.completeness_bin Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Policy.completeness_bin`: "}]}
|
|
492
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Policy.contract_fields_met Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Policy.contract_fields_met`: "}]}
|
|
482
493
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Policy.current_episode Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Policy.current_episode`: "}]}
|
|
483
494
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Policy.current_state Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Policy.current_state`: "}]}
|
|
484
495
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Policy.detach_episode! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Policy.detach_episode!`: "}]}
|
|
@@ -531,6 +542,7 @@
|
|
|
531
542
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::PromptBuilder.host_line Usage"},{"role":"assistant","content":"`PWN::AI::Agent::PromptBuilder.host_line`: "}]}
|
|
532
543
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::PromptBuilder.host_load_block Usage"},{"role":"assistant","content":"`PWN::AI::Agent::PromptBuilder.host_load_block`: "}]}
|
|
533
544
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::PromptBuilder.learning_block Usage"},{"role":"assistant","content":"`PWN::AI::Agent::PromptBuilder.learning_block`: "}]}
|
|
545
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::PromptBuilder.memory_asked? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::PromptBuilder.memory_asked?`: "}]}
|
|
534
546
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::PromptBuilder.memory_block Usage"},{"role":"assistant","content":"`PWN::AI::Agent::PromptBuilder.memory_block`: "}]}
|
|
535
547
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::PromptBuilder.metrics_block Usage"},{"role":"assistant","content":"`PWN::AI::Agent::PromptBuilder.metrics_block`: "}]}
|
|
536
548
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::PromptBuilder.mistakes_block Usage"},{"role":"assistant","content":"`PWN::AI::Agent::PromptBuilder.mistakes_block`: "}]}
|
|
@@ -612,6 +624,7 @@
|
|
|
612
624
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Reward.preference_balance Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Reward.preference_balance`: "}]}
|
|
613
625
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Reward.preferences Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Reward.preferences`: Supported Method Parameters\n\nrows = PWN::AI::Agent::Reward.preferences(limit: 500, source: nil)\n"}]}
|
|
614
626
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Reward.prm Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Reward.prm`: Supported Method Parameters\n\nsteps = PWN::AI::Agent::Reward.prm(\n\nrequest: 'required - user goal',\nsession_id: 'optional - session to score in place',\ntrace: 'optional - Array of {name:, args:, result:} or Strings'\n\n)\n\nReturns [{idx:, step:, reward: -1|0|1}, …] and, when session_id is given, rewrites each tool line in the transcript with a ‘[step_reward=N]` prefix so exemplars_for / distill_skill can keep only reward>0 steps (C4 minimal sufficient trace).\n"}]}
|
|
627
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::Reward.promote_to_success? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Reward.promote_to_success?`: "}]}
|
|
615
628
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Reward.proxy_distrust Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Reward.proxy_distrust`: "}]}
|
|
616
629
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Reward.record_preference Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Reward.record_preference`: "}]}
|
|
617
630
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::Reward.record_sentinel Usage"},{"role":"assistant","content":"`PWN::AI::Agent::Reward.record_sentinel`: "}]}
|
|
@@ -743,6 +756,7 @@
|
|
|
743
756
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::ToolGuard.present? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::ToolGuard.present?`: "}]}
|
|
744
757
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::ToolGuard.protect_core_constants! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::ToolGuard.protect_core_constants!`: "}]}
|
|
745
758
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::ToolGuard.protect_http! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::ToolGuard.protect_http!`: "}]}
|
|
759
|
+
{"messages":[{"role":"user","content":"PWN::AI::Agent::ToolGuard.refuse_copied_persist? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::ToolGuard.refuse_copied_persist?`: "}]}
|
|
746
760
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::ToolGuard.reset_timeout_budget Usage"},{"role":"assistant","content":"`PWN::AI::Agent::ToolGuard.reset_timeout_budget`: "}]}
|
|
747
761
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::ToolGuard.reset_timeout_budget! Usage"},{"role":"assistant","content":"`PWN::AI::Agent::ToolGuard.reset_timeout_budget!`: "}]}
|
|
748
762
|
{"messages":[{"role":"user","content":"PWN::AI::Agent::ToolGuard.shell_bash? Usage"},{"role":"assistant","content":"`PWN::AI::Agent::ToolGuard.shell_bash?`: "}]}
|
|
@@ -2478,20 +2492,45 @@
|
|
|
2478
2492
|
{"messages":[{"role":"user","content":"PWN::Plugins::Zaproxy.stop Usage"},{"role":"assistant","content":"`PWN::Plugins::Zaproxy.stop`: Supported Method Parameters\n\nPWN::Plugins::Zaproxy.stop(\n\nzap_obj: 'required - zap_obj returned from #open method'\n\n)\n"}]}
|
|
2479
2493
|
{"messages":[{"role":"user","content":"PWN::Plugins::Zaproxy.tamper Usage"},{"role":"assistant","content":"`PWN::Plugins::Zaproxy.tamper`: Supported Method Parameters\n\nPWN::Plugins::Zaproxy.tamper(\n\nzap_obj: 'required - zap_obj returned from #open method',\ndomain: 'required - FQDN to tamper (e.g. test.domain.local)',\nenabled: 'optional - boolean (defaults to true)'\n\n)\n"}]}
|
|
2480
2494
|
{"messages":[{"role":"user","content":"PWN::Plugins::Zaproxy.zap_rest_call Usage"},{"role":"assistant","content":"`PWN::Plugins::Zaproxy.zap_rest_call`: Supported Method Parameters\n\nzap_rest_call(\n\nzap_obj: 'required zap_obj returned from #start method',\nrest_call: 'required rest call to make per the schema',\nhttp_method: 'optional HTTP method (defaults to GET)\nhttp_body: 'optional HTTP body sent in HTTP methods that support it e.g. POST'\n\n)\n"}]}
|
|
2481
|
-
{"messages":[{"role":"user","content":"PWN::Reports.authors Usage"},{"role":"assistant","content":"`PWN::Reports.authors`:
|
|
2495
|
+
{"messages":[{"role":"user","content":"PWN::Reports.authors Usage"},{"role":"assistant","content":"`PWN::Reports.authors`: "}]}
|
|
2482
2496
|
{"messages":[{"role":"user","content":"PWN::Reports.help Usage"},{"role":"assistant","content":"`PWN::Reports.help`: "}]}
|
|
2497
|
+
{"messages":[{"role":"user","content":"PWN::Reports.report_payload Usage"},{"role":"assistant","content":"`PWN::Reports.report_payload`: "}]}
|
|
2498
|
+
{"messages":[{"role":"user","content":"PWN::Reports.resolve_path Usage"},{"role":"assistant","content":"`PWN::Reports.resolve_path`: "}]}
|
|
2499
|
+
{"messages":[{"role":"user","content":"PWN::Reports.stringify_keys Usage"},{"role":"assistant","content":"`PWN::Reports.stringify_keys`: "}]}
|
|
2483
2500
|
{"messages":[{"role":"user","content":"PWN::Reports::AIRedTeam.authors Usage"},{"role":"assistant","content":"`PWN::Reports::AIRedTeam.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
2484
2501
|
{"messages":[{"role":"user","content":"PWN::Reports::AIRedTeam.generate Usage"},{"role":"assistant","content":"`PWN::Reports::AIRedTeam.generate`: Supported Method Parameters\n\nPWN::Reports::AIRedTeam.generate(\n\ndir_path: 'optional - Directory path to save the report (defaults to .)',\nresults_hash: 'optional - Hash containing the results of the AI RedTeam analysis (defaults to empty hash structure)',\nreport_name: 'optional - Name of the report file (defaults to current directory name)'\n\n)\n"}]}
|
|
2485
2502
|
{"messages":[{"role":"user","content":"PWN::Reports::AIRedTeam.help Usage"},{"role":"assistant","content":"`PWN::Reports::AIRedTeam.help`: "}]}
|
|
2503
|
+
{"messages":[{"role":"user","content":"PWN::Reports::CSV.authors Usage"},{"role":"assistant","content":"`PWN::Reports::CSV.authors`: "}]}
|
|
2504
|
+
{"messages":[{"role":"user","content":"PWN::Reports::CSV.generate Usage"},{"role":"assistant","content":"`PWN::Reports::CSV.generate`: "}]}
|
|
2505
|
+
{"messages":[{"role":"user","content":"PWN::Reports::CSV.help Usage"},{"role":"assistant","content":"`PWN::Reports::CSV.help`: "}]}
|
|
2486
2506
|
{"messages":[{"role":"user","content":"PWN::Reports::Fuzz.authors Usage"},{"role":"assistant","content":"`PWN::Reports::Fuzz.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
2487
2507
|
{"messages":[{"role":"user","content":"PWN::Reports::Fuzz.generate Usage"},{"role":"assistant","content":"`PWN::Reports::Fuzz.generate`: Supported Method Parameters\n\nPWN::Reports::Fuzz.generate(\n\ndir_path: dir_path,\nresults_hash: results_hash,\nchar_encoding: 'optional - character encoding returned by PWN::Plugins::Char.list_encoders (defaults to UTF-8)'\n\n)\n"}]}
|
|
2488
2508
|
{"messages":[{"role":"user","content":"PWN::Reports::Fuzz.help Usage"},{"role":"assistant","content":"`PWN::Reports::Fuzz.help`: "}]}
|
|
2509
|
+
{"messages":[{"role":"user","content":"PWN::Reports::HTML.authors Usage"},{"role":"assistant","content":"`PWN::Reports::HTML.authors`: "}]}
|
|
2510
|
+
{"messages":[{"role":"user","content":"PWN::Reports::HTML.generate Usage"},{"role":"assistant","content":"`PWN::Reports::HTML.generate`: "}]}
|
|
2511
|
+
{"messages":[{"role":"user","content":"PWN::Reports::HTML.h Usage"},{"role":"assistant","content":"`PWN::Reports::HTML.h`: "}]}
|
|
2512
|
+
{"messages":[{"role":"user","content":"PWN::Reports::HTML.help Usage"},{"role":"assistant","content":"`PWN::Reports::HTML.help`: "}]}
|
|
2513
|
+
{"messages":[{"role":"user","content":"PWN::Reports::HTML.summary_html Usage"},{"role":"assistant","content":"`PWN::Reports::HTML.summary_html`: "}]}
|
|
2489
2514
|
{"messages":[{"role":"user","content":"PWN::Reports::HTMLFooter.authors Usage"},{"role":"assistant","content":"`PWN::Reports::HTMLFooter.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
2490
2515
|
{"messages":[{"role":"user","content":"PWN::Reports::HTMLFooter.generate Usage"},{"role":"assistant","content":"`PWN::Reports::HTMLFooter.generate`: Supported Method Parameters\n\nPWN::Reports::HTMLFooter.generate(\n\ncolumn_names: 'required - array of column names to use in the report table',\ndriver_src_uri: 'required - pwn driver source code uri',\n\n)\n"}]}
|
|
2491
2516
|
{"messages":[{"role":"user","content":"PWN::Reports::HTMLFooter.help Usage"},{"role":"assistant","content":"`PWN::Reports::HTMLFooter.help`: "}]}
|
|
2492
2517
|
{"messages":[{"role":"user","content":"PWN::Reports::HTMLHeader.authors Usage"},{"role":"assistant","content":"`PWN::Reports::HTMLHeader.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
2493
2518
|
{"messages":[{"role":"user","content":"PWN::Reports::HTMLHeader.generate Usage"},{"role":"assistant","content":"`PWN::Reports::HTMLHeader.generate`: Supported Method Parameters\n\nPWN::Reports::HTMLHeader.generate(\n\ncolumn_names: 'required - array of column names to use in the report table',\ndriver_src_uri: 'required - pwn driver source code uri',\n\n)\n"}]}
|
|
2494
2519
|
{"messages":[{"role":"user","content":"PWN::Reports::HTMLHeader.help Usage"},{"role":"assistant","content":"`PWN::Reports::HTMLHeader.help`: "}]}
|
|
2520
|
+
{"messages":[{"role":"user","content":"PWN::Reports::JSON.authors Usage"},{"role":"assistant","content":"`PWN::Reports::JSON.authors`: "}]}
|
|
2521
|
+
{"messages":[{"role":"user","content":"PWN::Reports::JSON.generate Usage"},{"role":"assistant","content":"`PWN::Reports::JSON.generate`: "}]}
|
|
2522
|
+
{"messages":[{"role":"user","content":"PWN::Reports::JSON.help Usage"},{"role":"assistant","content":"`PWN::Reports::JSON.help`: "}]}
|
|
2523
|
+
{"messages":[{"role":"user","content":"PWN::Reports::Markdown.authors Usage"},{"role":"assistant","content":"`PWN::Reports::Markdown.authors`: "}]}
|
|
2524
|
+
{"messages":[{"role":"user","content":"PWN::Reports::Markdown.generate Usage"},{"role":"assistant","content":"`PWN::Reports::Markdown.generate`: "}]}
|
|
2525
|
+
{"messages":[{"role":"user","content":"PWN::Reports::Markdown.help Usage"},{"role":"assistant","content":"`PWN::Reports::Markdown.help`: "}]}
|
|
2526
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.assemble_pdf Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.assemble_pdf`: "}]}
|
|
2527
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.authors Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.authors`: "}]}
|
|
2528
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.generate Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.generate`: "}]}
|
|
2529
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.help Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.help`: "}]}
|
|
2530
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.pdf_escape Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.pdf_escape`: "}]}
|
|
2531
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.pdf_stream Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.pdf_stream`: "}]}
|
|
2532
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.render_pdf Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.render_pdf`: "}]}
|
|
2533
|
+
{"messages":[{"role":"user","content":"PWN::Reports::PDF.wrap_line Usage"},{"role":"assistant","content":"`PWN::Reports::PDF.wrap_line`: "}]}
|
|
2495
2534
|
{"messages":[{"role":"user","content":"PWN::Reports::Phone.authors Usage"},{"role":"assistant","content":"`PWN::Reports::Phone.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
2496
2535
|
{"messages":[{"role":"user","content":"PWN::Reports::Phone.generate Usage"},{"role":"assistant","content":"`PWN::Reports::Phone.generate`: Supported Method Parameters\n\nPWN::Reports::Phone.generate(\n\ndir_path: dir_path,\nresults_hash: results_hash\n\n)\n"}]}
|
|
2497
2536
|
{"messages":[{"role":"user","content":"PWN::Reports::Phone.help Usage"},{"role":"assistant","content":"`PWN::Reports::Phone.help`: "}]}
|
|
@@ -2501,6 +2540,10 @@
|
|
|
2501
2540
|
{"messages":[{"role":"user","content":"PWN::Reports::URIBuster.authors Usage"},{"role":"assistant","content":"`PWN::Reports::URIBuster.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
2502
2541
|
{"messages":[{"role":"user","content":"PWN::Reports::URIBuster.generate Usage"},{"role":"assistant","content":"`PWN::Reports::URIBuster.generate`: Supported Method Parameters\n\nPWN::Reports::URIBuster.generate(\n\ndir_path: dir_path,\nresults_hash: results_hash\n\n)\n"}]}
|
|
2503
2542
|
{"messages":[{"role":"user","content":"PWN::Reports::URIBuster.help Usage"},{"role":"assistant","content":"`PWN::Reports::URIBuster.help`: "}]}
|
|
2543
|
+
{"messages":[{"role":"user","content":"PWN::Reports::XML.authors Usage"},{"role":"assistant","content":"`PWN::Reports::XML.authors`: "}]}
|
|
2544
|
+
{"messages":[{"role":"user","content":"PWN::Reports::XML.generate Usage"},{"role":"assistant","content":"`PWN::Reports::XML.generate`: "}]}
|
|
2545
|
+
{"messages":[{"role":"user","content":"PWN::Reports::XML.help Usage"},{"role":"assistant","content":"`PWN::Reports::XML.help`: "}]}
|
|
2546
|
+
{"messages":[{"role":"user","content":"PWN::Reports::XML.safe_tag Usage"},{"role":"assistant","content":"`PWN::Reports::XML.safe_tag`: "}]}
|
|
2504
2547
|
{"messages":[{"role":"user","content":"PWN::SAST.authors Usage"},{"role":"assistant","content":"`PWN::SAST.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
|
2505
2548
|
{"messages":[{"role":"user","content":"PWN::SAST.help Usage"},{"role":"assistant","content":"`PWN::SAST.help`: "}]}
|
|
2506
2549
|
{"messages":[{"role":"user","content":"PWN::SAST::AMQPConnectAsGuest.authors Usage"},{"role":"assistant","content":"`PWN::SAST::AMQPConnectAsGuest.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|