From de6ba6d63d0bffbc71d9648a50155a7b4383f306 Mon Sep 17 00:00:00 2001 From: Joas A Santos <34966120+CyberSecurityUP@users.noreply.github.com> Date: Fri, 4 Dec 2026 11:52:58 -0300 Subject: [PATCH] feat(skills): scope skills by engagement mode, cover 152 more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit load_catalog loads all ten category directories whatever the engagement is, and route never looked at a skill's category. So giving code_sqli the trigger "sql" would have launched a source-review agent during a black-box web run against a target with no source to read, and the AD skills would have fired on any recon mentioning ldap or smb. Add a `modes` field. A skill that names its modes runs only in those; one that names none runs anywhere, which is what the 91 skills from the previous change rely on. The mode comes from the same string each site already passes to the coverage ledger. Frontmatter for 152 more skills, 179 chain edges: recon discovery feeders, container image scanning, Active Directory, Linux and Windows local privesc, AWS, GCP and Azure, and the 84 source-review skills scoped to whitebox and greybox. 243 of 530 now carry it. Priority was being added unconditionally, so any skill at priority >= 30 scored 15 with nothing matching and cleared the gate on an empty recon. The field documents itself as ordering skills that are "equally triggered" — a tiebreaker — so it now applies only once a skill has matched. An anti-flooding test on meaningless recon caught this. Six tests on the catalogue on disk: that a web run never picks source-review or host skills, that whitebox and host runs do reach theirs, that nothing fires on meaningless recon in any mode, and that every chain edge resolves. The generator refuses triggers under two characters or on a stoplist of terms too common to discriminate, which rejected five on the first pass. Co-Authored-By: Claude Opus 5 --- agents_md/code/code_auth_flaws.md | 7 + agents_md/code/code_command_injection.md | 7 + agents_md/code/code_committed_secret.md | 7 + agents_md/code/code_cors_credentials.md | 6 + agents_md/code/code_cors_misconfig.md | 7 + agents_md/code/code_csrf_disabled.md | 6 + agents_md/code/code_csrf_missing.md | 6 + agents_md/code/code_debug_enabled.md | 6 + agents_md/code/code_dom_xss_sinks.md | 6 + agents_md/code/code_dotnet_deser.md | 6 + agents_md/code/code_eval_js_src.md | 6 + agents_md/code/code_file_perms.md | 6 + agents_md/code/code_file_upload.md | 6 + agents_md/code/code_go_cmd_exec.md | 6 + agents_md/code/code_go_ssrf.md | 6 + agents_md/code/code_graphql_depth.md | 6 + agents_md/code/code_graphql_introspection.md | 6 + agents_md/code/code_hardcoded_crypto_key.md | 6 + agents_md/code/code_hardcoded_secrets.md | 7 + agents_md/code/code_header_injection.md | 6 + agents_md/code/code_idor_access.md | 7 + agents_md/code/code_idor_owner.md | 6 + agents_md/code/code_insecure_cookie.md | 6 + .../code/code_insecure_deserialization.md | 6 + agents_md/code/code_insecure_random.md | 6 + agents_md/code/code_insecure_random_token.md | 6 + agents_md/code/code_insecure_tls.md | 6 + agents_md/code/code_java_deser.md | 7 + agents_md/code/code_jwt_misuse.md | 7 + agents_md/code/code_jwt_none_alg.md | 6 + agents_md/code/code_ldap_injection_src.md | 6 + agents_md/code/code_logging_sensitive.md | 6 + agents_md/code/code_mass_assignment.md | 7 + agents_md/code/code_mass_assignment_rails.md | 6 + agents_md/code/code_missing_authz.md | 6 + agents_md/code/code_missing_ratelimit.md | 6 + agents_md/code/code_node_child_process.md | 6 + agents_md/code/code_node_path.md | 6 + agents_md/code/code_nosql_injection.md | 6 + agents_md/code/code_open_redirect.md | 6 + agents_md/code/code_open_redirect_src.md | 6 + agents_md/code/code_orm_raw_sql.md | 6 + agents_md/code/code_path_traversal.md | 7 + agents_md/code/code_php_assert.md | 6 + agents_md/code/code_php_lfi.md | 6 + agents_md/code/code_php_type_juggling.md | 6 + agents_md/code/code_php_unserialize.md | 6 + agents_md/code/code_prototype_pollution.md | 6 + agents_md/code/code_py_flask_debug.md | 6 + agents_md/code/code_py_pickle.md | 6 + agents_md/code/code_py_subprocess.md | 6 + agents_md/code/code_py_yaml.md | 6 + agents_md/code/code_race_condition.md | 6 + agents_md/code/code_react_dangerous_html.md | 6 + agents_md/code/code_redos.md | 6 + agents_md/code/code_session_fixation_src.md | 6 + agents_md/code/code_spring_el.md | 6 + agents_md/code/code_sql_format_string.md | 6 + agents_md/code/code_sql_orm_raw.md | 6 + agents_md/code/code_sqli.md | 7 + agents_md/code/code_ssrf.md | 7 + agents_md/code/code_ssrf_redirect.md | 6 + agents_md/code/code_ssrf_webhook.md | 6 + agents_md/code/code_ssti_server.md | 6 + agents_md/code/code_template_injection.md | 6 + agents_md/code/code_toctou.md | 6 + agents_md/code/code_unsafe_eval.md | 6 + .../code/code_unvalidated_upload_type.md | 6 + agents_md/code/code_weak_crypto.md | 7 + agents_md/code/code_weak_jwt_secret.md | 6 + agents_md/code/code_weak_password_hash.md | 6 + agents_md/code/code_xpath_injection_src.md | 6 + agents_md/code/code_xss.md | 7 + agents_md/code/code_xstream_deser.md | 6 + agents_md/code/code_xxe.md | 6 + agents_md/code/code_xxe_lxml.md | 6 + agents_md/code/code_zip_slip_src.md | 6 + agents_md/code/research_attack_surface_map.md | 7 + .../research_dependency_nday_reachability.md | 7 + agents_md/code/research_known_cve_dedup.md | 6 + agents_md/code/research_logic_authz_flaw.md | 7 + agents_md/code/research_patch_diff_variant.md | 7 + .../code/research_source_to_sink_taint.md | 7 + agents_md/container/image_misconfig_scan.md | 7 + agents_md/container/image_sbom_generate.md | 7 + agents_md/container/image_secret_scan.md | 7 + agents_md/container/image_vuln_scan.md | 7 + agents_md/infra/ad_acl_privesc.md | 7 + agents_md/infra/ad_adcs_esc.md | 7 + agents_md/infra/ad_asreproasting.md | 7 + agents_md/infra/ad_bloodhound_paths.md | 7 + agents_md/infra/ad_coerce_auth.md | 7 + agents_md/infra/ad_critical_cve.md | 7 + agents_md/infra/ad_dcsync.md | 7 + agents_md/infra/ad_default_creds.md | 7 + agents_md/infra/ad_dpapi_looting.md | 7 + agents_md/infra/ad_gpo_abuse.md | 7 + agents_md/infra/ad_kerberoasting.md | 7 + agents_md/infra/ad_kerberos_delegation.md | 7 + agents_md/infra/ad_laps_gmsa_read.md | 7 + agents_md/infra/ad_llmnr_poisoning.md | 7 + agents_md/infra/ad_mssql_abuse.md | 7 + agents_md/infra/ad_ntlm_relay.md | 7 + agents_md/infra/ad_password_spray.md | 7 + agents_md/infra/ad_persistence_review.md | 6 + agents_md/infra/ad_pth_ptt.md | 7 + agents_md/infra/ad_recon_enum.md | 7 + agents_md/infra/ad_smb_share_hunt.md | 7 + agents_md/infra/ad_trust_abuse.md | 7 + agents_md/infra/aws_compute_exposure.md | 7 + agents_md/infra/aws_iam_privesc.md | 7 + agents_md/infra/aws_identity_scope.md | 7 + agents_md/infra/aws_lambda_review.md | 7 + agents_md/infra/aws_s3_exposure.md | 7 + agents_md/infra/aws_secrets_exposure.md | 7 + agents_md/infra/azure_compute_identity.md | 7 + agents_md/infra/azure_entra_enum.md | 7 + agents_md/infra/azure_keyvault_access.md | 7 + agents_md/infra/azure_rbac_privesc.md | 7 + agents_md/infra/azure_storage_exposure.md | 7 + agents_md/infra/cloud_recon_footprint.md | 7 + agents_md/infra/eol_os_service.md | 7 + agents_md/infra/eol_tls_protocol.md | 7 + agents_md/infra/eol_webserver_exploitation.md | 7 + agents_md/infra/gcp_compute_exposure.md | 7 + agents_md/infra/gcp_iam_privesc.md | 7 + agents_md/infra/gcp_secrets_functions.md | 7 + agents_md/infra/gcp_serviceaccount_keys.md | 7 + agents_md/infra/gcp_storage_exposure.md | 7 + agents_md/infra/infra_port_service_scan.md | 7 + agents_md/infra/infra_smb_enum.md | 7 + agents_md/infra/linux_cron_writable.md | 7 + agents_md/infra/linux_kernel_vuln_hunt.md | 7 + agents_md/infra/linux_priv_esc.md | 7 + agents_md/infra/linux_ssh_weak_auth.md | 7 + agents_md/infra/linux_sudo_misconfig.md | 7 + .../infra/windows_binary_harvest_analyze.md | 7 + agents_md/infra/windows_priv_esc.md | 7 + agents_md/infra/windows_smb_signing.md | 7 + agents_md/infra/windows_winrm_access.md | 7 + agents_md/recon/api_discovery.md | 7 + agents_md/recon/cloud_asset_discovery.md | 7 + agents_md/recon/content_discovery.md | 7 + agents_md/recon/dns_recon.md | 7 + agents_md/recon/graphql_discovery.md | 7 + agents_md/recon/js_analysis.md | 7 + agents_md/recon/osint_employee.md | 7 + agents_md/recon/parameter_discovery.md | 7 + agents_md/recon/secret_scanning.md | 7 + agents_md/recon/subdomain_enum.md | 7 + agents_md/recon/tech_fingerprint.md | 7 + agents_md/recon/waf_cdn_detection.md | 7 + neurosploit-rs/crates/harness/src/pipeline.rs | 14 +- neurosploit-rs/crates/harness/src/skill.rs | 152 +++++++++++++++++- 154 files changed, 1155 insertions(+), 10 deletions(-) diff --git a/agents_md/code/code_auth_flaws.md b/agents_md/code/code_auth_flaws.md index 620e3f2..444877b 100644 --- a/agents_md/code/code_auth_flaws.md +++ b/agents_md/code/code_auth_flaws.md @@ -1,3 +1,10 @@ +--- +triggers: login, authenticate, session +chains: code_missing_authz, code_session_fixation_src +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Authentication/Authorization Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_command_injection.md b/agents_md/code/code_command_injection.md index e6d3564..39f1aa4 100644 --- a/agents_md/code/code_command_injection.md +++ b/agents_md/code/code_command_injection.md @@ -1,3 +1,10 @@ +--- +triggers: exec, system(, shell, subprocess +chains: research_source_to_sink_taint, code_file_perms +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Command Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_committed_secret.md b/agents_md/code/code_committed_secret.md index cde81e7..ec285d0 100644 --- a/agents_md/code/code_committed_secret.md +++ b/agents_md/code/code_committed_secret.md @@ -1,3 +1,10 @@ +--- +triggers: password, secret, private_key, .env +chains: code_weak_jwt_secret +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Committed-Secret Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_cors_credentials.md b/agents_md/code/code_cors_credentials.md index 08472a5..8235fbc 100644 --- a/agents_md/code/code_cors_credentials.md +++ b/agents_md/code/code_cors_credentials.md @@ -1,3 +1,9 @@ +--- +triggers: cors, credentials, origin +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source CORS-with-Credentials Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_cors_misconfig.md b/agents_md/code/code_cors_misconfig.md index 9f3d513..b0c3eee 100644 --- a/agents_md/code/code_cors_misconfig.md +++ b/agents_md/code/code_cors_misconfig.md @@ -1,3 +1,10 @@ +--- +triggers: cors, access-control-allow-origin +chains: code_cors_credentials +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source CORS Misconfiguration Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_csrf_disabled.md b/agents_md/code/code_csrf_disabled.md index 9ad7ddf..b734fa4 100644 --- a/agents_md/code/code_csrf_disabled.md +++ b/agents_md/code/code_csrf_disabled.md @@ -1,3 +1,9 @@ +--- +triggers: csrf, disable, exempt +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source CSRF-Disabled Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_csrf_missing.md b/agents_md/code/code_csrf_missing.md index 040743c..09c8c6b 100644 --- a/agents_md/code/code_csrf_missing.md +++ b/agents_md/code/code_csrf_missing.md @@ -1,3 +1,9 @@ +--- +triggers: csrf, form, mutation +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source CSRF Protection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_debug_enabled.md b/agents_md/code/code_debug_enabled.md index b0d0ec9..13b60a1 100644 --- a/agents_md/code/code_debug_enabled.md +++ b/agents_md/code/code_debug_enabled.md @@ -1,3 +1,9 @@ +--- +triggers: debug, development, verbose +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Debug-Mode Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_dom_xss_sinks.md b/agents_md/code/code_dom_xss_sinks.md index 33bf9ad..e98be25 100644 --- a/agents_md/code/code_dom_xss_sinks.md +++ b/agents_md/code/code_dom_xss_sinks.md @@ -1,3 +1,9 @@ +--- +triggers: innerhtml, document.write, javascript +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source DOM XSS Sink Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_dotnet_deser.md b/agents_md/code/code_dotnet_deser.md index 17b12e2..027c06a 100644 --- a/agents_md/code/code_dotnet_deser.md +++ b/agents_md/code/code_dotnet_deser.md @@ -1,3 +1,9 @@ +--- +triggers: binaryformatter, .net, c# +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source .NET Deserialization Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_eval_js_src.md b/agents_md/code/code_eval_js_src.md index 53b89bb..1829e21 100644 --- a/agents_md/code/code_eval_js_src.md +++ b/agents_md/code/code_eval_js_src.md @@ -1,3 +1,9 @@ +--- +triggers: eval(, javascript, settimeout +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source JS eval/Function Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_file_perms.md b/agents_md/code/code_file_perms.md index 80ec8db..46b50ba 100644 --- a/agents_md/code/code_file_perms.md +++ b/agents_md/code/code_file_perms.md @@ -1,3 +1,9 @@ +--- +triggers: chmod, 0777, permission +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Insecure File Permissions Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_file_upload.md b/agents_md/code/code_file_upload.md index f25b133..b8dfa6d 100644 --- a/agents_md/code/code_file_upload.md +++ b/agents_md/code/code_file_upload.md @@ -1,3 +1,9 @@ +--- +triggers: upload, multipart, formdata +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source File Upload Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_go_cmd_exec.md b/agents_md/code/code_go_cmd_exec.md index a64f8b9..ddd6f8c 100644 --- a/agents_md/code/code_go_cmd_exec.md +++ b/agents_md/code/code_go_cmd_exec.md @@ -1,3 +1,9 @@ +--- +triggers: golang, os/exec, go.mod +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Go Command-Exec Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_go_ssrf.md b/agents_md/code/code_go_ssrf.md index c61b908..2bbbce7 100644 --- a/agents_md/code/code_go_ssrf.md +++ b/agents_md/code/code_go_ssrf.md @@ -1,3 +1,9 @@ +--- +triggers: golang, go.mod, http.get +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Go SSRF Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_graphql_depth.md b/agents_md/code/code_graphql_depth.md index 6dc8b5e..17b694a 100644 --- a/agents_md/code/code_graphql_depth.md +++ b/agents_md/code/code_graphql_depth.md @@ -1,3 +1,9 @@ +--- +triggers: graphql, depth, complexity +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source GraphQL Complexity Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_graphql_introspection.md b/agents_md/code/code_graphql_introspection.md index 3be629c..6797928 100644 --- a/agents_md/code/code_graphql_introspection.md +++ b/agents_md/code/code_graphql_introspection.md @@ -1,3 +1,9 @@ +--- +triggers: graphql, introspection, schema +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source GraphQL Introspection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_hardcoded_crypto_key.md b/agents_md/code/code_hardcoded_crypto_key.md index 67ad8e7..59c46b7 100644 --- a/agents_md/code/code_hardcoded_crypto_key.md +++ b/agents_md/code/code_hardcoded_crypto_key.md @@ -1,3 +1,9 @@ +--- +triggers: key =, iv =, cipher +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Hardcoded Crypto Key Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_hardcoded_secrets.md b/agents_md/code/code_hardcoded_secrets.md index 9a69bfc..1cec30a 100644 --- a/agents_md/code/code_hardcoded_secrets.md +++ b/agents_md/code/code_hardcoded_secrets.md @@ -1,3 +1,10 @@ +--- +triggers: password =, apikey, secret =, token = +chains: code_committed_secret, code_hardcoded_crypto_key +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Hardcoded Secrets Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_header_injection.md b/agents_md/code/code_header_injection.md index b47706a..86d25ff 100644 --- a/agents_md/code/code_header_injection.md +++ b/agents_md/code/code_header_injection.md @@ -1,3 +1,9 @@ +--- +triggers: setheader, header(, addheader +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source HTTP Header Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_idor_access.md b/agents_md/code/code_idor_access.md index 62a8eeb..2fa0ebd 100644 --- a/agents_md/code/code_idor_access.md +++ b/agents_md/code/code_idor_access.md @@ -1,3 +1,10 @@ +--- +triggers: findbyid, params[:id], req.params +chains: code_idor_owner, code_missing_authz +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source IDOR / Access Control Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_idor_owner.md b/agents_md/code/code_idor_owner.md index 8bade5f..34c14ff 100644 --- a/agents_md/code/code_idor_owner.md +++ b/agents_md/code/code_idor_owner.md @@ -1,3 +1,9 @@ +--- +triggers: owner, user_id, belongs_to +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source IDOR Ownership Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_insecure_cookie.md b/agents_md/code/code_insecure_cookie.md index 8998161..e52e72c 100644 --- a/agents_md/code/code_insecure_cookie.md +++ b/agents_md/code/code_insecure_cookie.md @@ -1,3 +1,9 @@ +--- +triggers: cookie, httponly, secure, samesite +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Insecure Cookie Flags Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_insecure_deserialization.md b/agents_md/code/code_insecure_deserialization.md index 934d442..e2cf2ff 100644 --- a/agents_md/code/code_insecure_deserialization.md +++ b/agents_md/code/code_insecure_deserialization.md @@ -1,3 +1,9 @@ +--- +triggers: serialize, deserialize, marshal +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Insecure Deserialization Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_insecure_random.md b/agents_md/code/code_insecure_random.md index c08cf1c..b8fcebc 100644 --- a/agents_md/code/code_insecure_random.md +++ b/agents_md/code/code_insecure_random.md @@ -1,3 +1,9 @@ +--- +triggers: math.random, random(), rand() +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Insecure Randomness Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_insecure_random_token.md b/agents_md/code/code_insecure_random_token.md index 413c234..1b2df74 100644 --- a/agents_md/code/code_insecure_random_token.md +++ b/agents_md/code/code_insecure_random_token.md @@ -1,3 +1,9 @@ +--- +triggers: random, token, uuid +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Insecure Token Randomness Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_insecure_tls.md b/agents_md/code/code_insecure_tls.md index bb79a52..3d29494 100644 --- a/agents_md/code/code_insecure_tls.md +++ b/agents_md/code/code_insecure_tls.md @@ -1,3 +1,9 @@ +--- +triggers: verify=false, insecureskipverify, tls +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source TLS Verification Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_java_deser.md b/agents_md/code/code_java_deser.md index 672f722..215fd4d 100644 --- a/agents_md/code/code_java_deser.md +++ b/agents_md/code/code_java_deser.md @@ -1,3 +1,10 @@ +--- +triggers: java, objectinputstream, readobject +chains: code_xstream_deser, research_dependency_nday_reachability +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Java Deserialization Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_jwt_misuse.md b/agents_md/code/code_jwt_misuse.md index 21c39de..1b82f76 100644 --- a/agents_md/code/code_jwt_misuse.md +++ b/agents_md/code/code_jwt_misuse.md @@ -1,3 +1,10 @@ +--- +triggers: jwt, verify, decode +chains: code_jwt_none_alg, code_weak_jwt_secret +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source JWT Misuse Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_jwt_none_alg.md b/agents_md/code/code_jwt_none_alg.md index 63dd273..48023bc 100644 --- a/agents_md/code/code_jwt_none_alg.md +++ b/agents_md/code/code_jwt_none_alg.md @@ -1,3 +1,9 @@ +--- +triggers: jwt, algorithm, none +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source JWT alg=none Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_ldap_injection_src.md b/agents_md/code/code_ldap_injection_src.md index 1c96b6c..a427407 100644 --- a/agents_md/code/code_ldap_injection_src.md +++ b/agents_md/code/code_ldap_injection_src.md @@ -1,3 +1,9 @@ +--- +triggers: ldap, search, filter +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source LDAP Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_logging_sensitive.md b/agents_md/code/code_logging_sensitive.md index 55141af..a7ffecb 100644 --- a/agents_md/code/code_logging_sensitive.md +++ b/agents_md/code/code_logging_sensitive.md @@ -1,3 +1,9 @@ +--- +triggers: logger, console.log, password +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Sensitive Logging Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_mass_assignment.md b/agents_md/code/code_mass_assignment.md index d13fce0..7a92332 100644 --- a/agents_md/code/code_mass_assignment.md +++ b/agents_md/code/code_mass_assignment.md @@ -1,3 +1,10 @@ +--- +triggers: body, params, update(, assign +chains: code_mass_assignment_rails, code_missing_authz +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Mass Assignment Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_mass_assignment_rails.md b/agents_md/code/code_mass_assignment_rails.md index db97138..002f80a 100644 --- a/agents_md/code/code_mass_assignment_rails.md +++ b/agents_md/code/code_mass_assignment_rails.md @@ -1,3 +1,9 @@ +--- +triggers: rails, permit, strong_parameters +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Rails Mass-Assignment Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_missing_authz.md b/agents_md/code/code_missing_authz.md index 9d23d0b..864f8ca 100644 --- a/agents_md/code/code_missing_authz.md +++ b/agents_md/code/code_missing_authz.md @@ -1,3 +1,9 @@ +--- +triggers: authorize, permission, role +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Function-Level Authorization Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_missing_ratelimit.md b/agents_md/code/code_missing_ratelimit.md index 11b51cb..e57095c 100644 --- a/agents_md/code/code_missing_ratelimit.md +++ b/agents_md/code/code_missing_ratelimit.md @@ -1,3 +1,9 @@ +--- +triggers: ratelimit, throttle, login +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Missing Rate-Limit Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_node_child_process.md b/agents_md/code/code_node_child_process.md index 8f6da82..17bdc74 100644 --- a/agents_md/code/code_node_child_process.md +++ b/agents_md/code/code_node_child_process.md @@ -1,3 +1,9 @@ +--- +triggers: child_process, node, exec, spawn +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Node child_process Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_node_path.md b/agents_md/code/code_node_path.md index 9c3850d..6116290 100644 --- a/agents_md/code/code_node_path.md +++ b/agents_md/code/code_node_path.md @@ -1,3 +1,9 @@ +--- +triggers: path.join, node, fs.read +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Node Path-Traversal Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_nosql_injection.md b/agents_md/code/code_nosql_injection.md index 86836f0..18a20c1 100644 --- a/agents_md/code/code_nosql_injection.md +++ b/agents_md/code/code_nosql_injection.md @@ -1,3 +1,9 @@ +--- +triggers: mongo, nosql, mongoose +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source NoSQL Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_open_redirect.md b/agents_md/code/code_open_redirect.md index c442f32..0bee128 100644 --- a/agents_md/code/code_open_redirect.md +++ b/agents_md/code/code_open_redirect.md @@ -1,3 +1,9 @@ +--- +triggers: redirect, location, next= +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Open Redirect Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_open_redirect_src.md b/agents_md/code/code_open_redirect_src.md index 417f7bf..4c0e709 100644 --- a/agents_md/code/code_open_redirect_src.md +++ b/agents_md/code/code_open_redirect_src.md @@ -1,3 +1,9 @@ +--- +triggers: redirect, sendredirect +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Open Redirect Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_orm_raw_sql.md b/agents_md/code/code_orm_raw_sql.md index d3589ad..0cdc737 100644 --- a/agents_md/code/code_orm_raw_sql.md +++ b/agents_md/code/code_orm_raw_sql.md @@ -1,3 +1,9 @@ +--- +triggers: orm, raw, django, rails +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source ORM Raw-Query Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_path_traversal.md b/agents_md/code/code_path_traversal.md index 2302393..5205391 100644 --- a/agents_md/code/code_path_traversal.md +++ b/agents_md/code/code_path_traversal.md @@ -1,3 +1,10 @@ +--- +triggers: path.join, readfile, os.path, ../ +chains: code_file_upload, code_zip_slip_src +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Path Traversal Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_php_assert.md b/agents_md/code/code_php_assert.md index 1136cc6..50ae2eb 100644 --- a/agents_md/code/code_php_assert.md +++ b/agents_md/code/code_php_assert.md @@ -1,3 +1,9 @@ +--- +triggers: php, assert( +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source PHP assert/eval Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_php_lfi.md b/agents_md/code/code_php_lfi.md index 5e3a0ab..241c0a7 100644 --- a/agents_md/code/code_php_lfi.md +++ b/agents_md/code/code_php_lfi.md @@ -1,3 +1,9 @@ +--- +triggers: php, include(, require( +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source PHP File-Inclusion Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_php_type_juggling.md b/agents_md/code/code_php_type_juggling.md index 3c96b7f..ed3ad8a 100644 --- a/agents_md/code/code_php_type_juggling.md +++ b/agents_md/code/code_php_type_juggling.md @@ -1,3 +1,9 @@ +--- +triggers: php, ==, strcmp +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source PHP Type-Juggling Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_php_unserialize.md b/agents_md/code/code_php_unserialize.md index 3789b7f..9d33988 100644 --- a/agents_md/code/code_php_unserialize.md +++ b/agents_md/code/code_php_unserialize.md @@ -1,3 +1,9 @@ +--- +triggers: php, unserialize +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source PHP Unserialize Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_prototype_pollution.md b/agents_md/code/code_prototype_pollution.md index f504b4c..f6f19d0 100644 --- a/agents_md/code/code_prototype_pollution.md +++ b/agents_md/code/code_prototype_pollution.md @@ -1,3 +1,9 @@ +--- +triggers: merge, extend, lodash, javascript +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Prototype Pollution Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_py_flask_debug.md b/agents_md/code/code_py_flask_debug.md index ff0efcd..67f1445 100644 --- a/agents_md/code/code_py_flask_debug.md +++ b/agents_md/code/code_py_flask_debug.md @@ -1,3 +1,9 @@ +--- +triggers: flask, debug=true, python +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Flask Debug/SSTI Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_py_pickle.md b/agents_md/code/code_py_pickle.md index a9555bc..36e8734 100644 --- a/agents_md/code/code_py_pickle.md +++ b/agents_md/code/code_py_pickle.md @@ -1,3 +1,9 @@ +--- +triggers: pickle, python, loads +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Python Pickle Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_py_subprocess.md b/agents_md/code/code_py_subprocess.md index f85dfc7..8aa978b 100644 --- a/agents_md/code/code_py_subprocess.md +++ b/agents_md/code/code_py_subprocess.md @@ -1,3 +1,9 @@ +--- +triggers: subprocess, python, os.system +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Python subprocess(shell) Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_py_yaml.md b/agents_md/code/code_py_yaml.md index 8d4defb..915ba13 100644 --- a/agents_md/code/code_py_yaml.md +++ b/agents_md/code/code_py_yaml.md @@ -1,3 +1,9 @@ +--- +triggers: yaml, python, safe_load +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Python YAML Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_race_condition.md b/agents_md/code/code_race_condition.md index 5a1fba7..40af1c7 100644 --- a/agents_md/code/code_race_condition.md +++ b/agents_md/code/code_race_condition.md @@ -1,3 +1,9 @@ +--- +triggers: goroutine, thread, async, lock +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Race Condition Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_react_dangerous_html.md b/agents_md/code/code_react_dangerous_html.md index d694d46..93bd139 100644 --- a/agents_md/code/code_react_dangerous_html.md +++ b/agents_md/code/code_react_dangerous_html.md @@ -1,3 +1,9 @@ +--- +triggers: react, dangerouslysetinnerhtml, jsx +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source React dangerouslySetInnerHTML Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_redos.md b/agents_md/code/code_redos.md index 6dacf08..56008cc 100644 --- a/agents_md/code/code_redos.md +++ b/agents_md/code/code_redos.md @@ -1,3 +1,9 @@ +--- +triggers: regex, regexp, pattern +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source ReDoS Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_session_fixation_src.md b/agents_md/code/code_session_fixation_src.md index a06f898..2a033a1 100644 --- a/agents_md/code/code_session_fixation_src.md +++ b/agents_md/code/code_session_fixation_src.md @@ -1,3 +1,9 @@ +--- +triggers: session, regenerate, login +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Session Fixation Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_spring_el.md b/agents_md/code/code_spring_el.md index d83f246..fc2f6a2 100644 --- a/agents_md/code/code_spring_el.md +++ b/agents_md/code/code_spring_el.md @@ -1,3 +1,9 @@ +--- +triggers: spring, java, spel +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Spring EL Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_sql_format_string.md b/agents_md/code/code_sql_format_string.md index 5b27fb7..2a05404 100644 --- a/agents_md/code/code_sql_format_string.md +++ b/agents_md/code/code_sql_format_string.md @@ -1,3 +1,9 @@ +--- +triggers: sql, format, f-string, concat +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source SQL Format-String Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_sql_orm_raw.md b/agents_md/code/code_sql_orm_raw.md index 5289dc5..4841723 100644 --- a/agents_md/code/code_sql_orm_raw.md +++ b/agents_md/code/code_sql_orm_raw.md @@ -1,3 +1,9 @@ +--- +triggers: orm, raw, sequelize, hibernate +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source ORM Raw-Query Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_sqli.md b/agents_md/code/code_sqli.md index 002568a..68baf62 100644 --- a/agents_md/code/code_sqli.md +++ b/agents_md/code/code_sqli.md @@ -1,3 +1,10 @@ +--- +triggers: sql, query, select , execute( +chains: code_sql_format_string, code_sql_orm_raw, research_source_to_sink_taint +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source SQL Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_ssrf.md b/agents_md/code/code_ssrf.md index bd6a826..3c2c0cb 100644 --- a/agents_md/code/code_ssrf.md +++ b/agents_md/code/code_ssrf.md @@ -1,3 +1,10 @@ +--- +triggers: requests.get, fetch(, httpclient, curl +chains: code_ssrf_webhook, code_ssrf_redirect +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source SSRF Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_ssrf_redirect.md b/agents_md/code/code_ssrf_redirect.md index 6e0ad63..cef51e7 100644 --- a/agents_md/code/code_ssrf_redirect.md +++ b/agents_md/code/code_ssrf_redirect.md @@ -1,3 +1,9 @@ +--- +triggers: redirect, follow, location +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source SSRF-via-Redirect Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_ssrf_webhook.md b/agents_md/code/code_ssrf_webhook.md index d5ab83f..8bd1c01 100644 --- a/agents_md/code/code_ssrf_webhook.md +++ b/agents_md/code/code_ssrf_webhook.md @@ -1,3 +1,9 @@ +--- +triggers: webhook, callback, notify +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Webhook SSRF Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_ssti_server.md b/agents_md/code/code_ssti_server.md index 6b19bef..7219f6b 100644 --- a/agents_md/code/code_ssti_server.md +++ b/agents_md/code/code_ssti_server.md @@ -1,3 +1,9 @@ +--- +triggers: template, render, jinja, twig +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Server-Side Template Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_template_injection.md b/agents_md/code/code_template_injection.md index 796f34f..cb4c651 100644 --- a/agents_md/code/code_template_injection.md +++ b/agents_md/code/code_template_injection.md @@ -1,3 +1,9 @@ +--- +triggers: template, render_template +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Template Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_toctou.md b/agents_md/code/code_toctou.md index 583d8c2..e1482e5 100644 --- a/agents_md/code/code_toctou.md +++ b/agents_md/code/code_toctou.md @@ -1,3 +1,9 @@ +--- +triggers: exists, stat, open( +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source TOCTOU/Race Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_unsafe_eval.md b/agents_md/code/code_unsafe_eval.md index b4c09bc..4557ffb 100644 --- a/agents_md/code/code_unsafe_eval.md +++ b/agents_md/code/code_unsafe_eval.md @@ -1,3 +1,9 @@ +--- +triggers: eval(, new function, exec( +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Unsafe Eval Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_unvalidated_upload_type.md b/agents_md/code/code_unvalidated_upload_type.md index afd7e45..b54c45f 100644 --- a/agents_md/code/code_unvalidated_upload_type.md +++ b/agents_md/code/code_unvalidated_upload_type.md @@ -1,3 +1,9 @@ +--- +triggers: upload, mimetype, content-type +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Upload Content-Type Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_weak_crypto.md b/agents_md/code/code_weak_crypto.md index bf7138f..f7ef9e9 100644 --- a/agents_md/code/code_weak_crypto.md +++ b/agents_md/code/code_weak_crypto.md @@ -1,3 +1,10 @@ +--- +triggers: md5, sha1, des, rc4 +chains: code_weak_password_hash, code_insecure_random +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Weak Cryptography Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_weak_jwt_secret.md b/agents_md/code/code_weak_jwt_secret.md index 983a193..a56c53f 100644 --- a/agents_md/code/code_weak_jwt_secret.md +++ b/agents_md/code/code_weak_jwt_secret.md @@ -1,3 +1,9 @@ +--- +triggers: jwt, secret, sign( +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Weak JWT Secret Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_weak_password_hash.md b/agents_md/code/code_weak_password_hash.md index cd4534f..a957c31 100644 --- a/agents_md/code/code_weak_password_hash.md +++ b/agents_md/code/code_weak_password_hash.md @@ -1,3 +1,9 @@ +--- +triggers: md5, sha1, bcrypt, hash +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Weak Password Hashing Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_xpath_injection_src.md b/agents_md/code/code_xpath_injection_src.md index 5d9b69f..2ae8cc6 100644 --- a/agents_md/code/code_xpath_injection_src.md +++ b/agents_md/code/code_xpath_injection_src.md @@ -1,3 +1,9 @@ +--- +triggers: xpath, xml, evaluate +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source XPath Injection Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_xss.md b/agents_md/code/code_xss.md index 75fe4a5..f1ad42c 100644 --- a/agents_md/code/code_xss.md +++ b/agents_md/code/code_xss.md @@ -1,3 +1,10 @@ +--- +triggers: render, html, innerhtml, template +chains: code_dom_xss_sinks, code_react_dangerous_html +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source XSS Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_xstream_deser.md b/agents_md/code/code_xstream_deser.md index 41eb980..06965a6 100644 --- a/agents_md/code/code_xstream_deser.md +++ b/agents_md/code/code_xstream_deser.md @@ -1,3 +1,9 @@ +--- +triggers: xstream, java +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source XStream Deserialization Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_xxe.md b/agents_md/code/code_xxe.md index b1eaa5a..f8a1bd9 100644 --- a/agents_md/code/code_xxe.md +++ b/agents_md/code/code_xxe.md @@ -1,3 +1,9 @@ +--- +triggers: xml, documentbuilder, saxparser +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source XXE Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_xxe_lxml.md b/agents_md/code/code_xxe_lxml.md index d77f98f..6f6bc6e 100644 --- a/agents_md/code/code_xxe_lxml.md +++ b/agents_md/code/code_xxe_lxml.md @@ -1,3 +1,9 @@ +--- +triggers: lxml, etree, python, xml +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source XXE (parser config) Reviewer Agent ## User Prompt diff --git a/agents_md/code/code_zip_slip_src.md b/agents_md/code/code_zip_slip_src.md index 627e57e..d7a9ed9 100644 --- a/agents_md/code/code_zip_slip_src.md +++ b/agents_md/code/code_zip_slip_src.md @@ -1,3 +1,9 @@ +--- +triggers: zipfile, unzip, extract, archive +priority: 18 +max_rounds: 1 +modes: whitebox, greybox +--- # Source Zip Slip Reviewer Agent ## User Prompt diff --git a/agents_md/code/research_attack_surface_map.md b/agents_md/code/research_attack_surface_map.md index b2c63d0..d6fcd02 100644 --- a/agents_md/code/research_attack_surface_map.md +++ b/agents_md/code/research_attack_surface_map.md @@ -1,3 +1,10 @@ +--- +triggers: repository, package.json, requirements.txt, go.mod, pom.xml +chains: research_source_to_sink_taint, research_dependency_nday_reachability +priority: 30 +max_rounds: 1 +modes: whitebox, greybox +--- # Research Attack-Surface Mapper Agent ## User Prompt diff --git a/agents_md/code/research_dependency_nday_reachability.md b/agents_md/code/research_dependency_nday_reachability.md index beff96e..2ad7883 100644 --- a/agents_md/code/research_dependency_nday_reachability.md +++ b/agents_md/code/research_dependency_nday_reachability.md @@ -1,3 +1,10 @@ +--- +triggers: package.json, requirements.txt, go.mod, gemfile, pom.xml +chains: research_known_cve_dedup, code_java_deser +priority: 26 +max_rounds: 1 +modes: whitebox, greybox +--- # Dependency n-day Reachability Researcher Agent ## User Prompt diff --git a/agents_md/code/research_known_cve_dedup.md b/agents_md/code/research_known_cve_dedup.md index 634f443..8bd5e60 100644 --- a/agents_md/code/research_known_cve_dedup.md +++ b/agents_md/code/research_known_cve_dedup.md @@ -1,3 +1,9 @@ +--- +triggers: dependency, package, version +priority: 20 +max_rounds: 1 +modes: whitebox, greybox +--- # Known-CVE Baseline & Dedup Researcher Agent ## User Prompt diff --git a/agents_md/code/research_logic_authz_flaw.md b/agents_md/code/research_logic_authz_flaw.md index d2ed8ae..e4ad099 100644 --- a/agents_md/code/research_logic_authz_flaw.md +++ b/agents_md/code/research_logic_authz_flaw.md @@ -1,3 +1,10 @@ +--- +triggers: controller, route, handler, middleware +chains: code_missing_authz, code_idor_access +priority: 24 +max_rounds: 1 +modes: whitebox, greybox +--- # Business-Logic & Broken-Access-Control Researcher Agent ## User Prompt diff --git a/agents_md/code/research_patch_diff_variant.md b/agents_md/code/research_patch_diff_variant.md index 3724989..8c97c0a 100644 --- a/agents_md/code/research_patch_diff_variant.md +++ b/agents_md/code/research_patch_diff_variant.md @@ -1,3 +1,10 @@ +--- +triggers: commit, patch, diff +chains: research_source_to_sink_taint +priority: 22 +max_rounds: 1 +modes: whitebox, greybox +--- # Patch-Diff & Variant (n-day -> 0-day) Researcher Agent ## User Prompt diff --git a/agents_md/code/research_source_to_sink_taint.md b/agents_md/code/research_source_to_sink_taint.md index 1d1813b..8965cb9 100644 --- a/agents_md/code/research_source_to_sink_taint.md +++ b/agents_md/code/research_source_to_sink_taint.md @@ -1,3 +1,10 @@ +--- +triggers: repository, package.json, requirements.txt, pom.xml +chains: code_sqli, code_command_injection, code_ssrf +priority: 28 +max_rounds: 2 +modes: whitebox, greybox +--- # Source-to-Sink Taint Researcher Agent ## User Prompt diff --git a/agents_md/container/image_misconfig_scan.md b/agents_md/container/image_misconfig_scan.md index af0bffa..7040285 100644 --- a/agents_md/container/image_misconfig_scan.md +++ b/agents_md/container/image_misconfig_scan.md @@ -1,3 +1,10 @@ +--- +triggers: dockerfile, root, privileged, capabilities +chains: container_escape, docker_socket_exposure +priority: 26 +max_rounds: 1 +modes: container +--- # Container Image & Dockerfile Misconfiguration ## User Prompt You are scanning the container image **{target}** (an OCI image reference, a local tar, or a Dockerfile) for: Container Image & Dockerfile Misconfiguration. CWE-16 diff --git a/agents_md/container/image_sbom_generate.md b/agents_md/container/image_sbom_generate.md index 97d4fd9..20fd859 100644 --- a/agents_md/container/image_sbom_generate.md +++ b/agents_md/container/image_sbom_generate.md @@ -1,3 +1,10 @@ +--- +triggers: image, package, dependency +chains: image_vuln_scan, dependency_confusion +priority: 20 +max_rounds: 1 +modes: container +--- # Container SBOM Generation ## User Prompt You are scanning the container image **{target}** (an OCI image reference, a local tar, or a Dockerfile) for: Container SBOM Generation. CWE-1357 diff --git a/agents_md/container/image_secret_scan.md b/agents_md/container/image_secret_scan.md index 623ddfa..1661e3d 100644 --- a/agents_md/container/image_secret_scan.md +++ b/agents_md/container/image_secret_scan.md @@ -1,3 +1,10 @@ +--- +triggers: dockerfile, image, layer, registry +chains: api_key_exposure, ci_cd_secret_leak +priority: 28 +max_rounds: 1 +modes: container +--- # Container Image Secret Scan ## User Prompt You are scanning the container image **{target}** (an OCI image reference, a local tar, or a Dockerfile) for: Container Image Secret Scan. CWE-798 diff --git a/agents_md/container/image_vuln_scan.md b/agents_md/container/image_vuln_scan.md index 0331db4..4b4b2b9 100644 --- a/agents_md/container/image_vuln_scan.md +++ b/agents_md/container/image_vuln_scan.md @@ -1,3 +1,10 @@ +--- +triggers: image, package, apt, apk, layer +chains: cve_known_exploitation, vulnerable_dependency +priority: 26 +max_rounds: 1 +modes: container +--- # Container Image Vulnerability Scan ## User Prompt You are scanning the container image **{target}** (an OCI image reference, a local tar, or a Dockerfile) for: Container Image Vulnerability Scan. CWE-1104 diff --git a/agents_md/infra/ad_acl_privesc.md b/agents_md/infra/ad_acl_privesc.md index e1a3242..02bb7c1 100644 --- a/agents_md/infra/ad_acl_privesc.md +++ b/agents_md/infra/ad_acl_privesc.md @@ -1,3 +1,10 @@ +--- +triggers: ldap, acl, domain, dacl +chains: ad_dcsync, ad_gpo_abuse, ad_laps_gmsa_read +priority: 26 +max_rounds: 1 +modes: host +--- # AD ACL / DACL Abuse Agent ## User Prompt diff --git a/agents_md/infra/ad_adcs_esc.md b/agents_md/infra/ad_adcs_esc.md index 991d3ac..68fa90e 100644 --- a/agents_md/infra/ad_adcs_esc.md +++ b/agents_md/infra/ad_adcs_esc.md @@ -1,3 +1,10 @@ +--- +triggers: adcs, certificate, pki, ldap +chains: ad_dcsync, ad_pth_ptt +priority: 26 +max_rounds: 1 +modes: host +--- # AD CS Certificate Template & CA Misconfiguration (ESC1-ESC13) Agent ## User Prompt diff --git a/agents_md/infra/ad_asreproasting.md b/agents_md/infra/ad_asreproasting.md index 3eb2387..8c2bc9f 100644 --- a/agents_md/infra/ad_asreproasting.md +++ b/agents_md/infra/ad_asreproasting.md @@ -1,3 +1,10 @@ +--- +triggers: kerberos, 88, domain +chains: ad_pth_ptt +priority: 24 +max_rounds: 1 +modes: host +--- # AD AS-REP Roasting Agent ## User Prompt diff --git a/agents_md/infra/ad_bloodhound_paths.md b/agents_md/infra/ad_bloodhound_paths.md index d1ef435..281ed22 100644 --- a/agents_md/infra/ad_bloodhound_paths.md +++ b/agents_md/infra/ad_bloodhound_paths.md @@ -1,3 +1,10 @@ +--- +triggers: domain, ldap, bloodhound, kerberos +chains: ad_acl_privesc, ad_kerberos_delegation, ad_dcsync +priority: 28 +max_rounds: 1 +modes: host +--- # AD BloodHound Attack-Path Analysis Agent ## User Prompt diff --git a/agents_md/infra/ad_coerce_auth.md b/agents_md/infra/ad_coerce_auth.md index 8d7709c..d55c148 100644 --- a/agents_md/infra/ad_coerce_auth.md +++ b/agents_md/infra/ad_coerce_auth.md @@ -1,3 +1,10 @@ +--- +triggers: smb, 445, rpc, efs +chains: ad_ntlm_relay, ad_adcs_esc +priority: 24 +max_rounds: 1 +modes: host +--- # AD Authentication Coercion (PetitPotam / PrinterBug / DFSCoerce / ShadowCoerce) Agent ## User Prompt diff --git a/agents_md/infra/ad_critical_cve.md b/agents_md/infra/ad_critical_cve.md index 940f51d..8b5e588 100644 --- a/agents_md/infra/ad_critical_cve.md +++ b/agents_md/infra/ad_critical_cve.md @@ -1,3 +1,10 @@ +--- +triggers: domain controller, netlogon, smb, print spooler +chains: ad_dcsync, ad_pth_ptt +priority: 26 +max_rounds: 1 +modes: host +--- # AD Critical CVE Checks — Zerologon & noPac (sAMAccountName spoofing) Agent ## User Prompt diff --git a/agents_md/infra/ad_dcsync.md b/agents_md/infra/ad_dcsync.md index 74b0c34..3e87252 100644 --- a/agents_md/infra/ad_dcsync.md +++ b/agents_md/infra/ad_dcsync.md @@ -1,3 +1,10 @@ +--- +triggers: domain controller, replication, ldap +chains: ad_persistence_review, ad_dpapi_looting +priority: 28 +max_rounds: 1 +modes: host +--- # AD DCSync Exposure Agent ## User Prompt diff --git a/agents_md/infra/ad_default_creds.md b/agents_md/infra/ad_default_creds.md index 7d8a3b6..b200c22 100644 --- a/agents_md/infra/ad_default_creds.md +++ b/agents_md/infra/ad_default_creds.md @@ -1,3 +1,10 @@ +--- +triggers: smb, ldap, domain +chains: ad_password_spray, ad_pth_ptt +priority: 20 +max_rounds: 1 +modes: host +--- # AD/Host Default & Reused Credentials Agent ## User Prompt diff --git a/agents_md/infra/ad_dpapi_looting.md b/agents_md/infra/ad_dpapi_looting.md index a9ef756..d0df664 100644 --- a/agents_md/infra/ad_dpapi_looting.md +++ b/agents_md/infra/ad_dpapi_looting.md @@ -1,3 +1,10 @@ +--- +triggers: dpapi, credential, vault +chains: ad_pth_ptt +priority: 20 +max_rounds: 1 +modes: host +--- # AD Post-Foothold Credential Looting (DPAPI / LSASS / Secrets) Agent ## User Prompt diff --git a/agents_md/infra/ad_gpo_abuse.md b/agents_md/infra/ad_gpo_abuse.md index 3b8cecc..ee7a89e 100644 --- a/agents_md/infra/ad_gpo_abuse.md +++ b/agents_md/infra/ad_gpo_abuse.md @@ -1,3 +1,10 @@ +--- +triggers: gpo, sysvol, policy +chains: ad_persistence_review, windows_priv_esc +priority: 22 +max_rounds: 1 +modes: host +--- # AD GPO Abuse & GPP cpassword Agent ## User Prompt diff --git a/agents_md/infra/ad_kerberoasting.md b/agents_md/infra/ad_kerberoasting.md index 582797d..253bddf 100644 --- a/agents_md/infra/ad_kerberoasting.md +++ b/agents_md/infra/ad_kerberoasting.md @@ -1,3 +1,10 @@ +--- +triggers: kerberos, 88, spn, domain +chains: ad_pth_ptt, ad_acl_privesc +priority: 26 +max_rounds: 1 +modes: host +--- # AD Kerberoasting Agent ## User Prompt diff --git a/agents_md/infra/ad_kerberos_delegation.md b/agents_md/infra/ad_kerberos_delegation.md index 695c396..85df22b 100644 --- a/agents_md/infra/ad_kerberos_delegation.md +++ b/agents_md/infra/ad_kerberos_delegation.md @@ -1,3 +1,10 @@ +--- +triggers: kerberos, delegation, spn +chains: ad_pth_ptt, ad_dcsync +priority: 24 +max_rounds: 1 +modes: host +--- # AD Kerberos Delegation Abuse Agent ## User Prompt diff --git a/agents_md/infra/ad_laps_gmsa_read.md b/agents_md/infra/ad_laps_gmsa_read.md index 8b066cd..96f3e36 100644 --- a/agents_md/infra/ad_laps_gmsa_read.md +++ b/agents_md/infra/ad_laps_gmsa_read.md @@ -1,3 +1,10 @@ +--- +triggers: laps, gmsa, ldap +chains: ad_pth_ptt, windows_priv_esc +priority: 22 +max_rounds: 1 +modes: host +--- # AD LAPS & gMSA Password Read via Delegated ACLs Agent ## User Prompt diff --git a/agents_md/infra/ad_llmnr_poisoning.md b/agents_md/infra/ad_llmnr_poisoning.md index d6aa2d0..1e05dfd 100644 --- a/agents_md/infra/ad_llmnr_poisoning.md +++ b/agents_md/infra/ad_llmnr_poisoning.md @@ -1,3 +1,10 @@ +--- +triggers: llmnr, netbios, mdns, smb +chains: ad_ntlm_relay +priority: 22 +max_rounds: 1 +modes: host +--- # AD LLMNR/NBT-NS/mDNS Poisoning Agent ## User Prompt diff --git a/agents_md/infra/ad_mssql_abuse.md b/agents_md/infra/ad_mssql_abuse.md index 14d7c46..005e532 100644 --- a/agents_md/infra/ad_mssql_abuse.md +++ b/agents_md/infra/ad_mssql_abuse.md @@ -1,3 +1,10 @@ +--- +triggers: mssql, 1433, sql server +chains: ad_pth_ptt, windows_priv_esc +priority: 22 +max_rounds: 1 +modes: host +--- # AD MSSQL Abuse Agent ## User Prompt diff --git a/agents_md/infra/ad_ntlm_relay.md b/agents_md/infra/ad_ntlm_relay.md index c169810..8c789dc 100644 --- a/agents_md/infra/ad_ntlm_relay.md +++ b/agents_md/infra/ad_ntlm_relay.md @@ -1,3 +1,10 @@ +--- +triggers: smb, 445, ntlm, signing +chains: ad_dcsync, ad_pth_ptt, windows_smb_signing +priority: 26 +max_rounds: 1 +modes: host +--- # AD NTLM Relay Agent ## User Prompt diff --git a/agents_md/infra/ad_password_spray.md b/agents_md/infra/ad_password_spray.md index 7832ccd..b1b830b 100644 --- a/agents_md/infra/ad_password_spray.md +++ b/agents_md/infra/ad_password_spray.md @@ -1,3 +1,10 @@ +--- +triggers: smb, ldap, domain, 445 +chains: ad_smb_share_hunt, ad_recon_enum, ad_pth_ptt +priority: 24 +max_rounds: 1 +modes: host +--- # AD Lockout-Aware Password Spraying Agent ## User Prompt diff --git a/agents_md/infra/ad_persistence_review.md b/agents_md/infra/ad_persistence_review.md index 97de85d..b7be49a 100644 --- a/agents_md/infra/ad_persistence_review.md +++ b/agents_md/infra/ad_persistence_review.md @@ -1,3 +1,9 @@ +--- +triggers: domain, golden, ticket +priority: 16 +max_rounds: 1 +modes: host +--- # AD Persistence & Tampering Surface Review Agent ## User Prompt diff --git a/agents_md/infra/ad_pth_ptt.md b/agents_md/infra/ad_pth_ptt.md index 989f114..b5e569a 100644 --- a/agents_md/infra/ad_pth_ptt.md +++ b/agents_md/infra/ad_pth_ptt.md @@ -1,3 +1,10 @@ +--- +triggers: ntlm, kerberos, smb, 445 +chains: ad_smb_share_hunt, ad_mssql_abuse, ad_dcsync +priority: 24 +max_rounds: 1 +modes: host +--- # AD Pass-the-Hash / Pass-the-Ticket / OverPass-the-Hash Agent ## User Prompt diff --git a/agents_md/infra/ad_recon_enum.md b/agents_md/infra/ad_recon_enum.md index 02dbb38..d447d85 100644 --- a/agents_md/infra/ad_recon_enum.md +++ b/agents_md/infra/ad_recon_enum.md @@ -1,3 +1,10 @@ +--- +triggers: smb, ldap, kerberos, domain controller, 445, 389 +chains: ad_kerberoasting, ad_asreproasting, ad_smb_share_hunt, ad_bloodhound_paths +priority: 30 +max_rounds: 1 +modes: host +--- # AD Recon & Enumeration Agent ## User Prompt diff --git a/agents_md/infra/ad_smb_share_hunt.md b/agents_md/infra/ad_smb_share_hunt.md index b4a3c63..84c8a5d 100644 --- a/agents_md/infra/ad_smb_share_hunt.md +++ b/agents_md/infra/ad_smb_share_hunt.md @@ -1,3 +1,10 @@ +--- +triggers: smb, 445, share +chains: ad_dpapi_looting, windows_binary_harvest_analyze +priority: 22 +max_rounds: 1 +modes: host +--- # AD SMB Share Enumeration & Secret Hunting Agent ## User Prompt diff --git a/agents_md/infra/ad_trust_abuse.md b/agents_md/infra/ad_trust_abuse.md index 8c749b7..0867a12 100644 --- a/agents_md/infra/ad_trust_abuse.md +++ b/agents_md/infra/ad_trust_abuse.md @@ -1,3 +1,10 @@ +--- +triggers: trust, forest, domain +chains: ad_dcsync +priority: 20 +max_rounds: 1 +modes: host +--- # AD Domain/Forest Trust Abuse Agent ## User Prompt diff --git a/agents_md/infra/aws_compute_exposure.md b/agents_md/infra/aws_compute_exposure.md index b5d9279..3e01c2c 100644 --- a/agents_md/infra/aws_compute_exposure.md +++ b/agents_md/infra/aws_compute_exposure.md @@ -1,3 +1,10 @@ +--- +triggers: ec2, aws, security group +chains: aws_imds_v2_bypass, cloud_metadata_exposure +priority: 24 +max_rounds: 1 +modes: host, web, greybox +--- # AWS EC2 / Network Exposure & IMDS Agent ## User Prompt diff --git a/agents_md/infra/aws_iam_privesc.md b/agents_md/infra/aws_iam_privesc.md index ead51ed..3fb63d2 100644 --- a/agents_md/infra/aws_iam_privesc.md +++ b/agents_md/infra/aws_iam_privesc.md @@ -1,3 +1,10 @@ +--- +triggers: aws, iam, sts, role, arn +chains: aws_secrets_exposure, aws_compute_exposure +priority: 28 +max_rounds: 1 +modes: host, web, greybox +--- # AWS IAM Privilege Escalation Agent ## User Prompt diff --git a/agents_md/infra/aws_identity_scope.md b/agents_md/infra/aws_identity_scope.md index a63b6ad..1135d06 100644 --- a/agents_md/infra/aws_identity_scope.md +++ b/agents_md/infra/aws_identity_scope.md @@ -1,3 +1,10 @@ +--- +triggers: aws, iam, arn, sts +chains: aws_iam_privesc +priority: 24 +max_rounds: 1 +modes: host, web, greybox +--- # AWS Credential Scope & Caller Identity Agent ## User Prompt diff --git a/agents_md/infra/aws_lambda_review.md b/agents_md/infra/aws_lambda_review.md index f948e1b..3914934 100644 --- a/agents_md/infra/aws_lambda_review.md +++ b/agents_md/infra/aws_lambda_review.md @@ -1,3 +1,10 @@ +--- +triggers: lambda, aws, serverless +chains: serverless_misconfiguration, aws_iam_privesc +priority: 22 +max_rounds: 1 +modes: host, web, greybox +--- # AWS Lambda & Resource-Policy Review Agent ## User Prompt diff --git a/agents_md/infra/aws_s3_exposure.md b/agents_md/infra/aws_s3_exposure.md index 4095284..fa6ad03 100644 --- a/agents_md/infra/aws_s3_exposure.md +++ b/agents_md/infra/aws_s3_exposure.md @@ -1,3 +1,10 @@ +--- +triggers: s3, amazonaws, bucket +chains: aws_secrets_exposure, aws_iam_privesc +priority: 26 +max_rounds: 1 +modes: host, web, greybox +--- # AWS S3 Bucket Exposure Agent ## User Prompt diff --git a/agents_md/infra/aws_secrets_exposure.md b/agents_md/infra/aws_secrets_exposure.md index e45c0df..becf61c 100644 --- a/agents_md/infra/aws_secrets_exposure.md +++ b/agents_md/infra/aws_secrets_exposure.md @@ -1,3 +1,10 @@ +--- +triggers: aws, secretsmanager, ssm, parameter store +chains: aws_iam_privesc, api_key_exposure +priority: 26 +max_rounds: 1 +modes: host, web, greybox +--- # AWS Secrets & Parameter Exposure Agent ## User Prompt diff --git a/agents_md/infra/azure_compute_identity.md b/agents_md/infra/azure_compute_identity.md index 498f485..47e1b1d 100644 --- a/agents_md/infra/azure_compute_identity.md +++ b/agents_md/infra/azure_compute_identity.md @@ -1,3 +1,10 @@ +--- +triggers: azure, managed identity, vm +chains: azure_imds_exposure, azure_rbac_privesc +priority: 22 +max_rounds: 1 +modes: host, web, greybox +--- # Azure VM, NSG & Managed Identity Agent ## User Prompt diff --git a/agents_md/infra/azure_entra_enum.md b/agents_md/infra/azure_entra_enum.md index 50496d5..3d0e711 100644 --- a/agents_md/infra/azure_entra_enum.md +++ b/agents_md/infra/azure_entra_enum.md @@ -1,3 +1,10 @@ +--- +triggers: azure, entra, aad, tenant +chains: azure_rbac_privesc, azure_keyvault_access +priority: 26 +max_rounds: 1 +modes: host, web, greybox +--- # Azure Entra ID (AAD) Enumeration Agent ## User Prompt diff --git a/agents_md/infra/azure_keyvault_access.md b/agents_md/infra/azure_keyvault_access.md index d6db856..8343d8a 100644 --- a/agents_md/infra/azure_keyvault_access.md +++ b/agents_md/infra/azure_keyvault_access.md @@ -1,3 +1,10 @@ +--- +triggers: azure, keyvault, vault +chains: azure_rbac_privesc, api_key_exposure +priority: 24 +max_rounds: 1 +modes: host, web, greybox +--- # Azure Key Vault Access Agent ## User Prompt diff --git a/agents_md/infra/azure_rbac_privesc.md b/agents_md/infra/azure_rbac_privesc.md index d4afc39..f355956 100644 --- a/agents_md/infra/azure_rbac_privesc.md +++ b/agents_md/infra/azure_rbac_privesc.md @@ -1,3 +1,10 @@ +--- +triggers: azure, rbac, role assignment +chains: azure_keyvault_access, azure_compute_identity +priority: 26 +max_rounds: 1 +modes: host, web, greybox +--- # Azure RBAC Privilege Escalation Agent ## User Prompt diff --git a/agents_md/infra/azure_storage_exposure.md b/agents_md/infra/azure_storage_exposure.md index 0658292..dd4e13f 100644 --- a/agents_md/infra/azure_storage_exposure.md +++ b/agents_md/infra/azure_storage_exposure.md @@ -1,3 +1,10 @@ +--- +triggers: azure, blob, storage account +chains: azure_blob_public, azure_rbac_privesc +priority: 24 +max_rounds: 1 +modes: host, web, greybox +--- # Azure Storage Account Exposure Agent ## User Prompt diff --git a/agents_md/infra/cloud_recon_footprint.md b/agents_md/infra/cloud_recon_footprint.md index cbfe3ec..e3375c4 100644 --- a/agents_md/infra/cloud_recon_footprint.md +++ b/agents_md/infra/cloud_recon_footprint.md @@ -1,3 +1,10 @@ +--- +triggers: aws, gcp, azure, amazonaws, cloud +chains: aws_s3_exposure, gcp_storage_exposure, azure_storage_exposure +priority: 26 +max_rounds: 1 +modes: host, web, greybox +--- # Cloud Footprint & Identity Recon Agent ## User Prompt diff --git a/agents_md/infra/eol_os_service.md b/agents_md/infra/eol_os_service.md index b38c8ba..f1ee2f0 100644 --- a/agents_md/infra/eol_os_service.md +++ b/agents_md/infra/eol_os_service.md @@ -1,3 +1,10 @@ +--- +triggers: centos, windows server, ubuntu, eol, end of life +chains: cve_known_exploitation, linux_kernel_vuln_hunt +priority: 22 +max_rounds: 1 +modes: host +--- # EOL OS & Service Exploitation Agent ## User Prompt diff --git a/agents_md/infra/eol_tls_protocol.md b/agents_md/infra/eol_tls_protocol.md index 3712d0c..880e042 100644 --- a/agents_md/infra/eol_tls_protocol.md +++ b/agents_md/infra/eol_tls_protocol.md @@ -1,3 +1,10 @@ +--- +triggers: tls, ssl, sslv3, tlsv1 +chains: ssl_issues, weak_encryption +priority: 18 +max_rounds: 1 +modes: host, web, greybox, whitebox +--- # EOL TLS & Protocol Exploitation Agent ## User Prompt diff --git a/agents_md/infra/eol_webserver_exploitation.md b/agents_md/infra/eol_webserver_exploitation.md index fe457a7..1e79ef7 100644 --- a/agents_md/infra/eol_webserver_exploitation.md +++ b/agents_md/infra/eol_webserver_exploitation.md @@ -1,3 +1,10 @@ +--- +triggers: apache, nginx, iis, tomcat +chains: cve_known_exploitation +priority: 22 +max_rounds: 1 +modes: host, web, greybox, whitebox +--- # EOL Web/App Server Exploitation Agent ## User Prompt diff --git a/agents_md/infra/gcp_compute_exposure.md b/agents_md/infra/gcp_compute_exposure.md index 8c7e874..e19b5f0 100644 --- a/agents_md/infra/gcp_compute_exposure.md +++ b/agents_md/infra/gcp_compute_exposure.md @@ -1,3 +1,10 @@ +--- +triggers: gce, gcp, compute, google +chains: gcp_metadata_ssrf, gcp_iam_privesc +priority: 22 +max_rounds: 1 +modes: host, web, greybox +--- # GCP Compute & Firewall Exposure Agent ## User Prompt diff --git a/agents_md/infra/gcp_iam_privesc.md b/agents_md/infra/gcp_iam_privesc.md index b0e237c..37c798f 100644 --- a/agents_md/infra/gcp_iam_privesc.md +++ b/agents_md/infra/gcp_iam_privesc.md @@ -1,3 +1,10 @@ +--- +triggers: gcp, google, iam, serviceaccount +chains: gcp_serviceaccount_keys, gcp_secrets_functions +priority: 26 +max_rounds: 1 +modes: host, web, greybox +--- # GCP IAM Privilege Escalation Agent ## User Prompt diff --git a/agents_md/infra/gcp_secrets_functions.md b/agents_md/infra/gcp_secrets_functions.md index a29eb61..cefeb4b 100644 --- a/agents_md/infra/gcp_secrets_functions.md +++ b/agents_md/infra/gcp_secrets_functions.md @@ -1,3 +1,10 @@ +--- +triggers: gcp, secret manager, cloud function +chains: gcp_iam_privesc +priority: 22 +max_rounds: 1 +modes: host, web, greybox +--- # GCP Secret Manager & Cloud Functions Agent ## User Prompt diff --git a/agents_md/infra/gcp_serviceaccount_keys.md b/agents_md/infra/gcp_serviceaccount_keys.md index fc21ac6..c963cf6 100644 --- a/agents_md/infra/gcp_serviceaccount_keys.md +++ b/agents_md/infra/gcp_serviceaccount_keys.md @@ -1,3 +1,10 @@ +--- +triggers: gcp, serviceaccount, google +chains: gcp_iam_privesc, api_key_exposure +priority: 24 +max_rounds: 1 +modes: host, web, greybox +--- # GCP Service Account Key & Impersonation Agent ## User Prompt diff --git a/agents_md/infra/gcp_storage_exposure.md b/agents_md/infra/gcp_storage_exposure.md index 2a3404e..e9f62c1 100644 --- a/agents_md/infra/gcp_storage_exposure.md +++ b/agents_md/infra/gcp_storage_exposure.md @@ -1,3 +1,10 @@ +--- +triggers: gcs, google, storage, bucket +chains: gcp_iam_privesc +priority: 24 +max_rounds: 1 +modes: host, web, greybox +--- # GCP Cloud Storage Exposure Agent ## User Prompt diff --git a/agents_md/infra/infra_port_service_scan.md b/agents_md/infra/infra_port_service_scan.md index 270802d..28c865d 100644 --- a/agents_md/infra/infra_port_service_scan.md +++ b/agents_md/infra/infra_port_service_scan.md @@ -1,3 +1,10 @@ +--- +triggers: open port, tcp, listening, nmap +chains: infra_smb_enum, ad_recon_enum, eol_os_service +priority: 26 +max_rounds: 1 +modes: host +--- # Host Port & Service Scan Agent ## User Prompt diff --git a/agents_md/infra/infra_smb_enum.md b/agents_md/infra/infra_smb_enum.md index 0d61b57..32e66d7 100644 --- a/agents_md/infra/infra_smb_enum.md +++ b/agents_md/infra/infra_smb_enum.md @@ -1,3 +1,10 @@ +--- +triggers: smb, 445, 139, netbios +chains: ad_recon_enum, ad_smb_share_hunt, windows_smb_signing +priority: 24 +max_rounds: 1 +modes: host +--- # SMB/NetBIOS Enumeration Agent ## User Prompt diff --git a/agents_md/infra/linux_cron_writable.md b/agents_md/infra/linux_cron_writable.md index ff42941..d516c3f 100644 --- a/agents_md/infra/linux_cron_writable.md +++ b/agents_md/infra/linux_cron_writable.md @@ -1,3 +1,10 @@ +--- +triggers: linux, cron, ubuntu, debian +chains: linux_priv_esc +priority: 20 +max_rounds: 1 +modes: host +--- # Writable Cron / Service Abuse Agent ## User Prompt diff --git a/agents_md/infra/linux_kernel_vuln_hunt.md b/agents_md/infra/linux_kernel_vuln_hunt.md index b824b8d..ae84060 100644 --- a/agents_md/infra/linux_kernel_vuln_hunt.md +++ b/agents_md/infra/linux_kernel_vuln_hunt.md @@ -1,3 +1,10 @@ +--- +triggers: linux, kernel, uname +chains: cve_known_exploitation, linux_priv_esc +priority: 22 +max_rounds: 1 +modes: host +--- # Linux Kernel Vulnerability Hunt Agent Class: CWE-269 diff --git a/agents_md/infra/linux_priv_esc.md b/agents_md/infra/linux_priv_esc.md index 596670d..38ac71e 100644 --- a/agents_md/infra/linux_priv_esc.md +++ b/agents_md/infra/linux_priv_esc.md @@ -1,3 +1,10 @@ +--- +triggers: linux, ubuntu, debian, centos, ssh, 22 +chains: linux_sudo_misconfig, linux_cron_writable, linux_kernel_vuln_hunt +priority: 26 +max_rounds: 1 +modes: host +--- # Linux Privilege Escalation Agent ## User Prompt diff --git a/agents_md/infra/linux_ssh_weak_auth.md b/agents_md/infra/linux_ssh_weak_auth.md index 1b21c51..741000c 100644 --- a/agents_md/infra/linux_ssh_weak_auth.md +++ b/agents_md/infra/linux_ssh_weak_auth.md @@ -1,3 +1,10 @@ +--- +triggers: ssh, 22, openssh +chains: linux_priv_esc +priority: 22 +max_rounds: 1 +modes: host +--- # SSH Weak Authentication Agent ## User Prompt diff --git a/agents_md/infra/linux_sudo_misconfig.md b/agents_md/infra/linux_sudo_misconfig.md index 75b468e..2b4e8b9 100644 --- a/agents_md/infra/linux_sudo_misconfig.md +++ b/agents_md/infra/linux_sudo_misconfig.md @@ -1,3 +1,10 @@ +--- +triggers: linux, sudo, ubuntu, debian +chains: linux_priv_esc +priority: 22 +max_rounds: 1 +modes: host +--- # Linux Sudo Misconfiguration Agent ## User Prompt diff --git a/agents_md/infra/windows_binary_harvest_analyze.md b/agents_md/infra/windows_binary_harvest_analyze.md index cab8e4c..7284824 100644 --- a/agents_md/infra/windows_binary_harvest_analyze.md +++ b/agents_md/infra/windows_binary_harvest_analyze.md @@ -1,3 +1,10 @@ +--- +triggers: windows, binary, .exe, .dll +chains: windows_priv_esc +priority: 20 +max_rounds: 1 +modes: host +--- # Windows Binary Harvest Analysis Agent Class: CWE-693 diff --git a/agents_md/infra/windows_priv_esc.md b/agents_md/infra/windows_priv_esc.md index 4b3c713..55a5a2f 100644 --- a/agents_md/infra/windows_priv_esc.md +++ b/agents_md/infra/windows_priv_esc.md @@ -1,3 +1,10 @@ +--- +triggers: windows, smb, 445, winrm +chains: windows_binary_harvest_analyze, ad_dpapi_looting +priority: 26 +max_rounds: 1 +modes: host +--- # Windows Privilege Escalation Agent ## User Prompt diff --git a/agents_md/infra/windows_smb_signing.md b/agents_md/infra/windows_smb_signing.md index 0fdcd85..8529687 100644 --- a/agents_md/infra/windows_smb_signing.md +++ b/agents_md/infra/windows_smb_signing.md @@ -1,3 +1,10 @@ +--- +triggers: smb, 445, signing +chains: ad_ntlm_relay +priority: 20 +max_rounds: 1 +modes: host +--- # SMB Signing & Relay Exposure Agent ## User Prompt diff --git a/agents_md/infra/windows_winrm_access.md b/agents_md/infra/windows_winrm_access.md index 4af1293..3bbcb98 100644 --- a/agents_md/infra/windows_winrm_access.md +++ b/agents_md/infra/windows_winrm_access.md @@ -1,3 +1,10 @@ +--- +triggers: winrm, 5985, 5986, windows +chains: windows_priv_esc, ad_pth_ptt +priority: 24 +max_rounds: 1 +modes: host +--- # WinRM Authenticated Access Agent ## User Prompt diff --git a/agents_md/recon/api_discovery.md b/agents_md/recon/api_discovery.md index 40595cc..0e65f60 100644 --- a/agents_md/recon/api_discovery.md +++ b/agents_md/recon/api_discovery.md @@ -1,3 +1,10 @@ +--- +triggers: /api, swagger, openapi, rest, endpoint +chains: exposed_api_docs, bola, bfla, api_bola_numeric_ids +priority: 28 +max_rounds: 1 +modes: web, greybox, whitebox +--- # API Surface Discovery Specialist Agent ## User Prompt diff --git a/agents_md/recon/cloud_asset_discovery.md b/agents_md/recon/cloud_asset_discovery.md index f661bba..9959c0e 100644 --- a/agents_md/recon/cloud_asset_discovery.md +++ b/agents_md/recon/cloud_asset_discovery.md @@ -1,3 +1,10 @@ +--- +triggers: aws, gcp, azure, amazonaws, bucket +chains: s3_bucket_misconfiguration, cloud_metadata_exposure, gcs_bucket_misconfig +priority: 24 +max_rounds: 1 +modes: web, greybox, whitebox +--- # Cloud Asset Discovery Specialist Agent ## User Prompt diff --git a/agents_md/recon/content_discovery.md b/agents_md/recon/content_discovery.md index a063a21..505b74b 100644 --- a/agents_md/recon/content_discovery.md +++ b/agents_md/recon/content_discovery.md @@ -1,3 +1,10 @@ +--- +triggers: /admin, /backup, robots.txt, directory +chains: backup_file_exposure, exposed_admin_panel, directory_listing +priority: 26 +max_rounds: 1 +modes: web, greybox, whitebox +--- # Content & Path Discovery Specialist Agent ## User Prompt diff --git a/agents_md/recon/dns_recon.md b/agents_md/recon/dns_recon.md index 3c71c76..222182a 100644 --- a/agents_md/recon/dns_recon.md +++ b/agents_md/recon/dns_recon.md @@ -1,3 +1,10 @@ +--- +triggers: dns, mx, txt record, spf +chains: subdomain_enum, subdomain_takeover +priority: 20 +max_rounds: 1 +modes: web, greybox, whitebox +--- # DNS Reconnaissance Specialist Agent ## User Prompt diff --git a/agents_md/recon/graphql_discovery.md b/agents_md/recon/graphql_discovery.md index 1173017..b003730 100644 --- a/agents_md/recon/graphql_discovery.md +++ b/agents_md/recon/graphql_discovery.md @@ -1,3 +1,10 @@ +--- +triggers: graphql, /graphql, apollo +chains: graphql_introspection, graphql_injection +priority: 28 +max_rounds: 1 +modes: web, greybox, whitebox +--- # GraphQL Discovery Specialist Agent ## User Prompt diff --git a/agents_md/recon/js_analysis.md b/agents_md/recon/js_analysis.md index ad6f548..2718ae9 100644 --- a/agents_md/recon/js_analysis.md +++ b/agents_md/recon/js_analysis.md @@ -1,3 +1,10 @@ +--- +triggers: javascript, .js, webpack, bundle +chains: sourcemap_exposure, js_source_deep_analysis, api_key_exposure +priority: 26 +max_rounds: 1 +modes: web, greybox, whitebox +--- # JavaScript & Sourcemap Deep Analysis Agent CWE-200 (Exposure of Sensitive Information) diff --git a/agents_md/recon/osint_employee.md b/agents_md/recon/osint_employee.md index b737477..2d38fe9 100644 --- a/agents_md/recon/osint_employee.md +++ b/agents_md/recon/osint_employee.md @@ -1,3 +1,10 @@ +--- +triggers: employee, linkedin, staff directory +chains: ad_password_spray +priority: 14 +max_rounds: 1 +modes: web, greybox, whitebox +--- # OSINT & Exposure Mapping Specialist Agent ## User Prompt diff --git a/agents_md/recon/parameter_discovery.md b/agents_md/recon/parameter_discovery.md index 88b1162..1c1a43c 100644 --- a/agents_md/recon/parameter_discovery.md +++ b/agents_md/recon/parameter_discovery.md @@ -1,3 +1,10 @@ +--- +triggers: param, querystring, form field +chains: param_miner, idor, sqli_error +priority: 22 +max_rounds: 1 +modes: web, greybox, whitebox +--- # Parameter Discovery Specialist Agent ## User Prompt diff --git a/agents_md/recon/secret_scanning.md b/agents_md/recon/secret_scanning.md index f0b4023..a82e8b1 100644 --- a/agents_md/recon/secret_scanning.md +++ b/agents_md/recon/secret_scanning.md @@ -1,3 +1,10 @@ +--- +triggers: token, secret, api_key, credential +chains: api_key_exposure, env_file_exposure, ci_cd_secret_leak +priority: 28 +max_rounds: 1 +modes: web, greybox, whitebox, whitebox, greybox +--- # Deep Secret Extraction Agent CWE-522 (Insufficiently Protected Credentials) · CWE-200 (Information Exposure) diff --git a/agents_md/recon/subdomain_enum.md b/agents_md/recon/subdomain_enum.md index 2568f8c..f316218 100644 --- a/agents_md/recon/subdomain_enum.md +++ b/agents_md/recon/subdomain_enum.md @@ -1,3 +1,10 @@ +--- +triggers: subdomain, dns, cname +chains: subdomain_takeover, cloud_asset_discovery +priority: 24 +max_rounds: 1 +modes: web, greybox, whitebox +--- # Subdomain Enumeration Specialist Agent ## User Prompt diff --git a/agents_md/recon/tech_fingerprint.md b/agents_md/recon/tech_fingerprint.md index aa96605..f3ca5fe 100644 --- a/agents_md/recon/tech_fingerprint.md +++ b/agents_md/recon/tech_fingerprint.md @@ -1,3 +1,10 @@ +--- +triggers: x-powered-by, server:, nginx, apache, iis, express +chains: cve_version_fingerprint, outdated_component, cms_fingerprint +priority: 30 +max_rounds: 1 +modes: web, greybox, whitebox +--- # Technology Fingerprinting Specialist Agent ## User Prompt diff --git a/agents_md/recon/waf_cdn_detection.md b/agents_md/recon/waf_cdn_detection.md index 28acada..6df0cbb 100644 --- a/agents_md/recon/waf_cdn_detection.md +++ b/agents_md/recon/waf_cdn_detection.md @@ -1,3 +1,10 @@ +--- +triggers: cloudflare, akamai, waf, cdn, incapsula +chains: bypass_403, cache_poisoning, http_smuggling +priority: 24 +max_rounds: 1 +modes: web, greybox, whitebox +--- # WAF/CDN Detection Specialist Agent ## User Prompt diff --git a/neurosploit-rs/crates/harness/src/pipeline.rs b/neurosploit-rs/crates/harness/src/pipeline.rs index 87b81db..da7856b 100644 --- a/neurosploit-rs/crates/harness/src/pipeline.rs +++ b/neurosploit-rs/crates/harness/src/pipeline.rs @@ -2913,8 +2913,8 @@ pub async fn run(mut cfg: RunConfig, lib: &Library, pool: &ModelPool, tx: Sender break; } let next_skills = crate::skill::next_round( - &skill_catalog, &all_findings, &skills_ran, explored, &recon, round, - &exploration_budget, + &skill_catalog, &all_findings, &skills_ran, explored, "web", &recon, + round, &exploration_budget, ); if next_skills.is_empty() { break; } let names: Vec = next_skills.iter().map(|s| format!("{}({})", s.skill.name, s.reason)).collect(); @@ -3218,6 +3218,8 @@ pub async fn run(mut cfg: RunConfig, lib: &Library, pool: &ModelPool, tx: Sender /// Context needed by the exploration loop in every mode. struct ExploreCtx<'a> { + /// Engagement mode, used to scope which skills the router may pick. + mode: &'static str, cfg: &'a RunConfig, pool: &'a ModelPool, tx: Sender, @@ -3280,7 +3282,8 @@ async fn exploration_loop( break; } let next_skills = crate::skill::next_round( - &skill_catalog, &all_findings, &skills_ran, explored, &ctx.recon_ctx, round, &budget, + &skill_catalog, &all_findings, &skills_ran, explored, ctx.mode, + &ctx.recon_ctx, round, &budget, ); if next_skills.is_empty() { break; } let names: Vec = next_skills.iter().map(|s| format!("{}({})", s.skill.name, s.reason)).collect(); @@ -3543,6 +3546,7 @@ pub async fn run_whitebox(cfg: RunConfig, lib: &Library, pool: &ModelPool, tx: S let initial_findings: Vec = raw.iter().flat_map(|(_, _, f)| f.clone()).collect(); let agents_ran: Vec = selected.iter().map(|a| a.name.clone()).collect(); let mut wb_explore_ctx = ExploreCtx { + mode: "whitebox", cfg: &cfg, pool, tx: tx.clone(), recon_ctx: context.chars().take(3000).collect(), target: cfg.target.clone(), shared_block: format!("{}{}", operator_directives(&cfg), SAFETY_DOCTRINE), @@ -3797,6 +3801,7 @@ pub async fn run_greybox(cfg: RunConfig, lib: &Library, pool: &ModelPool, tx: Se let agents_ran: Vec = selected.iter().map(|a| a.name.clone()).collect(); let gb_recon_ctx: String = crate::recon_compact::compact_to(&recon, 3000); let mut gb_explore_ctx = ExploreCtx { + mode: "greybox", cfg: &cfg, pool, tx: tx.clone(), recon_ctx: gb_recon_ctx, target: cfg.target.clone(), shared_block: format!("{}{}{}", operator_directives(&cfg), REACT_DOCTRINE, SAFETY_DOCTRINE), @@ -7387,6 +7392,7 @@ pub async fn run_container(cfg: RunConfig, lib: &Library, pool: &ModelPool, tx: let initial_findings: Vec = raw.iter().flat_map(|(_, _, f)| f.clone()).collect(); let agents_ran: Vec = selected.iter().map(|a| a.name.clone()).collect(); let mut ct_explore_ctx = ExploreCtx { + mode: "container", cfg: &cfg, pool, tx: tx.clone(), recon_ctx: recon_ctx.clone(), target: target.clone(), shared_block: format!("{}{}{}{}", directives, CONTAINER_TOOLING, REACT_DOCTRINE, SAFETY_DOCTRINE), @@ -7647,6 +7653,7 @@ pub async fn run_mobile(cfg: RunConfig, lib: &Library, pool: &ModelPool, tx: Sen let initial_findings: Vec = raw.iter().flat_map(|(_, _, f)| f.clone()).collect(); let agents_ran: Vec = selected.iter().map(|a| a.name.clone()).collect(); let mut mob_explore_ctx = ExploreCtx { + mode: "mobile", cfg: &cfg, pool, tx: tx.clone(), recon_ctx: recon_ctx.clone(), target: target.clone(), shared_block: format!("{}{}{}{}", directives, MOBILE_TOOLING, REACT_DOCTRINE, SAFETY_DOCTRINE), @@ -7894,6 +7901,7 @@ pub async fn run_host(cfg: RunConfig, lib: &Library, pool: &ModelPool, tx: Sende let initial_findings: Vec = raw.iter().flat_map(|(_, _, f)| f.clone()).collect(); let agents_ran: Vec = selected.iter().map(|a| a.name.clone()).collect(); let mut explore_ctx = ExploreCtx { + mode: "host", cfg: &cfg, pool, tx: tx.clone(), recon_ctx: recon_ctx.clone(), target: target.clone(), shared_block: format!("{directives}{}{}{}", REACT_DOCTRINE, SAFETY_DOCTRINE, HOST_TOOLING), diff --git a/neurosploit-rs/crates/harness/src/skill.rs b/neurosploit-rs/crates/harness/src/skill.rs index 586e91c..2e7e9de 100644 --- a/neurosploit-rs/crates/harness/src/skill.rs +++ b/neurosploit-rs/crates/harness/src/skill.rs @@ -62,6 +62,18 @@ pub struct SkillMeta { /// Category for grouping: vuln, infra, cloud, mobile, chain, recon. #[serde(default)] pub category: String, + + /// Engagement modes this skill applies to: "web", "whitebox", "greybox", + /// "host", "container", "mobile", "ai". + /// + /// Empty means every mode, which is what the 91 skills written before this + /// field existed rely on. It matters because the catalogue is not scoped by + /// mode — `load_catalog` loads all ten category directories whatever the + /// engagement is — so without this a source-review skill triggering on + /// "sql" would fire during a black-box web run against a target with no + /// source code to read. + #[serde(default)] + pub modes: Vec, } fn default_max_rounds() -> u32 { 2 } @@ -235,6 +247,7 @@ fn parse_frontmatter(text: &str) -> (SkillMeta, String) { "priority" => meta.priority = val.parse().unwrap_or(0), "max_rounds" => meta.max_rounds = val.parse().unwrap_or(2), "category" => meta.category = val.to_string(), + "modes" => meta.modes = list, _ => {} } } @@ -275,6 +288,9 @@ fn extract_section(text: &str, header: &str) -> String { /// Context the router uses to score skills. pub struct ExplorationContext { + /// Engagement mode, matched against each skill's `modes`. Empty matches + /// every skill, which keeps older callers working. + pub mode: String, pub recon: String, pub findings: Vec, pub skills_ran: HashSet, @@ -296,6 +312,15 @@ pub fn route(catalog: &SkillCatalog, ctx: &ExplorationContext, limit: usize) -> let mut scored: Vec = catalog.skills.iter() .filter_map(|skill| { + // Mode scoping. A skill that names its modes runs only in those; + // one that names none runs anywhere. + if !ctx.mode.is_empty() + && !skill.meta.modes.is_empty() + && !skill.meta.modes.iter().any(|m| m.eq_ignore_ascii_case(&ctx.mode)) + { + return None; + } + let runs_so_far = ctx.skills_ran.iter() .filter(|r| r.as_str() == skill.name) .count() as u32; @@ -329,8 +354,15 @@ pub fn route(catalog: &SkillCatalog, ctx: &ExplorationContext, limit: usize) -> } } - // 3. Priority boost - score += skill.meta.priority as f64 * 0.5; + // 3. Priority boost — a tiebreaker among skills that already + // matched, as the field documents ("run first when multiple are + // equally triggered"), not a score of its own. Adding it + // unconditionally let any skill at priority >= 30 clear the + // score >= 15 gate on an empty recon, crowding out the skills + // the recon actually pointed at. + if score > 0.0 { + score += skill.meta.priority as f64 * 0.5; + } // 4. Penalty for already-ran skills (diminishing returns) if runs_so_far > 0 { @@ -422,6 +454,7 @@ pub fn next_round( all_findings: &[crate::types::Finding], skills_ran: &HashSet, explored: usize, + mode: &str, recon: &str, round: u32, budget: &ExplorationBudget, @@ -435,6 +468,7 @@ pub fn next_round( } let ctx = ExplorationContext { + mode: mode.to_string(), recon: recon.to_string(), findings: all_findings.to_vec(), skills_ran: skills_ran.clone(), @@ -609,6 +643,7 @@ mod tests { test_skill("ssrf", vec!["api", "curl", "fetch"], vec![]), ]); let ctx = ExplorationContext { + mode: String::new(), recon: "MySQL database detected on port 3306, PHP application".into(), findings: vec![], skills_ran: HashSet::new(), @@ -638,6 +673,7 @@ mod tests { }; let ctx = ExplorationContext { + mode: String::new(), recon: String::new(), findings: vec![finding], skills_ran: ["sqli"].iter().map(|s| s.to_string()).collect(), @@ -659,7 +695,7 @@ mod tests { // `round` is 1-based: max_rounds = 1 permits round 1 and refuses round 2. let budget = ExplorationBudget { max_rounds: 1, ..Default::default() }; - let next = next_round(&catalog, &[], &ran, 0, "html page", 2, &budget); + let next = next_round(&catalog, &[], &ran, 0, "", "html page", 2, &budget); assert!(next.is_empty(), "should stop after max_rounds"); } @@ -698,6 +734,7 @@ mod tests { test_skill("xss", vec![], vec![]), ]); let ctx = ExplorationContext { + mode: String::new(), recon: "some target".into(), findings: vec![], skills_ran: HashSet::new(), @@ -743,6 +780,7 @@ mod loop_reality_tests { let catalog = catalog_of(skills); let ctx = ExplorationContext { + mode: String::new(), recon: "nginx php mysql /login /api/users".into(), findings: Vec::new(), skills_ran: HashSet::new(), @@ -776,6 +814,7 @@ mod loop_reality_tests { }]); let ctx = ExplorationContext { + mode: String::new(), recon: "nginx php mysql /login".into(), findings: Vec::new(), skills_ran: HashSet::new(), @@ -808,6 +847,7 @@ mod shipped_catalog_tests { assert!(catalog.total() > 100, "catalogue did not load: {}", catalog.total()); let ctx = ExplorationContext { + mode: String::new(), recon: "nginx 1.18 php 7.4 mysql wordpress /wp-admin /api/users?id=1 \ swagger jwt bearer eyJ upload multipart url=https://x" .into(), @@ -836,6 +876,7 @@ mod shipped_catalog_tests { f.severity = "High".into(); let ctx = ExplorationContext { + mode: String::new(), recon: "api gateway".into(), findings: vec![f], skills_ran: ["ssrf".to_string()].into_iter().collect(), @@ -911,7 +952,7 @@ mod budget_tests { // 40 agents already ran in the selection phase. let skills_ran: HashSet = (0..40).map(|i| format!("opening_agent_{i}")).collect(); - let picked = next_round(&catalog, &[], &skills_ran, 0, "php mysql", 1, &budget); + let picked = next_round(&catalog, &[], &skills_ran, 0, "", "php mysql", 1, &budget); assert!(!picked.is_empty(), "exploration refused after a 40-agent opening selection"); } @@ -922,7 +963,7 @@ mod budget_tests { let budget = ExplorationBudget { max_rounds: 3, max_skills_per_round: 5, max_total_skills: 20, }; - let picked = next_round(&catalog, &[], &HashSet::new(), 20, "php", 1, &budget); + let picked = next_round(&catalog, &[], &HashSet::new(), 20, "", "php", 1, &budget); assert!(picked.is_empty(), "budget of 20 did not stop the loop at 20 explored"); } @@ -935,13 +976,110 @@ mod budget_tests { }; for round in 1..=3 { assert!( - !next_round(&catalog, &[], &HashSet::new(), 0, "php", round, &budget).is_empty(), + !next_round(&catalog, &[], &HashSet::new(), 0, "", "php", round, &budget).is_empty(), "round {round} refused with max_rounds = 3", ); } assert!( - next_round(&catalog, &[], &HashSet::new(), 0, "php", 4, &budget).is_empty(), + next_round(&catalog, &[], &HashSet::new(), 0, "", "php", 4, &budget).is_empty(), "round 4 ran with max_rounds = 3", ); } } + +#[cfg(test)] +mod mode_scoping_tests { + use super::*; + + fn repo_root() -> std::path::PathBuf { + std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .ancestors().nth(3).unwrap().to_path_buf() + } + + fn pick(mode: &str, recon: &str, limit: usize) -> Vec<(String, f64)> { + let catalog = load_catalog(&repo_root()); + let ctx = ExplorationContext { + mode: mode.into(), recon: recon.into(), + findings: Vec::new(), skills_ran: HashSet::new(), round: 1, + }; + route(&catalog, &ctx, limit).into_iter() + .map(|s| (s.skill.name, s.score)).collect() + } + + /// The catalogue is not scoped by mode — load_catalog loads every category + /// whatever the engagement is. Source-review skills trigger on terms a web + /// recon contains ("sql", "redirect", "cookie"), so without mode scoping a + /// black-box web run would launch them against a target with no source. + #[test] + fn a_web_run_never_picks_source_review_skills() { + let recon = "nginx php mysql sql query redirect cookie session \ + template render upload jwt cors xml"; + let leaked: Vec = pick("web", recon, 40).into_iter() + .filter(|(n, _)| n.starts_with("code_") || n.starts_with("research_")) + .map(|(n, sc)| format!("{n} ({sc})")) + .collect(); + assert!(leaked.is_empty(), "source-review skills leaked into a web run: {leaked:?}"); + } + + /// And the same recon in whitebox must reach them. + #[test] + fn a_whitebox_run_does_pick_source_review_skills() { + let recon = "repository package.json requirements.txt sql query \ + exec subprocess jwt secret eval"; + let picked = pick("whitebox", recon, 25); + let code = picked.iter().filter(|(n, _)| n.starts_with("code_")).count(); + assert!(code >= 3, "whitebox reached only {code} source-review skill(s): {picked:?}"); + } + + /// AD skills must not fire on a web engagement. + #[test] + fn a_web_run_never_picks_active_directory_skills() { + let recon = "nginx 443 ldap kerberos smb domain tls apache"; + let leaked: Vec = pick("web", recon, 40).into_iter() + .filter(|(n, _)| n.starts_with("ad_") || n.starts_with("linux_") || n.starts_with("windows_")) + .map(|(n, sc)| format!("{n} ({sc})")) + .collect(); + assert!(leaked.is_empty(), "host skills leaked into a web run: {leaked:?}"); + } + + #[test] + fn a_host_run_does_pick_active_directory_skills() { + let recon = "445 smb 389 ldap kerberos 88 domain controller windows"; + let picked = pick("host", recon, 25); + let ad = picked.iter().filter(|(n, _)| n.starts_with("ad_")).count(); + assert!(ad >= 3, "host run reached only {ad} AD skill(s): {picked:?}"); + } + + /// No trigger may be so generic it matches an essentially empty recon. + /// A skill that fires on everything crowds out the ones that matter. + #[test] + fn no_skill_fires_on_a_near_empty_recon() { + let catalog = load_catalog(&repo_root()); + for mode in ["web", "whitebox", "host", "container", "mobile"] { + let ctx = ExplorationContext { + mode: mode.into(), + recon: "the quick brown fox".into(), + findings: Vec::new(), skills_ran: HashSet::new(), round: 1, + }; + let noisy: Vec = route(&catalog, &ctx, 50).into_iter() + .filter(|s| s.score >= 15.0) + .map(|s| s.skill.name) + .collect(); + assert!(noisy.is_empty(), "{mode}: fired on meaningless recon: {noisy:?}"); + } + } + + /// Every chain edge in the shipped catalogue must resolve. + #[test] + fn every_chain_edge_still_resolves() { + let catalog = load_catalog(&repo_root()); + let names: HashSet<&str> = catalog.skills.iter().map(|s| s.name.as_str()).collect(); + let dangling: Vec = catalog.skills.iter() + .flat_map(|s| s.meta.chains.iter().map(move |c| (s.name.clone(), c.clone()))) + .filter(|(_, c)| !names.contains(c.as_str())) + .map(|(s, c)| format!("{s} -> {c}")) + .collect(); + assert!(dangling.is_empty(), "dangling chain edges: {dangling:?}"); + } +} +