PWN::AI::Agent::ToolGuard
Shared pre-dispatch guards for the two high-volume runtime tools (shell / pwn_eval). Rejects placeholder payloads, aliases wrong schema keys, and names the shell that will actually run the command.
When to use
Call PWN::AI::Agent::ToolGuard from pwn_eval when the task needs this module.
Do not reimplement it in shell.
Methodologies
Generated from pwn/ai/agent/tool_guard.rb. Prefer the public class methods below.
Class methods take (opts = {}) and read opts.
How to call
PWN::AI::Agent::ToolGuard.help
PWN::AI::Agent::ToolGuard.unwrap_payload(opts)
Public methods
unwrap_payloadpresentplaceholderplaceholder_matchbashismbashism_matchshell_syntax_surfacemint_canarycanary_leakinjection_scorequarantine_outputshell_bashshell_nameprotect_httpprotect_core_constantscoerce_argsinvalid_payloaddenialhost_loaddeadline_sreset_timeout_budgetmutation_countpayload_spentnote_timeoutnext_timeouttimeout_lessontimeout_resulttimeout_prior_countrefuse_copied_persistscope_refusalpolicy_decisionscope_checkrfc1918ip_in_cidrcommand_classrecord_runtimepredicted_timeoutauto_jobauthorshelpauto_job?bashism?canary_leak?ip_in_cidr?note_timeout!placeholder?present?protect_core_constants!protect_http!refuse_copied_persist?reset_timeout_budget!rfc1918?scope_check!shell_bash?
Source
pwn/ai/agent/tool_guard.rb
Verification
PWN::AI::Agent::ToolGuard.respond_to?(:unwrap_payload) after the
module is loaded. Read the source for parameter names.