pwn 0.5.795 → 0.5.798
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 +8 -8
- data/bin/pwn_autoinc_version +4 -5
- data/bin/pwn_web_cache_deception +40 -29
- data/documentation/AWS.md +15 -5
- data/documentation/Diagrams.md +1 -1
- data/documentation/Home.md +2 -2
- data/documentation/How-PWN-Works.md +1 -1
- data/documentation/Mission-Cancellation.md +6 -4
- data/documentation/Operability.md +1 -1
- data/documentation/What-is-PWN.md +1 -1
- data/documentation/diagrams/aws-cloud-security.svg +1 -1
- data/documentation/diagrams/dot/aws-cloud-security.dot +1 -1
- data/documentation/diagrams/dot/network-infra-testing.dot +1 -1
- data/documentation/diagrams/network-infra-testing.svg +1 -1
- data/etc/default_cron/session_cleanup.rb +84 -51
- data/etc/default_skills/pwn/ai/agent/mission_namespace/SKILL.md +6 -4
- data/lib/pwn/ai/agent/assembly.rb +0 -2
- data/lib/pwn/ai/agent/btc.rb +0 -2
- data/lib/pwn/ai/agent/burp_suite.rb +0 -2
- data/lib/pwn/ai/agent/curriculum.rb +2 -2
- data/lib/pwn/ai/agent/dispatch.rb +3 -0
- data/lib/pwn/ai/agent/engagement.rb +96 -41
- data/lib/pwn/ai/agent/extrospection/osint/bridges.rb +2 -0
- data/lib/pwn/ai/agent/extrospection.rb +50 -13
- data/lib/pwn/ai/agent/gqrx.rb +0 -2
- data/lib/pwn/ai/agent/hacker_one.rb +0 -2
- data/lib/pwn/ai/agent/learning.rb +45 -13
- data/lib/pwn/ai/agent/loop.rb +16 -11
- data/lib/pwn/ai/agent/metrics.rb +1 -1
- data/lib/pwn/ai/agent/mission.rb +6 -3
- data/lib/pwn/ai/agent/mission_namespace.rb +70 -14
- data/lib/pwn/ai/agent/policy.rb +1 -1
- data/lib/pwn/ai/agent/policy_evaluation.rb +2 -2
- data/lib/pwn/ai/agent/reflect.rb +1 -0
- data/lib/pwn/ai/agent/request_runtime.rb +1 -1
- data/lib/pwn/ai/agent/reward.rb +155 -53
- data/lib/pwn/ai/agent/sast.rb +0 -2
- data/lib/pwn/ai/agent/task_dag.rb +5 -3
- data/lib/pwn/ai/agent/task_summarizer.rb +21 -11
- data/lib/pwn/ai/agent/tool_guard.rb +19 -0
- data/lib/pwn/ai/agent/tools/ruby_eval.rb +1 -1
- data/lib/pwn/ai/agent/tools/verify.rb +7 -3
- data/lib/pwn/ai/agent/transparent_browser.rb +0 -2
- data/lib/pwn/ai/agent/turn_finalizer.rb +3 -0
- data/lib/pwn/ai/anthropic.rb +3 -3
- data/lib/pwn/ai/context.rb +2 -1
- data/lib/pwn/ai/gemini.rb +7 -5
- data/lib/pwn/ai/grok.rb +37 -18
- data/lib/pwn/ai/mcp.rb +17 -5
- data/lib/pwn/ai/ollama.rb +76 -35
- data/lib/pwn/ai/open_ai.rb +7 -19
- data/lib/pwn/ai/open_web_ui.rb +76 -40
- data/lib/pwn/aws/cloud_search_domain.rb +6 -0
- data/lib/pwn/aws/iam.rb +2 -2
- data/lib/pwn/aws/workspaces.rb +2 -2
- data/lib/pwn/aws.rb +0 -5
- data/lib/pwn/bounty/lifecycle_authz_replay.rb +1 -1
- data/lib/pwn/config.rb +17 -10
- data/lib/pwn/corpus.rb +33 -5
- data/lib/pwn/cron.rb +60 -17
- data/lib/pwn/driver.rb +2 -3
- data/lib/pwn/engagement.rb +28 -10
- data/lib/pwn/ffi/capstone.rb +3 -2
- data/lib/pwn/ffi/fftw.rb +8 -6
- data/lib/pwn/ffi/keystone.rb +3 -2
- data/lib/pwn/ffi/soapy_sdr.rb +10 -6
- data/lib/pwn/json_text.rb +25 -13
- data/lib/pwn/memory_index.rb +6 -4
- data/lib/pwn/module_skills.rb +3 -1
- data/lib/pwn/plugins/aflplusplus.rb +1 -0
- data/lib/pwn/plugins/ai_sandbox.rb +42 -10
- data/lib/pwn/plugins/android.rb +429 -466
- data/lib/pwn/plugins/artifact_registry.rb +12 -2
- data/lib/pwn/plugins/assembly.rb +9 -42
- data/lib/pwn/plugins/authentication_helper.rb +4 -3
- data/lib/pwn/plugins/baresip.rb +70 -28
- data/lib/pwn/plugins/binary_analysis.rb +14 -5
- data/lib/pwn/plugins/binary_parser.rb +42 -7
- data/lib/pwn/plugins/black_duck_binary_analysis.rb +3 -3
- data/lib/pwn/plugins/burp_suite.rb +15 -12
- data/lib/pwn/plugins/bus_pirate.rb +3 -7
- data/lib/pwn/plugins/char.rb +9 -3
- data/lib/pwn/plugins/credit_card.rb +7 -0
- data/lib/pwn/plugins/dao_ldap.rb +2 -2
- data/lib/pwn/plugins/dao_mongo.rb +1 -1
- data/lib/pwn/plugins/debugger.rb +1 -1
- data/lib/pwn/plugins/defect_dojo.rb +7 -3
- data/lib/pwn/plugins/detect_os.rb +1 -1
- data/lib/pwn/plugins/detonate.rb +9 -19
- data/lib/pwn/plugins/exploit_db.rb +1 -1
- data/lib/pwn/plugins/file_fu.rb +4 -1
- data/lib/pwn/plugins/findings.rb +76 -2
- data/lib/pwn/plugins/fuzz.rb +12 -3
- data/lib/pwn/plugins/gdb.rb +7 -2
- data/lib/pwn/plugins/gdbmi.rb +10 -6
- data/lib/pwn/plugins/git.rb +18 -13
- data/lib/pwn/plugins/github.rb +11 -6
- data/lib/pwn/plugins/google_workspace.rb +11 -3
- data/lib/pwn/plugins/hacker_one.rb +5 -1
- data/lib/pwn/plugins/httpx.rb +24 -8
- data/lib/pwn/plugins/ip_info.rb +11 -8
- data/lib/pwn/plugins/irc.rb +73 -45
- data/lib/pwn/plugins/jenkins.rb +2 -2
- data/lib/pwn/plugins/jira_data_center.rb +13 -6
- data/lib/pwn/plugins/jobs.rb +62 -4
- data/lib/pwn/plugins/log.rb +1 -1
- data/lib/pwn/plugins/monkey_patch.rb +1 -1
- data/lib/pwn/plugins/msr206.rb +157 -182
- data/lib/pwn/plugins/nessus_cloud.rb +2 -2
- data/lib/pwn/plugins/nexpose_vuln_scan.rb +44 -33
- data/lib/pwn/plugins/nuclei.rb +24 -8
- data/lib/pwn/plugins/ocr.rb +3 -1
- data/lib/pwn/plugins/open_api.rb +0 -4
- data/lib/pwn/plugins/openvas.rb +31 -43
- data/lib/pwn/plugins/packet.rb +40 -25
- data/lib/pwn/plugins/pony.rb +2 -2
- data/lib/pwn/plugins/preflight_checker.rb +1 -1
- data/lib/pwn/plugins/process_tube.rb +17 -2
- data/lib/pwn/plugins/ps.rb +6 -1
- data/lib/pwn/plugins/pwn_logger.rb +37 -1
- data/lib/pwn/plugins/repl/ai.rb +1 -0
- data/lib/pwn/plugins/repl/ai_console.rb +18 -6
- data/lib/pwn/plugins/repl/mesh.rb +51 -28
- data/lib/pwn/plugins/sbom.rb +59 -27
- data/lib/pwn/plugins/scannable_codes.rb +3 -1
- data/lib/pwn/plugins/serial.rb +102 -44
- data/lib/pwn/plugins/shodan.rb +4 -10
- data/lib/pwn/plugins/sock.rb +16 -11
- data/lib/pwn/plugins/ssn.rb +3 -1
- data/lib/pwn/plugins/transparent_browser.rb +43 -3
- data/lib/pwn/plugins/vault.rb +92 -30
- data/lib/pwn/plugins/vin.rb +2 -1
- data/lib/pwn/plugins/vsphere.rb +2 -1
- data/lib/pwn/plugins/xxd.rb +3 -5
- data/lib/pwn/plugins/yubikey/security_domain/scp.rb +4 -0
- data/lib/pwn/plugins/yubikey/transport.rb +42 -11
- data/lib/pwn/plugins/yubikey.rb +21 -6
- data/lib/pwn/plugins/zaproxy.rb +3 -4
- data/lib/pwn/reports/ai_red_team.rb +4 -4
- data/lib/pwn/reports/pdf.rb +9 -5
- data/lib/pwn/reports/sast.rb +4 -4
- data/lib/pwn/sast/keystore.rb +2 -2
- data/lib/pwn/sast/logger.rb +1 -1
- data/lib/pwn/sast/php_type_juggling.rb +3 -6
- data/lib/pwn/sast/pom_version.rb +12 -6
- data/lib/pwn/sast/port.rb +1 -1
- data/lib/pwn/sast/sql.rb +3 -7
- data/lib/pwn/sast/test_case_engine.rb +62 -16
- data/lib/pwn/sast/type_script_type_juggling.rb +3 -6
- data/lib/pwn/sdr/decoder/base.rb +8 -0
- data/lib/pwn/sdr/decoder/lora.rb +1 -1
- data/lib/pwn/sdr/flipper_zero.rb +4 -7
- data/lib/pwn/sdr/gqrx.rb +35 -16
- data/lib/pwn/sdr/son_micro_rfid.rb +44 -26
- data/lib/pwn/sdr.rb +1 -1
- data/lib/pwn/session_trace.rb +7 -2
- data/lib/pwn/sessions.rb +310 -41
- data/lib/pwn/setup.rb +4 -3
- data/lib/pwn/version.rb +1 -1
- data/lib/pwn/www/app_cobalt_io.rb +14 -2
- data/lib/pwn/www/bing.rb +13 -1
- data/lib/pwn/www/bug_crowd.rb +14 -2
- data/lib/pwn/www/checkip.rb +13 -1
- data/lib/pwn/www/coinbase_pro.rb +14 -2
- data/lib/pwn/www/duckduckgo.rb +13 -1
- data/lib/pwn/www/facebook.rb +14 -2
- data/lib/pwn/www/github.rb +14 -2
- data/lib/pwn/www/google.rb +13 -1
- data/lib/pwn/www/hacker_one.rb +117 -33
- data/lib/pwn/www/linkedin.rb +14 -2
- data/lib/pwn/www/pandora.rb +14 -2
- data/lib/pwn/www/pastebin.rb +13 -1
- data/lib/pwn/www/paypal.rb +16 -4
- data/lib/pwn/www/synack.rb +14 -2
- data/lib/pwn/www/torch.rb +17 -3
- data/lib/pwn/www/trading_view.rb +14 -2
- data/lib/pwn/www/twitter.rb +14 -2
- data/lib/pwn/www/uber.rb +14 -2
- data/lib/pwn/www/upwork.rb +14 -2
- data/lib/pwn/www/wayback_machine.rb +16 -2
- data/lib/pwn/www/youtube.rb +13 -1
- data/lib/pwn.rb +11 -0
- data/pwn.gemspec +4 -0
- data/spec/conventions_spec.rb +43 -0
- data/spec/integration/authentication_helper_oath_spec.rb +1 -1
- data/spec/integration/autoinc_lifecycle_supplement_spec.rb +47 -0
- data/spec/integration/gemspec_deleted_files_spec.rb +43 -0
- data/spec/integration/harness_evaluation_spec.rb +22 -31
- data/spec/integration/harness_live_spec.rb +8 -18
- data/spec/integration/spec_curriculum_isolation_spec.rb +41 -0
- data/spec/integration/verify_acceptance_eui_regression_spec.rb +162 -0
- data/spec/integration/web_cache_lifecycle_closure_spec.rb +89 -0
- data/spec/integration/web_cache_lifecycle_supplement_spec.rb +70 -0
- data/spec/lib/pwn/ai/agent/analysis_errors_regression_spec.rb +33 -0
- data/spec/lib/pwn/ai/agent/curriculum_cooldown_regression_spec.rb +19 -0
- data/spec/lib/pwn/ai/agent/curriculum_spec.rb +2 -0
- data/spec/lib/pwn/ai/agent/engagement_boundary_regression_spec.rb +42 -0
- data/spec/lib/pwn/ai/agent/engagement_dispatch_review_spec.rb +82 -0
- data/spec/lib/pwn/ai/agent/engagement_roe_regression_spec.rb +25 -0
- data/spec/lib/pwn/ai/agent/engagement_scope_regression_spec.rb +37 -0
- data/spec/lib/pwn/ai/agent/extrospection/osint/bridges_spec.rb +4 -0
- data/spec/lib/pwn/ai/agent/extrospection_input_regression_spec.rb +31 -0
- data/spec/lib/pwn/ai/agent/extrospection_review_spec.rb +61 -0
- data/spec/lib/pwn/ai/agent/extrospection_serial_review_spec.rb +42 -0
- data/spec/lib/pwn/ai/agent/extrospection_spec.rb +9 -0
- data/spec/lib/pwn/ai/agent/extrospection_verification_regression_spec.rb +39 -0
- data/spec/lib/pwn/ai/agent/learning_last_answer_regression_spec.rb +32 -0
- data/spec/lib/pwn/ai/agent/learning_lifecycle_closure_spec.rb +84 -0
- data/spec/lib/pwn/ai/agent/learning_prune_regression_spec.rb +17 -0
- data/spec/lib/pwn/ai/agent/learning_spec.rb +2 -1
- data/spec/lib/pwn/ai/agent/loop_execution_audit_spec.rb +30 -0
- data/spec/lib/pwn/ai/agent/metrics_usage_regression_spec.rb +20 -0
- data/spec/lib/pwn/ai/agent/mission_execution_audit_spec.rb +27 -0
- data/spec/lib/pwn/ai/agent/mission_namespace_spec.rb +218 -18
- data/spec/lib/pwn/ai/agent/policy_confidence_regression_spec.rb +16 -0
- data/spec/lib/pwn/ai/agent/policy_evaluation_spec.rb +1 -1
- data/spec/lib/pwn/ai/agent/policy_evaluation_tmp_regression_spec.rb +36 -0
- data/spec/lib/pwn/ai/agent/reflect_model_regression_spec.rb +15 -0
- data/spec/lib/pwn/ai/agent/request_runtime_execution_audit_spec.rb +43 -0
- data/spec/lib/pwn/ai/agent/reward_binding_review_spec.rb +129 -0
- data/spec/lib/pwn/ai/agent/reward_dispatch_review_spec.rb +154 -0
- data/spec/lib/pwn/ai/agent/reward_envelope_regression_spec.rb +45 -0
- data/spec/lib/pwn/ai/agent/reward_turn_regression_spec.rb +40 -0
- data/spec/lib/pwn/ai/agent/swarm_spec.rb +2 -2
- data/spec/lib/pwn/ai/agent/task_dag_execution_audit_spec.rb +45 -0
- data/spec/lib/pwn/ai/agent/task_summarizer_failure_regression_spec.rb +26 -0
- data/spec/lib/pwn/ai/agent/tools/verify_execution_audit_spec.rb +33 -0
- data/spec/lib/pwn/ai/context_range_audit_spec.rb +24 -0
- data/spec/lib/pwn/ai/gemini_roundtrip_audit_spec.rb +33 -0
- data/spec/lib/pwn/ai/grok_reasoning_effort_spec.rb +43 -0
- data/spec/lib/pwn/ai/mcp_session_audit_spec.rb +36 -0
- data/spec/lib/pwn/ai/ollama_spec.rb +6 -11
- data/spec/lib/pwn/ai/open_web_ui_spec.rb +6 -11
- data/spec/lib/pwn/ai/provider_history_audit_spec.rb +44 -0
- data/spec/lib/pwn/ai/provider_operations_audit_spec.rb +53 -0
- data/spec/lib/pwn/ai/provider_review_history_stream_regression_spec.rb +143 -0
- data/spec/lib/pwn/ai/provider_review_tls_regression_spec.rb +62 -0
- data/spec/lib/pwn/ai/provider_stream_audit_spec.rb +49 -0
- data/spec/lib/pwn/aws/iam_decoding_regression_spec.rb +23 -0
- data/spec/lib/pwn/aws/services_runtime_regression_spec.rb +51 -0
- data/spec/lib/pwn/aws_spec.rb +6 -0
- data/spec/lib/pwn/banner_operational_audit_spec.rb +105 -0
- data/spec/lib/pwn/bounty/lifecycle_authz_replay_spec.rb +17 -0
- data/spec/lib/pwn/config_redaction_regression_spec.rb +24 -0
- data/spec/lib/pwn/config_skills_regression_spec.rb +38 -0
- data/spec/lib/pwn/corpus_core_review_regression_spec.rb +96 -0
- data/spec/lib/pwn/corpus_spec.rb +13 -0
- data/spec/lib/pwn/cron_core_review_regression_spec.rb +95 -0
- data/spec/lib/pwn/cron_execution_spec.rb +75 -0
- data/spec/lib/pwn/driver_core_review_regression_spec.rb +38 -0
- data/spec/lib/pwn/driver_spec.rb +13 -0
- data/spec/lib/pwn/engagement_core_review_regression_spec.rb +88 -0
- data/spec/lib/pwn/engagement_storage_regression_spec.rb +44 -0
- data/spec/lib/pwn/ffi/capstone_spec.rb +19 -0
- data/spec/lib/pwn/ffi/fftw_spec.rb +19 -0
- data/spec/lib/pwn/ffi/keystone_spec.rb +13 -0
- data/spec/lib/pwn/ffi/soapy_sdr_spec.rb +13 -0
- data/spec/lib/pwn/json_schemer_regexp_parser_spec.rb +12 -0
- data/spec/lib/pwn/json_text_spec.rb +25 -0
- data/spec/lib/pwn/memory_index_spec.rb +23 -0
- data/spec/lib/pwn/module_skills_parsing_regression_spec.rb +34 -0
- data/spec/lib/pwn/module_skills_spec.rb +11 -1
- data/spec/lib/pwn/plugins/ai_sandbox_boundary_review_spec.rb +57 -0
- data/spec/lib/pwn/plugins/ai_sandbox_spec.rb +10 -18
- data/spec/lib/pwn/plugins/android_review_fixes_spec.rb +121 -0
- data/spec/lib/pwn/plugins/android_transport_audit_spec.rb +64 -0
- data/spec/lib/pwn/plugins/api_import_namespace_audit_spec.rb +49 -0
- data/spec/lib/pwn/plugins/artifact_registry_namespace_audit_spec.rb +20 -0
- data/spec/lib/pwn/plugins/artifact_registry_review_fixes_spec.rb +63 -0
- data/spec/lib/pwn/plugins/assembly_namespace_audit_spec.rb +16 -0
- data/spec/lib/pwn/plugins/assembly_review_fixes_spec.rb +33 -0
- data/spec/lib/pwn/plugins/authentication_helper_spec.rb +14 -0
- data/spec/lib/pwn/plugins/baresip_review_fixes_spec.rb +127 -0
- data/spec/lib/pwn/plugins/baresip_transport_audit_spec.rb +59 -0
- data/spec/lib/pwn/plugins/binary_analysis_process_review_spec.rb +57 -0
- data/spec/lib/pwn/plugins/black_duck_namespace_audit_spec.rb +25 -0
- data/spec/lib/pwn/plugins/burp_suite_har_review_fixes_spec.rb +60 -0
- data/spec/lib/pwn/plugins/burp_suite_import_review_fixes_spec.rb +62 -0
- data/spec/lib/pwn/plugins/burp_suite_namespace_audit_spec.rb +37 -0
- data/spec/lib/pwn/plugins/bus_pirate_transport_audit_spec.rb +19 -0
- data/spec/lib/pwn/plugins/file_fu_namespace_audit_spec.rb +17 -0
- data/spec/lib/pwn/plugins/findings_structured_spec.rb +1 -1
- data/spec/lib/pwn/plugins/gdbmi_namespace_audit_spec.rb +28 -0
- data/spec/lib/pwn/plugins/gdbmi_review_fixes_spec.rb +73 -0
- data/spec/lib/pwn/plugins/github_argv_review_spec.rb +49 -0
- data/spec/lib/pwn/plugins/google_workspace_provider_review_oauth_spec.rb +80 -0
- data/spec/lib/pwn/plugins/irc_review_fixes_spec.rb +92 -0
- data/spec/lib/pwn/plugins/irc_transport_audit_spec.rb +37 -0
- data/spec/lib/pwn/plugins/jenkins_namespace_audit_spec.rb +12 -0
- data/spec/lib/pwn/plugins/jira_data_center_namespace_audit_spec.rb +44 -0
- data/spec/lib/pwn/plugins/jira_data_center_review_fixes_spec.rb +81 -0
- data/spec/lib/pwn/plugins/jsonl_elf_review_fixes_spec.rb +59 -0
- data/spec/lib/pwn/plugins/log_spec.rb +36 -20
- data/spec/lib/pwn/plugins/monkey_patch_spec.rb +16 -0
- data/spec/lib/pwn/plugins/msr206_readback_review_fixes_spec.rb +119 -0
- data/spec/lib/pwn/plugins/msr206_review_fixes_spec.rb +50 -0
- data/spec/lib/pwn/plugins/msr206_transport_audit_spec.rb +64 -0
- data/spec/lib/pwn/plugins/nessus_cloud_namespace_audit_spec.rb +14 -0
- data/spec/lib/pwn/plugins/nexpose_review_fixes_spec.rb +55 -0
- data/spec/lib/pwn/plugins/open_api_namespace_audit_spec.rb +22 -0
- data/spec/lib/pwn/plugins/packet_transport_audit_spec.rb +47 -0
- data/spec/lib/pwn/plugins/plugins_b_operational_regression_spec.rb +600 -0
- data/spec/lib/pwn/plugins/pony_namespace_audit_spec.rb +17 -0
- data/spec/lib/pwn/plugins/pony_review_fixes_spec.rb +33 -0
- data/spec/lib/pwn/plugins/process_tube_namespace_audit_spec.rb +19 -0
- data/spec/lib/pwn/plugins/ps_namespace_audit_spec.rb +12 -0
- data/spec/lib/pwn/plugins/pwn_logger_spec.rb +30 -0
- data/spec/lib/pwn/plugins/repl/ai_console_spec.rb +127 -0
- data/spec/lib/pwn/plugins/repl/ai_spec.rb +38 -0
- data/spec/lib/pwn/plugins/repl/mesh_spec.rb +52 -0
- data/spec/lib/pwn/plugins/repl_mesh_rx_errors_spec.rb +18 -0
- data/spec/lib/pwn/plugins/sandbox_spec.rb +9 -7
- data/spec/lib/pwn/plugins/sbom_review_fixes_spec.rb +43 -0
- data/spec/lib/pwn/plugins/scannable_codes_namespace_audit_spec.rb +15 -0
- data/spec/lib/pwn/plugins/serial_review_fixes_spec.rb +76 -0
- data/spec/lib/pwn/plugins/serial_transport_audit_spec.rb +102 -0
- data/spec/lib/pwn/plugins/shodan_namespace_audit_spec.rb +10 -0
- data/spec/lib/pwn/plugins/sock_transport_audit_spec.rb +55 -0
- data/spec/lib/pwn/plugins/transparent_browser_navigation_review_spec.rb +21 -0
- data/spec/lib/pwn/plugins/vault_master_key_eui_regression_spec.rb +242 -0
- data/spec/lib/pwn/plugins/vault_spec.rb +58 -0
- data/spec/lib/pwn/plugins/vault_store_safety_spec.rb +1 -1
- data/spec/lib/pwn/plugins/xxd_namespace_audit_spec.rb +34 -0
- data/spec/lib/pwn/plugins/yubikey_hid_cleanup_review_fixes_spec.rb +52 -0
- data/spec/lib/pwn/plugins/yubikey_lifecycle_audit_spec.rb +65 -0
- data/spec/lib/pwn/plugins/yubikey_options_audit_spec.rb +30 -0
- data/spec/lib/pwn/plugins/yubikey_selector_audit_spec.rb +26 -0
- data/spec/lib/pwn/plugins/yubikey_spec.rb +1 -1
- data/spec/lib/pwn/plugins/zaproxy_namespace_audit_spec.rb +30 -0
- data/spec/lib/pwn/reports/empty_report_audit_spec.rb +18 -0
- data/spec/lib/pwn/reports/pdf_spec.rb +25 -0
- data/spec/lib/pwn/reports/provider_review_encoding_regression_spec.rb +35 -0
- data/spec/lib/pwn/sast/engine_runtime_regression_spec.rb +91 -0
- data/spec/lib/pwn/sast/filter_edge_regression_spec.rb +39 -0
- data/spec/lib/pwn/sast/formatter_review_fixes_spec.rb +178 -0
- data/spec/lib/pwn/sast/path_review_fixes_spec.rb +60 -0
- data/spec/lib/pwn/sast/pom_runtime_regression_spec.rb +37 -0
- data/spec/lib/pwn/sast/rules_runtime_regression_spec.rb +78 -0
- data/spec/lib/pwn/sast/sql_review_fixes_spec.rb +38 -0
- data/spec/lib/pwn/sdr/decoder/base_iq_spec.rb +21 -18
- data/spec/lib/pwn/sdr/decoder/base_review_fixes_spec.rb +49 -0
- data/spec/lib/pwn/sdr/decoder/base_validation_spec.rb +78 -0
- data/spec/lib/pwn/sdr/decoder/lora_spec.rb +9 -0
- data/spec/lib/pwn/sdr/flipper_zero_review_fixes_spec.rb +34 -0
- data/spec/lib/pwn/sdr/gqrx_operational_spec.rb +83 -0
- data/spec/lib/pwn/sdr/gqrx_review_fixes_spec.rb +22 -0
- data/spec/lib/pwn/sdr/son_micro_rfid_review_fixes_spec.rb +113 -0
- data/spec/lib/pwn/sdr/son_micro_rfid_serial_review_fixes_spec.rb +76 -0
- data/spec/lib/pwn/sdr/son_micro_rfid_spec.rb +39 -0
- data/spec/lib/pwn/sdr_spec.rb +5 -0
- data/spec/lib/pwn/session_cleanup_concurrency_spec.rb +21 -0
- data/spec/lib/pwn/session_cleanup_default_spec.rb +1 -1
- data/spec/lib/pwn/session_cleanup_lifecycle_supplement_spec.rb +39 -0
- data/spec/lib/pwn/session_cleanup_payload_spec.rb +3 -2
- data/spec/lib/pwn/session_trace_lifecycle_supplement_spec.rb +39 -0
- data/spec/lib/pwn/sessions_archive_closure_spec.rb +126 -0
- data/spec/lib/pwn/sessions_lifecycle_closure_spec.rb +373 -0
- data/spec/lib/pwn/sessions_lifecycle_supplement_spec.rb +204 -0
- data/spec/lib/pwn/setup_operational_regression_spec.rb +36 -0
- data/spec/lib/pwn/www/browser_review_fixes_spec.rb +70 -0
- data/spec/lib/pwn/www/browser_runtime_regression_spec.rb +100 -0
- data/spec/lib/pwn/www/hacker_one_runtime_regression_spec.rb +146 -0
- data/spec/lib/pwn/www/pagination_review_fixes_spec.rb +84 -0
- data/spec/spec_helper.rb +34 -5
- data/spec/support/namespace_controller_observability_fixture.rb +141 -0
- data/spec/support/sandbox.rb +8 -5
- data/third_party/pwn_rdoc.jsonl +83 -32
- metadata +7690 -7386
- data/etc/default_skills/pwn/aws/elastic_transcoder/SKILL.md +0 -48
- data/etc/default_skills/pwn/aws/lambda_preview/SKILL.md +0 -48
- data/etc/default_skills/pwn/aws/ops_works/SKILL.md +0 -48
- data/etc/default_skills/pwn/aws/ops_works_cm/SKILL.md +0 -48
- data/etc/default_skills/pwn/aws/sms/SKILL.md +0 -48
- data/lib/pwn/aws/elastic_transcoder.rb +0 -95
- data/lib/pwn/aws/lambda_preview.rb +0 -95
- data/lib/pwn/aws/ops_works.rb +0 -95
- data/lib/pwn/aws/ops_works_cm.rb +0 -95
- data/lib/pwn/aws/sms.rb +0 -95
- data/spec/lib/pwn/aws/elastic_transcoder_spec.rb +0 -15
- data/spec/lib/pwn/aws/lambda_preview_spec.rb +0 -15
- data/spec/lib/pwn/aws/ops_works_cm_spec.rb +0 -15
- data/spec/lib/pwn/aws/ops_works_spec.rb +0 -15
- data/spec/lib/pwn/aws/sms_spec.rb +0 -15
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'rest-client'
|
|
5
|
+
|
|
6
|
+
RSpec.describe PWN::AI::Gemini, 'native content round trips' do
|
|
7
|
+
before do
|
|
8
|
+
stub_const('PWN::Env', { ai: { gemini: { model: 'gemini-fixture', key: 'fixture-key' } } })
|
|
9
|
+
allow(PWN::Plugins::TransparentBrowser).to receive(:open).and_return(browser: RestClient)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
[false, true].each do |string_keys|
|
|
13
|
+
it "retains native part metadata and strips only local call IDs (string_keys=#{string_keys})" do
|
|
14
|
+
native = { functionCall: { name: 'fixture_tool', args: { value: 'source' } }, thoughtSignature: 'fixture-signature' }
|
|
15
|
+
requests = []
|
|
16
|
+
allow(RestClient::Request).to receive(:execute) do |args|
|
|
17
|
+
requests << JSON.parse(args.fetch(:payload))
|
|
18
|
+
body = { candidates: [{ content: { parts: [native] } }] }.to_json
|
|
19
|
+
instance_double(RestClient::Response, body: body)
|
|
20
|
+
end
|
|
21
|
+
first = described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }])
|
|
22
|
+
call_id = first.dig(:assistant_message, :tool_calls, 0, :id)
|
|
23
|
+
history = [first[:assistant_message], { role: 'tool', tool_call_id: call_id, content: '{"ok":true}' }]
|
|
24
|
+
history = JSON.parse(JSON.generate(history)) if string_keys
|
|
25
|
+
original = Marshal.dump(history)
|
|
26
|
+
described_class.chat_with_tools(messages: history)
|
|
27
|
+
contents = requests.last.fetch('contents')
|
|
28
|
+
expect(contents.first.fetch('parts')).to eq([JSON.parse(JSON.generate(native))])
|
|
29
|
+
expect(contents.last.dig('parts', 0, 'functionResponse')).to eq('name' => 'fixture_tool', 'response' => { 'ok' => true })
|
|
30
|
+
expect(Marshal.dump(history)).to eq(original)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
RSpec.describe PWN::AI::Grok, 'reasoning effort wire' do
|
|
6
|
+
let(:completion) { { choices: [{ message: { role: 'assistant', content: 'ok' } }] }.to_json }
|
|
7
|
+
|
|
8
|
+
before do
|
|
9
|
+
allow(PWN::AI::HttpRetry).to receive(:provider_config).and_return(
|
|
10
|
+
model: 'grok-4.6', temp: 1, system_role_content: 'fixture', max_prompt_length: 256_000
|
|
11
|
+
)
|
|
12
|
+
allow(PWN::AI::Agent::PromptCache).to receive(:enabled?).and_return(false)
|
|
13
|
+
allow(described_class).to receive(:grok_rest_call).and_return(completion)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'maps reasoning_effort none to low for grok-4.6 chat' do
|
|
17
|
+
described_class.chat(request: 'title', model: 'grok-4.6', reasoning_effort: 'none', quiet: true, spinner: false)
|
|
18
|
+
expect(described_class).to have_received(:grok_rest_call).with(
|
|
19
|
+
hash_including(http_body: hash_including(model: 'grok-4.6', reasoning_effort: 'low'))
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it 'maps reasoning_effort none to low for grok-4.7 chat' do
|
|
24
|
+
described_class.chat(request: 'title', model: 'grok-4.7', reasoning_effort: 'none', quiet: true, spinner: false)
|
|
25
|
+
expect(described_class).to have_received(:grok_rest_call).with(
|
|
26
|
+
hash_including(http_body: hash_including(model: 'grok-4.7', reasoning_effort: 'low'))
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'omits reasoning_effort none for a Grok model with no effort menu' do
|
|
31
|
+
described_class.chat(request: 'title', model: 'grok-4', reasoning_effort: 'none', quiet: true, spinner: false)
|
|
32
|
+
expect(described_class).to have_received(:grok_rest_call).with(
|
|
33
|
+
hash_including(http_body: satisfy { |body| !body.key?(:reasoning_effort) })
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'keeps an explicit supported effort' do
|
|
38
|
+
described_class.chat(request: 'title', model: 'grok-4.6', reasoning_effort: 'high', quiet: true, spinner: false)
|
|
39
|
+
expect(described_class).to have_received(:grok_rest_call).with(
|
|
40
|
+
hash_including(http_body: hash_including(reasoning_effort: 'high'))
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
RSpec.describe PWN::AI::MCP, 'backend-bound sessions' do
|
|
6
|
+
before do
|
|
7
|
+
described_class.reset!
|
|
8
|
+
%w[AuditOne AuditTwo].each do |name|
|
|
9
|
+
backend = Module.new
|
|
10
|
+
backend.define_singleton_method(:connect) { |_opts| {} }
|
|
11
|
+
backend.define_singleton_method(:disconnect) { |_opts| {} }
|
|
12
|
+
backend.define_singleton_method(:list_tools) { |_opts| [] }
|
|
13
|
+
backend.define_singleton_method(:call_tool) { |_opts| { parsed: 'fixture' } }
|
|
14
|
+
stub_const("PWN::AI::MCP::#{name}", backend)
|
|
15
|
+
end
|
|
16
|
+
described_class.connect(backend: 'audit_one', session_id: 'shared-fixture')
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
after { described_class.reset! }
|
|
20
|
+
|
|
21
|
+
%i[connect list_tools call_tool disconnect].each do |operation|
|
|
22
|
+
it "rejects #{operation} for a session belonging to another explicit backend" do
|
|
23
|
+
expect(PWN::AI::MCP::AuditOne).not_to receive(:call_tool)
|
|
24
|
+
expect(PWN::AI::MCP::AuditOne).not_to receive(:list_tools)
|
|
25
|
+
expect do
|
|
26
|
+
described_class.public_send(operation, backend: 'audit_two', session_id: 'shared-fixture', name: 'echo')
|
|
27
|
+
end.to raise_error(ArgumentError, /session.*audit_one.*audit_two/i)
|
|
28
|
+
expect(described_class.invoke(action: 'status', session_id: 'shared-fixture')).to include(connected: true, backend: 'audit_one')
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it 'allows explicit force reconnect and leaves the new backend usable' do
|
|
33
|
+
expect(described_class.connect(backend: 'audit_two', session_id: 'shared-fixture', force: true)).to include(backend: 'audit_two')
|
|
34
|
+
expect(described_class.call_tool(session_id: 'shared-fixture', name: 'echo')).to include(backend: 'audit_two', parsed: 'fixture')
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -165,7 +165,7 @@ describe PWN::AI::Ollama do
|
|
|
165
165
|
]
|
|
166
166
|
sse_lines = chunks.map { |c| "data: #{JSON.generate(c)}" }
|
|
167
167
|
sse_lines << 'data: [DONE]'
|
|
168
|
-
body = "#{sse_lines.join("\n")}\n"
|
|
168
|
+
body = "#{sse_lines.join("\n\n")}\n\n"
|
|
169
169
|
|
|
170
170
|
out = described_class.send(
|
|
171
171
|
:assemble_ollama_stream,
|
|
@@ -212,7 +212,7 @@ describe PWN::AI::Ollama do
|
|
|
212
212
|
]
|
|
213
213
|
sse_lines = chunks.map { |c| "data: #{JSON.generate(c)}" }
|
|
214
214
|
sse_lines << 'data: [DONE]'
|
|
215
|
-
body = "#{sse_lines.join("\n")}\n"
|
|
215
|
+
body = "#{sse_lines.join("\n\n")}\n\n"
|
|
216
216
|
|
|
217
217
|
out = described_class.send(
|
|
218
218
|
:assemble_ollama_stream,
|
|
@@ -292,15 +292,10 @@ describe PWN::AI::Ollama do
|
|
|
292
292
|
end.to raise_error(RuntimeError, /empty response|ERROR/)
|
|
293
293
|
end
|
|
294
294
|
|
|
295
|
-
it '
|
|
296
|
-
|
|
297
|
-
:assemble_ollama_stream,
|
|
298
|
-
|
|
299
|
-
rest_call: 'ollama/api/chat'
|
|
300
|
-
)
|
|
301
|
-
parsed = JSON.parse(out, symbolize_names: true)
|
|
302
|
-
expect(parsed[:done_reason]).to eq('error')
|
|
303
|
-
expect(parsed.dig(:message, :error)).to eq('empty_stream_payloads')
|
|
295
|
+
it 'rejects empty stream payloads instead of inventing a terminal message' do
|
|
296
|
+
expect do
|
|
297
|
+
described_class.send(:assemble_ollama_stream, body: '', rest_call: 'ollama/api/chat')
|
|
298
|
+
end.to raise_error(RuntimeError, /incomplete stream.*no payloads/)
|
|
304
299
|
end
|
|
305
300
|
|
|
306
301
|
it 'normalizes string function.arguments into objects before ollama_rest_call' do
|
|
@@ -171,7 +171,7 @@ describe PWN::AI::OpenWebUI do
|
|
|
171
171
|
]
|
|
172
172
|
sse_lines = chunks.map { |c| "data: #{JSON.generate(c)}" }
|
|
173
173
|
sse_lines << 'data: [DONE]'
|
|
174
|
-
body = "#{sse_lines.join("\n")}\n"
|
|
174
|
+
body = "#{sse_lines.join("\n\n")}\n\n"
|
|
175
175
|
|
|
176
176
|
out = described_class.send(
|
|
177
177
|
:assemble_openwebui_stream,
|
|
@@ -218,7 +218,7 @@ describe PWN::AI::OpenWebUI do
|
|
|
218
218
|
]
|
|
219
219
|
sse_lines = chunks.map { |c| "data: #{JSON.generate(c)}" }
|
|
220
220
|
sse_lines << 'data: [DONE]'
|
|
221
|
-
body = "#{sse_lines.join("\n")}\n"
|
|
221
|
+
body = "#{sse_lines.join("\n\n")}\n\n"
|
|
222
222
|
|
|
223
223
|
out = described_class.send(
|
|
224
224
|
:assemble_openwebui_stream,
|
|
@@ -298,15 +298,10 @@ describe PWN::AI::OpenWebUI do
|
|
|
298
298
|
end.to raise_error(RuntimeError, /empty response|ERROR/)
|
|
299
299
|
end
|
|
300
300
|
|
|
301
|
-
it '
|
|
302
|
-
|
|
303
|
-
:assemble_openwebui_stream,
|
|
304
|
-
|
|
305
|
-
rest_call: 'api/chat'
|
|
306
|
-
)
|
|
307
|
-
parsed = JSON.parse(out, symbolize_names: true)
|
|
308
|
-
expect(parsed[:done_reason]).to eq('error')
|
|
309
|
-
expect(parsed.dig(:message, :error)).to eq('empty_stream_payloads')
|
|
301
|
+
it 'rejects empty stream payloads instead of inventing a terminal message' do
|
|
302
|
+
expect do
|
|
303
|
+
described_class.send(:assemble_openwebui_stream, body: '', rest_call: 'api/chat')
|
|
304
|
+
end.to raise_error(RuntimeError, /incomplete stream.*no payloads/)
|
|
310
305
|
end
|
|
311
306
|
|
|
312
307
|
it 'normalizes string function.arguments into objects before openwebui_rest_call' do
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'rest-client'
|
|
5
|
+
require 'net/http'
|
|
6
|
+
|
|
7
|
+
{ PWN::AI::OpenWebUI => :openwebui, PWN::AI::Ollama => :ollama }.each do |provider, key|
|
|
8
|
+
RSpec.describe provider, 'history without token usage' do
|
|
9
|
+
it 'continues the history returned by an SSE response with no usage frame' do
|
|
10
|
+
stub_const('PWN::Env', { ai: { key => { model: 'fixture-history', key: 'fixture-key', base_uri: 'https://example.test' } } })
|
|
11
|
+
allow(PWN::Plugins::TransparentBrowser).to receive(:open).and_return(browser: RestClient)
|
|
12
|
+
described_class.instance_variable_set(:@strict_system_cache, nil)
|
|
13
|
+
payloads = []
|
|
14
|
+
allow(RestClient::Request).to receive(:execute) do |args|
|
|
15
|
+
if args[:url].end_with?('/show')
|
|
16
|
+
'{}'
|
|
17
|
+
else
|
|
18
|
+
payloads << JSON.parse(args.fetch(:payload))
|
|
19
|
+
response = instance_double(Net::HTTPResponse, code: '200')
|
|
20
|
+
stream = "data: #{JSON.generate(choices: [{ delta: { role: 'assistant', content: 'Fixture answer' }, finish_reason: 'stop' }])}\n\ndata: [DONE]\n\n"
|
|
21
|
+
allow(response).to receive(:read_body).and_yield(stream)
|
|
22
|
+
args.fetch(:block_response).call(response)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
first = described_class.chat(request: 'First fixture request')
|
|
26
|
+
expect(first).not_to have_key(:usage)
|
|
27
|
+
second = described_class.chat(request: 'Second fixture request', response_history: first)
|
|
28
|
+
expect(second[:choices].last).to include(role: 'assistant', content: 'Fixture answer')
|
|
29
|
+
expect(payloads.last.fetch('messages').map { |row| row['content'] }).to include('First fixture request', 'Fixture answer', 'Second fixture request')
|
|
30
|
+
ensure
|
|
31
|
+
described_class.instance_variable_set(:@strict_system_cache, nil)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
RSpec.describe PWN::AI::Grok, 'quiet transport failure' do
|
|
37
|
+
it 'preserves transport exceptions instead of masking them with NoMethodError' do
|
|
38
|
+
stub_const('PWN::Env', { ai: { grok: { model: 'fixture', key: 'fixture-key' } } })
|
|
39
|
+
allow(PWN::Plugins::TransparentBrowser).to receive(:open).and_return(browser: RestClient)
|
|
40
|
+
failure = IOError.new('fixture transport failure')
|
|
41
|
+
allow(RestClient::Request).to receive(:execute).and_raise(failure)
|
|
42
|
+
expect { described_class.chat(request: 'fixture', quiet: true) }.to(raise_error { |error| expect(error).to equal(failure) })
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'rest-client'
|
|
5
|
+
require 'tmpdir'
|
|
6
|
+
|
|
7
|
+
RSpec.describe PWN::AI::OpenAI, 'file API regressions' do
|
|
8
|
+
before do
|
|
9
|
+
stub_const('PWN::Env', { ai: { openai: { model: 'gpt-4o', key: 'fixture-key' } } })
|
|
10
|
+
allow(PWN::Plugins::TransparentBrowser).to receive(:open).and_return(browser: RestClient)
|
|
11
|
+
allow(RestClient::Request).to receive(:execute).and_raise('Unexpected fixture HTTP request')
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
describe 'provider failure propagation' do
|
|
15
|
+
[false, true].each do |quiet|
|
|
16
|
+
%i[chat chat_with_tools].each do |operation|
|
|
17
|
+
it "preserves an HTTP rejection for #{operation} (quiet=#{quiet})" do
|
|
18
|
+
response = instance_double(RestClient::Response, code: 400, body: 'fixture invalid schema', to_s: 'fixture invalid schema')
|
|
19
|
+
failure = RestClient::BadRequest.new(response)
|
|
20
|
+
allow(RestClient::Request).to receive(:execute).and_raise(failure)
|
|
21
|
+
args = operation == :chat ? { request: 'fixture' } : { messages: [{ role: 'user', content: 'fixture' }] }
|
|
22
|
+
expect { described_class.public_send(operation, args.merge(quiet: quiet)) }.to raise_error(RestClient::BadRequest) { |error|
|
|
23
|
+
expect(error).to equal(failure)
|
|
24
|
+
expect(error.response).to equal(response)
|
|
25
|
+
expect(error.message).to include('OpenAI', '400', 'fixture invalid schema')
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it 'preserves a transport error in quiet mode instead of calling its absent response method' do
|
|
32
|
+
failure = IOError.new('fixture connection interrupted')
|
|
33
|
+
allow(RestClient::Request).to receive(:execute).and_raise(failure)
|
|
34
|
+
expect { described_class.chat(request: 'fixture', quiet: true) }.to(raise_error { |error| expect(error).to equal(failure) })
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
%i[get_file delete_file].each do |operation|
|
|
39
|
+
it "#{operation} resolves the uploaded filename and forwards the timeout" do
|
|
40
|
+
Dir.mktmpdir('provider-file-audit-') do |dir|
|
|
41
|
+
path = File.join(dir, 'training.jsonl')
|
|
42
|
+
File.write(path, "{}\n")
|
|
43
|
+
expect(RestClient::Request).to receive(:execute).with(hash_including(method: :get, url: 'https://api.openai.com/v1/files', timeout: 7)).ordered.and_return(
|
|
44
|
+
{ data: [{ filename: 'other.jsonl', id: 'file-other' }, { filename: 'training.jsonl', id: 'file-fixture' }] }.to_json
|
|
45
|
+
)
|
|
46
|
+
expect(RestClient::Request).to receive(:execute).with(hash_including(method: operation == :delete_file ? :delete : :get, url: 'https://api.openai.com/v1/files/file-fixture', timeout: 7)).ordered.and_return(
|
|
47
|
+
{ id: 'file-fixture' }.to_json
|
|
48
|
+
)
|
|
49
|
+
expect(described_class.public_send(operation, file: path, timeout: 7)).to eq(id: 'file-fixture')
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'rest-client'
|
|
5
|
+
require 'net/http'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
RSpec.shared_context 'provider review synthetic stream transport' do |key|
|
|
9
|
+
before do
|
|
10
|
+
stub_const('PWN::Env', { ai: { key => { model: 'fixture', key: 'fixture-key', base_uri: 'https://example.invalid', system_role_content: 'FIXTURE SYSTEM' } } })
|
|
11
|
+
allow(PWN::Plugins::TransparentBrowser).to receive(:open).and_return(browser: RestClient)
|
|
12
|
+
described_class.instance_variable_set(:@strict_system_cache, nil)
|
|
13
|
+
@show = JSON.generate(template: "raise_exception('System message must be at the beginning')")
|
|
14
|
+
@stream = "data: #{JSON.generate(choices: [{ delta: { content: 'Fixture answer' }, finish_reason: 'stop' }])}\n\ndata: [DONE]\n\n"
|
|
15
|
+
@wire = []
|
|
16
|
+
@status = '200'
|
|
17
|
+
allow_any_instance_of(Net::HTTP).to receive(:start) { |http, &block| block.call(http) }
|
|
18
|
+
allow_any_instance_of(Net::HTTP).to receive(:request) do |_http, request, body = nil, &block|
|
|
19
|
+
payload = request.body_stream ? request.body_stream.read : (body || request.body)
|
|
20
|
+
@wire << { path: request.path, body: payload }
|
|
21
|
+
content = request.path.end_with?('/show') ? @show : @stream
|
|
22
|
+
code = request.path.end_with?('/show') ? '200' : @status
|
|
23
|
+
io = Net::BufferedIO.new(StringIO.new("HTTP/1.1 #{code} Fixture\r\nContent-Length: #{content.bytesize}\r\n\r\n#{content}"))
|
|
24
|
+
response = Net::HTTPResponse.read_new(io)
|
|
25
|
+
response.reading_body(io, true) { block&.call(response) }
|
|
26
|
+
response
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
after { described_class.instance_variable_set(:@strict_system_cache, nil) }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
{ PWN::AI::Ollama => :ollama, PWN::AI::OpenWebUI => :openwebui }.each do |provider, key|
|
|
34
|
+
RSpec.describe provider, 'PR-LOG-02 stream framing' do
|
|
35
|
+
include_context 'provider review synthetic stream transport', key
|
|
36
|
+
|
|
37
|
+
["\n", "\r\n", "\r"].each do |newline|
|
|
38
|
+
it "joins multiline SSE data at event boundaries with #{newline.inspect}" do
|
|
39
|
+
@stream = [': heartbeat', '', 'id: fixture', 'event: message', 'retry: 1000',
|
|
40
|
+
'data: {"choices":', 'data: [{"delta":{"content":"Complete"},"finish_reason":"length"}],',
|
|
41
|
+
'data: "usage":{"total_tokens":7}}', '', 'data: [DONE]', '', ''].join(newline)
|
|
42
|
+
result = described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1)
|
|
43
|
+
expect(result.dig(:assistant_message, :content)).to eq('Complete')
|
|
44
|
+
expect(result.dig(:choices, 0, :finish_reason)).to eq('length')
|
|
45
|
+
expect(result.dig(:usage, :total_tokens)).to eq(7)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'preserves a multiline SSE error and provider endpoint instead of partial output' do
|
|
50
|
+
@stream = +"data: {\"choices\":[{\"delta\":{\"content\":\"partial\"}}]}\n\n"
|
|
51
|
+
@stream << "data: {\"error\":\ndata: {\"message\":\"fixture backend failed\"}}\n\ndata: [DONE]\n\n"
|
|
52
|
+
expect { described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1) }.to raise_error(RuntimeError, /stream error.*chat.*fixture backend failed/)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it 'preserves an earlier provider error even when a later SSE event is incomplete' do
|
|
56
|
+
@stream = "data: {\"error\":{\"message\":\"fixture original failure\"}}\n\ndata: {truncated"
|
|
57
|
+
expect { described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1) }.to raise_error(RuntimeError, /stream error.*fixture original failure/)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
it 'honors an SSE error event without a redundant error wrapper' do
|
|
61
|
+
@stream = "event: error\ndata: {\"message\":\"fixture event rejected\"}\n\n"
|
|
62
|
+
expect { described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1) }.to raise_error(RuntimeError, /stream error.*fixture event rejected/)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
["{\"message\":{\"content\":\"partial\"},\"done\":false}\n{\"error\":\"truncated",
|
|
66
|
+
"{\"message\":{\"content\":\"partial\"},\"done\":false}\n",
|
|
67
|
+
"{\"message\":{\"content\":\"partial\"},\"done\":\"true\"}\n",
|
|
68
|
+
"{\"message\":{\"content\":\"partial\"},\"done\":true}\n{\"done\":false}\n",
|
|
69
|
+
"{\"message\":{\"content\":\"partial\"},\"done\":true}\ngarbage\n",
|
|
70
|
+
"{\"done\":true}\n",
|
|
71
|
+
"{\"message\":\"not an object\",\"done\":true}\n",
|
|
72
|
+
"[]\n"].each_with_index do |stream, index|
|
|
73
|
+
it "rejects malformed or incomplete native stream #{index}" do
|
|
74
|
+
@stream = stream
|
|
75
|
+
expect { described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1) }.to raise_error(RuntimeError, /(?:malformed|incomplete).*stream.*chat/)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
["data: {\"choices\":[{\"delta\":{\"content\":\"partial\"}}]}\n\n",
|
|
80
|
+
"data: {\"choices\":[{\"delta\":{\"content\":\"partial\"}}]}\n\ndata: {bad}\n\ndata: [DONE]\n\n",
|
|
81
|
+
"data: {\"choices\":[{\"delta\":{\"content\":\"partial\"}}]}\n\ndata: [DONE]"].each_with_index do |stream, index|
|
|
82
|
+
it "rejects malformed or incomplete SSE stream #{index}" do
|
|
83
|
+
@stream = stream
|
|
84
|
+
expect { described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1) }.to raise_error(RuntimeError, /(?:malformed|incomplete).*stream.*chat/)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
it 'keeps the JSON parse exception as the cause of a malformed record' do
|
|
89
|
+
@stream = "{\"message\":{\"content\":\"partial\"},\"done\":false}\n{bad}\n"
|
|
90
|
+
expect { described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1) }.to raise_error(RuntimeError, /malformed.*stream.*chat/) do |error|
|
|
91
|
+
expect(error.cause).to be_a(JSON::ParserError)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
it 'preserves a complete native terminal record without a final newline' do
|
|
96
|
+
@stream = "{\"message\":{\"content\":\"complete\"},\"done\":false}\n{\"done\":true,\"done_reason\":\"length\",\"eval_count\":7}"
|
|
97
|
+
result = described_class.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1)
|
|
98
|
+
expect(result).to include(done: true, done_reason: 'length', eval_count: 7)
|
|
99
|
+
expect(result.dig(:assistant_message, :content)).to eq('complete')
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
RSpec.describe provider, 'PR-LOG-01 strict-template history' do
|
|
104
|
+
include_context 'provider review synthetic stream transport', key
|
|
105
|
+
|
|
106
|
+
[false, true].each do |frozen_history|
|
|
107
|
+
[false, true].each do |string_keys|
|
|
108
|
+
it "folds once over three turns without mutating history (frozen=#{frozen_history}, string_keys=#{string_keys})" do
|
|
109
|
+
first = described_class.chat(request: 'First request', timeout: 1)
|
|
110
|
+
first = JSON.parse(JSON.generate(first)) if string_keys
|
|
111
|
+
if frozen_history
|
|
112
|
+
freeze_tree = lambda do |value|
|
|
113
|
+
if value.is_a?(Hash)
|
|
114
|
+
value.each do |k, v|
|
|
115
|
+
freeze_tree.call(k)
|
|
116
|
+
freeze_tree.call(v)
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
value.each { |v| freeze_tree.call(v) } if value.is_a?(Array)
|
|
120
|
+
value.freeze
|
|
121
|
+
end
|
|
122
|
+
freeze_tree.call(first)
|
|
123
|
+
end
|
|
124
|
+
original = Marshal.dump(first)
|
|
125
|
+
second = described_class.chat(request: 'Second request', response_history: first, timeout: 1)
|
|
126
|
+
expect(Marshal.dump(first)).to eq(original)
|
|
127
|
+
second_original = Marshal.dump(second)
|
|
128
|
+
third = described_class.chat(request: 'Third request', response_history: second, timeout: 1)
|
|
129
|
+
expect(Marshal.dump(second)).to eq(second_original)
|
|
130
|
+
users = third[:choices].select { |row| (row[:role] || row['role']) == 'user' }
|
|
131
|
+
expect(users.map { |row| row[:content] || row['content'] }).to eq(["FIXTURE SYSTEM\n\nFirst request", 'Second request', 'Third request'])
|
|
132
|
+
requests = @wire.reject { |row| row[:path].end_with?('/show') }
|
|
133
|
+
expect(requests.length).to eq(3)
|
|
134
|
+
requests.each do |row|
|
|
135
|
+
messages = JSON.parse(row[:body]).fetch('messages')
|
|
136
|
+
expect(messages.none? { |m| %w[system developer].include?(m['role']) }).to be(true)
|
|
137
|
+
expect(messages.first.fetch('content')).to eq("FIXTURE SYSTEM\n\nFirst request")
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'rest-client'
|
|
5
|
+
require 'net/http'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
{
|
|
9
|
+
PWN::AI::OpenAI => %i[openai open_ai_rest_call],
|
|
10
|
+
PWN::AI::Gemini => %i[gemini gemini_rest_call],
|
|
11
|
+
PWN::AI::Grok => %i[grok grok_rest_call],
|
|
12
|
+
PWN::AI::Anthropic => %i[anthropic anthropic_rest_call],
|
|
13
|
+
PWN::AI::Ollama => %i[ollama ollama_rest_call],
|
|
14
|
+
PWN::AI::OpenWebUI => %i[openwebui openwebui_rest_call]
|
|
15
|
+
}.each do |provider, (key, helper)|
|
|
16
|
+
RSpec.describe provider, 'PR-SEC-01 peer verification' do
|
|
17
|
+
before do
|
|
18
|
+
stub_const('PWN::Env', { ai: { key => { model: 'fixture', key: 'fixture-key', base_uri: 'https://example.invalid' } } })
|
|
19
|
+
allow(PWN::Plugins::TransparentBrowser).to receive(:open).and_return(browser: RestClient)
|
|
20
|
+
@modes = []
|
|
21
|
+
allow_any_instance_of(Net::HTTP).to receive(:start) do |http, &block|
|
|
22
|
+
@modes << http.verify_mode
|
|
23
|
+
block.call(http)
|
|
24
|
+
end
|
|
25
|
+
allow_any_instance_of(Net::HTTP).to receive(:request) do |_http, _request, _body = nil, &block|
|
|
26
|
+
body = '{"models":[],"data":[],"message":{"role":"assistant","content":"ok"},"done":true}'
|
|
27
|
+
io = Net::BufferedIO.new(StringIO.new("HTTP/1.1 200 OK\r\nContent-Length: #{body.bytesize}\r\n\r\n#{body}"))
|
|
28
|
+
response = Net::HTTPResponse.read_new(io)
|
|
29
|
+
response.reading_body(io, true) { block&.call(response) }
|
|
30
|
+
response
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'authenticates HTTPS model-list peers through installed RestClient' do
|
|
35
|
+
described_class.get_models
|
|
36
|
+
expect(@modes).not_to be_empty
|
|
37
|
+
expect(@modes).to all(eq(OpenSSL::SSL::VERIFY_PEER))
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
[{}, { multipart: true, fixture: 'value' }, { stream: true }].each do |body|
|
|
41
|
+
next if key == :gemini && body.key?(:multipart)
|
|
42
|
+
|
|
43
|
+
it "authenticates HTTPS POST peers for #{body.keys.inspect}" do
|
|
44
|
+
described_class.send(helper, rest_call: 'fixture', http_method: :post, http_body: body, timeout: 1)
|
|
45
|
+
expect(@modes).to eq([OpenSSL::SSL::VERIFY_PEER])
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'propagates certificate rejection without an insecure fallback' do
|
|
50
|
+
error = OpenSSL::SSL::SSLError.new('fixture certificate verify failed')
|
|
51
|
+
allow_any_instance_of(Net::HTTP).to receive(:start) do |http|
|
|
52
|
+
@modes << http.verify_mode
|
|
53
|
+
raise error
|
|
54
|
+
end
|
|
55
|
+
expect { described_class.get_models }.to raise_error(RestClient::SSLCertificateNotVerified, /fixture certificate verify failed/) do |raised|
|
|
56
|
+
expect(raised.cause).to equal(error)
|
|
57
|
+
end
|
|
58
|
+
expect(@modes).not_to be_empty
|
|
59
|
+
expect(@modes).to all(eq(OpenSSL::SSL::VERIFY_PEER))
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'rest-client'
|
|
5
|
+
require 'net/http'
|
|
6
|
+
|
|
7
|
+
{
|
|
8
|
+
PWN::AI::Ollama => :ollama,
|
|
9
|
+
PWN::AI::OpenWebUI => :openwebui
|
|
10
|
+
}.each do |provider, key|
|
|
11
|
+
RSpec.describe provider, 'stream error regressions' do
|
|
12
|
+
before do
|
|
13
|
+
stub_const('PWN::Env', { ai: { key => { model: 'fixture', key: 'fixture-key', base_uri: 'https://example.test' } } })
|
|
14
|
+
allow(PWN::Plugins::TransparentBrowser).to receive(:open).and_return(browser: RestClient)
|
|
15
|
+
provider.instance_variable_set(:@strict_system_cache, nil)
|
|
16
|
+
allow(RestClient::Request).to receive(:execute) do |args|
|
|
17
|
+
if args[:url].end_with?('/show')
|
|
18
|
+
'{}'
|
|
19
|
+
else
|
|
20
|
+
response = instance_double(Net::HTTPResponse, code: '200')
|
|
21
|
+
allow(response).to receive(:read_body).and_yield(@stream)
|
|
22
|
+
args.fetch(:block_response).call(response)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
after { provider.instance_variable_set(:@strict_system_cache, nil) }
|
|
28
|
+
|
|
29
|
+
['fixture backend failed', { message: 'fixture backend failed', type: 'server_error' }].each do |error|
|
|
30
|
+
it "does not convert a native #{error.class} error frame to successful partial output" do
|
|
31
|
+
@stream = [
|
|
32
|
+
{ message: { role: 'assistant', content: 'Partial answer' }, done: false }.to_json,
|
|
33
|
+
{ error: error }.to_json
|
|
34
|
+
].join("\n")
|
|
35
|
+
expect do
|
|
36
|
+
provider.chat_with_tools(messages: [{ role: 'user', content: 'fixture' }], timeout: 1)
|
|
37
|
+
end.to raise_error(RuntimeError, /#{key == :ollama ? 'Ollama' : 'Open WebUI'}.*fixture backend failed/)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
if key == :openwebui
|
|
42
|
+
it 'preserves an SSE provider error instead of returning a successful partial answer' do
|
|
43
|
+
@stream = "data: #{JSON.generate(choices: [{ delta: { content: 'Partial' } }])}\n\n"
|
|
44
|
+
@stream << "data: #{JSON.generate(error: { message: 'fixture backend failed' })}\n\n"
|
|
45
|
+
expect { provider.chat(request: 'fixture', timeout: 1) }.to raise_error(RuntimeError, /Open WebUI.*fixture backend failed/)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'base64'
|
|
5
|
+
|
|
6
|
+
RSpec.describe PWN::AWS::IAM, 'key decoding regressions' do
|
|
7
|
+
%i[secret_access_key sts_session_token].each do |type|
|
|
8
|
+
it "preserves case-sensitive Base64 bytes for #{type}" do
|
|
9
|
+
bytes = "fixture\x00payload\xff".b
|
|
10
|
+
encoded = Base64.strict_encode64(bytes)
|
|
11
|
+
result = described_class.decode_key(key: encoded, key_type: type)
|
|
12
|
+
expect(result[:decoded_key]).to eq(bytes)
|
|
13
|
+
expect(result[:key_type]).to eq(type)
|
|
14
|
+
expect(encoded).to eq(Base64.strict_encode64(bytes))
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'keeps access-key Base32 decoding case-insensitive' do
|
|
19
|
+
suffix = "#{[0x800000000080].pack('Q>').byteslice(2, 6)}seed"
|
|
20
|
+
key = "AKIA#{Base32.encode(suffix)}"
|
|
21
|
+
expect(described_class.decode_key(key: key.downcase)).to eq(described_class.decode_key(key: key))
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'aws-sdk'
|
|
5
|
+
|
|
6
|
+
RSpec.describe 'AWS service runtime regressions' do
|
|
7
|
+
before do
|
|
8
|
+
allow(Aws).to receive(:shared_config).and_return(
|
|
9
|
+
Aws::SharedConfig.new(config_enabled: false, credentials_path: File::NULL, config_path: File::NULL)
|
|
10
|
+
)
|
|
11
|
+
allow(Aws).to receive(:config).and_return(stub_responses: true)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
(PWN::AWS.constants(false) - [:STS]).sort.each do |name|
|
|
15
|
+
[nil, 'fixture-session'].each do |token|
|
|
16
|
+
it "constructs #{name} with #{token ? 'temporary' : 'static'} credentials using the installed SDK" do
|
|
17
|
+
sdk_name = name == :Workspaces ? :WorkSpaces : name
|
|
18
|
+
sdk_class = Aws.const_get(sdk_name)::Client
|
|
19
|
+
options = {
|
|
20
|
+
region: 'us-east-1', access_key_id: 'fixture-access', secret_access_key: 'fixture-secret',
|
|
21
|
+
sts_session_token: token
|
|
22
|
+
}
|
|
23
|
+
options[:endpoint] = 'https://search-fixture.us-east-1.cloudsearch.amazonaws.com' if name == :CloudSearchDomain
|
|
24
|
+
client = PWN::AWS.const_get(name).connect(options)
|
|
25
|
+
expect(client).to be_a(sdk_class)
|
|
26
|
+
expect(client.config.access_key_id).to eq('fixture-access')
|
|
27
|
+
expect(client.config.secret_access_key).to eq('fixture-secret')
|
|
28
|
+
expect(client.config.session_token).to eq(token)
|
|
29
|
+
expect(client.config.endpoint.to_s).to eq(options[:endpoint]) if options[:endpoint]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'preserves an SDK-configured CloudSearch endpoint when no wrapper override is supplied' do
|
|
35
|
+
endpoint = 'https://search-fixture.us-east-1.cloudsearch.amazonaws.com'
|
|
36
|
+
allow(Aws).to receive(:config).and_return(stub_responses: true, endpoint: endpoint)
|
|
37
|
+
client = PWN::AWS::CloudSearchDomain.connect(region: 'us-east-1', access_key_id: 'fixture-access', secret_access_key: 'fixture-secret')
|
|
38
|
+
expect(client.config.endpoint.to_s).to eq(endpoint)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it 'returns the STS credentials and forwards assume-role arguments to a stubbed SDK client' do
|
|
42
|
+
client = Aws::STS::Client.new(region: 'us-east-1', credentials: Aws::Credentials.new('fixture-access', 'fixture-secret'), stub_responses: true)
|
|
43
|
+
client.stub_responses(:assume_role, credentials: {
|
|
44
|
+
access_key_id: 'fixture-temporary', secret_access_key: 'fixture-secret', session_token: 'fixture-token', expiration: Time.utc(2030, 1, 1)
|
|
45
|
+
})
|
|
46
|
+
allow(Aws::STS::Client).to receive(:new).with(region: 'us-east-1').and_return(client)
|
|
47
|
+
result = PWN::AWS::STS.get_temp_credentials(region: 'us-east-1', role_arn: 'arn:aws:iam::123456789012:role/fixture', role_session_name: 'fixture', duration_seconds: 900)
|
|
48
|
+
expect(result.access_key_id).to eq('fixture-temporary')
|
|
49
|
+
expect(client.api_requests.last[:params]).to eq(role_arn: 'arn:aws:iam::123456789012:role/fixture', role_session_name: 'fixture', duration_seconds: 900)
|
|
50
|
+
end
|
|
51
|
+
end
|
data/spec/lib/pwn/aws_spec.rb
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
require 'spec_helper'
|
|
4
4
|
|
|
5
5
|
describe PWN::AWS do
|
|
6
|
+
it 'does not advertise the removed legacy service wrappers' do
|
|
7
|
+
%i[ElasticTranscoder LambdaPreview OpsWorks OpsWorksCM SMS].each do |name|
|
|
8
|
+
expect(described_class.const_defined?(name, false)).to be(false)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
6
12
|
it 'should return data for help method' do
|
|
7
13
|
help_response = PWN::AWS.help
|
|
8
14
|
expect(help_response).not_to be_nil
|