Merge pull request #124 from JoasASantos/feat/skill-frontmatter

feat(skills): routing frontmatter so the exploration loop can run
This commit is contained in:
Joas A Santos authored and GitHub committed 2026-12-04 11:17:41 -03:00
commit 72f21ed13b
92 files changed
+711

No files matched your search

+6
View File
@@ -1,3 +1,9 @@
---
triggers: admin, role, permission, acl
chains: privilege_escalation, bfla
priority: 24
max_rounds: 2
---
# Access-Control Bypass Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: login, reset, email, account
chains: privilege_escalation
priority: 26
max_rounds: 1
---
# Account Takeover Chain Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: key, token, secret, api_key, bearer
chains: cloud_iam_privesc, s3_bucket_misconfiguration, ai_api_key_exfiltration
priority: 28
max_rounds: 2
---
# API Key Exposure Specialist Agent
## User Prompt
You are testing **{target}** for API Key Exposure — secrets shipped to the client or leaked in artifacts, and proving what they unlock.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: file, download, read, path
chains: source_code_disclosure, env_file_exposure, api_key_exposure
priority: 24
max_rounds: 2
---
# Arbitrary File Read Specialist Agent
## User Prompt
You are testing **{target}** for Arbitrary File Read / path traversal / LFI.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: login, auth, session, admin
chains: privilege_escalation, account_takeover_chain, exposed_admin_panel
priority: 28
max_rounds: 2
---
# Authentication Bypass Specialist Agent
## User Prompt
You are testing **{target}** for Authentication Bypass.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: aws, ec2, imds, 169.254
chains: cloud_iam_privesc, s3_bucket_misconfiguration
priority: 24
max_rounds: 1
---
# AWS IMDSv2 SSRF Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: azure, imds, metadata
chains: cloud_iam_privesc, azure_blob_public
priority: 22
max_rounds: 1
---
# Azure IMDS SSRF Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: backup, .bak, .old, .zip, .sql
chains: source_code_disclosure, api_key_exposure
priority: 22
max_rounds: 1
---
# Backup File Exposure Specialist Agent
## User Prompt
You are testing **{target}** for Backup File Exposure.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: /api, admin, role, function
chains: privilege_escalation, mass_assignment
priority: 24
max_rounds: 2
---
# BFLA Specialist Agent
## User Prompt
You are testing **{target}** for Broken Function Level Authorization (BFLA / OWASP API5).
+6
View File
@@ -1,3 +1,9 @@
---
triggers: /api, id, object, rest
chains: api_bola_chained, excessive_data_exposure, bfla
priority: 26
max_rounds: 2
---
# BOLA Specialist Agent
## User Prompt
You are testing **{target}** for Broken Object Level Authorization (BOLA / OWASP API1).
+6
View File
@@ -1,3 +1,9 @@
---
triggers: cart, order, payment, price, coupon
chains: price_manipulation, coupon_logic_abuse, workflow_step_skip
priority: 22
max_rounds: 2
---
# Business Logic Specialist Agent
## User Prompt
You are testing **{target}** for Business Logic vulnerabilities.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: cache, cdn, varnish, cloudflare, age:
chains: web_cache_deception, cdn_cache_key_poisoning
priority: 20
max_rounds: 2
---
# Web Cache Poisoning Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: aws, gcp, azure, iam, role, sts
chains: s3_bucket_misconfiguration, presigned_url_abuse
priority: 26
max_rounds: 1
---
# Cloud IAM Privilege-Escalation Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: aws, gcp, azure, 169.254, metadata
chains: cloud_iam_privesc, s3_bucket_misconfiguration, api_key_exposure
priority: 28
max_rounds: 1
---
# Cloud Metadata Exposure Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: wordpress, drupal, joomla, cms, magento
chains: wordpress_audit, drupal_audit, joomla_audit, cms_default_admin
priority: 24
max_rounds: 1
---
# CMS Fingerprint & Version Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: cmd, exec, ping, system, shell, upload
chains: privilege_escalation, container_escape
priority: 30
max_rounds: 2
---
# OS Command Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: cors, origin, access-control
chains: excessive_data_exposure, account_takeover_chain
priority: 22
max_rounds: 1
---
# CORS Misconfiguration Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: header, location, redirect
chains: response_splitting, cache_poisoning
priority: 16
max_rounds: 1
---
# CRLF Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: form, post, cookie, samesite
chains: account_takeover_chain
priority: 18
max_rounds: 2
---
# CSRF Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: version, cve, outdated
chains: command_injection, privilege_escalation, cve_poc_finder
priority: 26
max_rounds: 2
---
# Known-CVE Exploitation Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: server, x-powered-by, version, apache, nginx, iis
chains: cve_known_exploitation, cve_poc_finder, outdated_component
priority: 30
max_rounds: 2
---
# CVE Version Fingerprint Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: admin, login, cms, wordpress, jenkins, tomcat
chains: privilege_escalation, exposed_admin_panel, command_injection
priority: 26
max_rounds: 1
---
# Default Credentials Specialist Agent
## User Prompt
You are testing **{target}** for Default Credentials.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: index of, directory listing, autoindex
chains: backup_file_exposure, source_code_disclosure
priority: 18
max_rounds: 1
---
# Directory Listing Specialist Agent
## User Prompt
You are testing **{target}** for Directory Listing vulnerabilities.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: drupal, /sites/default
chains: cve_known_exploitation, default_credentials
priority: 22
max_rounds: 1
---
# Drupal Security Audit Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: .env, env, dotenv
chains: api_key_exposure, cloud_iam_privesc, exposed_datastore
priority: 28
max_rounds: 1
---
# Exposed .env / Config Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: admin, /wp-admin, manager, console, dashboard
chains: default_credentials, privilege_escalation
priority: 24
max_rounds: 1
---
# Exposed Admin Panel Specialist Agent
## User Prompt
You are testing **{target}** for Exposed Administration Panels.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: swagger, openapi, /docs, redoc, api-docs
chains: bfla, api_bola_numeric_ids, mass_assignment
priority: 24
max_rounds: 1
---
# Exposed API Documentation Specialist Agent
## User Prompt
You are testing **{target}** for Exposed API Documentation.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: upload, multipart, attachment, file
chains: command_injection, php2shell_exploit, zip_slip, path_traversal
priority: 30
max_rounds: 2
---
# File Upload Vulnerability Specialist Agent
## User Prompt
You are testing **{target}** for Arbitrary File Upload vulnerabilities.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: gcp, google, metadata
chains: cloud_iam_privesc, gcs_bucket_misconfig
priority: 22
max_rounds: 1
---
# GCP Metadata SSRF Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: /.git, .git/, git
chains: source_code_disclosure, ci_cd_secret_leak, api_key_exposure
priority: 28
max_rounds: 1
---
# Exposed .git Repository Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: graphql, /graphql, apollo
chains: graphql_injection, graphql_field_suggestion, bfla, api_excessive_data
priority: 26
max_rounds: 1
---
# GraphQL Introspection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: host, x-forwarded-host, proxy
chains: password_reset_poisoning, cache_poisoning
priority: 20
max_rounds: 1
---
# Host Header Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: cloudflare, akamai, proxy, cdn, keep-alive
chains: http_desync_cl_te, http_desync_te_cl, cache_poisoning
priority: 22
max_rounds: 1
---
# HTTP Request Smuggling Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: id=, user, account, /api, uuid, numeric
chains: bola, excessive_data_exposure, account_takeover_chain
priority: 28
max_rounds: 2
---
# IDOR Specialist Agent
## User Prompt
You are testing **{target}** for Insecure Direct Object References (IDOR).
@@ -1,3 +1,9 @@
---
triggers: java, php, python, pickle, serial, viewstate
chains: command_injection, pickle_deserialization, yaml_deserialization
priority: 26
max_rounds: 2
---
# Insecure Deserialization Specialist Agent
## User Prompt
You are testing **{target}** for Insecure Deserialization.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: java, spring, tomcat, jboss
chains: log4shell_jndi, insecure_deserialization
priority: 22
max_rounds: 1
---
# Java4Shell CVE-2026-114938 Detection Agent
CWE-787 (Out-of-bounds Write) · CWE-190 (Integer Underflow)
+6
View File
@@ -1,3 +1,9 @@
---
triggers: joomla, /administrator
chains: default_credentials, cve_known_exploitation
priority: 20
max_rounds: 1
---
# Joomla Security Audit Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: javascript, .js, bundle, webpack, spa
chains: api_key_exposure, spa_api_discovery, spa_hidden_admin
priority: 24
max_rounds: 2
---
# JavaScript Source Deep Analysis Agent
## User Prompt
You are reading **{target}**'s client-side code as source, not as text to grep.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: jwt, eyj, rs256, hs256
chains: auth_bypass, privilege_escalation
priority: 24
max_rounds: 1
---
# JWT Algorithm Confusion Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: jwt, kid, eyj
chains: auth_bypass, lfi
priority: 20
max_rounds: 1
---
# JWT kid Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: jwt, bearer, eyj, token, authorization
chains: jwt_alg_confusion, jwt_kid_injection, weak_jwt_secret_bruteforce, privilege_escalation
priority: 28
max_rounds: 2
---
# JWT Token Manipulation Specialist Agent
## User Prompt
You are testing **{target}** for JWT Token Manipulation.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: ldap, activedirectory, directory
chains: auth_bypass
priority: 18
max_rounds: 1
---
# LDAP Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: file, path, include, page=, template, php
chains: source_code_disclosure, env_file_exposure, php2shell_exploit, arbitrary_file_read
priority: 28
max_rounds: 2
---
# Local File Inclusion Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: llm, chat, ai, prompt
chains: llm_excessive_agency, ai_api_key_exfiltration
priority: 20
max_rounds: 1
---
# System Prompt Leak Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: llm, tool, function, agent, mcp
chains: llm_excessive_agency, command_injection
priority: 24
max_rounds: 2
---
# LLM Tool-Invocation Abuse Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: java, log4j, spring, tomcat
chains: command_injection, privilege_escalation
priority: 26
max_rounds: 1
---
# JNDI Lookup Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: login, signin, auth, sql
chains: privilege_escalation, account_takeover_chain
priority: 24
max_rounds: 1
---
# Authentication SQLi Bypass Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: json, api, put, patch, register
chains: privilege_escalation, register_privilege_mass_assign
priority: 22
max_rounds: 2
---
# Mass Assignment Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: mongo, nosql, couch, elasticsearch
chains: excessive_data_exposure, auth_bypass
priority: 22
max_rounds: 2
---
# NoSQL Injection Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: oauth, openid, sso, authorize, client_id
chains: oauth_open_redirect_chain, oauth_pkce_downgrade, account_takeover_chain
priority: 24
max_rounds: 2
---
# OAuth Misconfiguration Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: redirect, url=, next=, return
chains: oauth_open_redirect_chain, ssrf
priority: 18
max_rounds: 2
---
# Open Redirect Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: hibernate, sequelize, django, rails, orm
chains: sqli_error, excessive_data_exposure
priority: 18
max_rounds: 2
---
# ORM Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: version, server, x-powered-by
chains: cve_known_exploitation, vulnerable_dependency
priority: 20
max_rounds: 2
---
# Outdated Component Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: reset, forgot, password, host
chains: account_takeover_chain
priority: 22
max_rounds: 1
---
# Password Reset Poisoning Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: file, path, download, ../, static
chains: arbitrary_file_read, source_code_disclosure
priority: 26
max_rounds: 2
---
# Path Traversal Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: php
chains: command_injection, privilege_escalation
priority: 24
max_rounds: 1
---
# PHP2Shell CVE-2026-109618/109619 Exploit Agent
CWE-416 (Use After Free) · CWE-119 (Buffer Overflow)
+6
View File
@@ -1,3 +1,9 @@
---
triggers: php, wordpress, laravel
chains: php2shell_exploit
priority: 22
max_rounds: 1
---
# PHP2Shell CVE-2026-109618/109619 Scanner Agent
CWE-416 (Use After Free) · CWE-119 (Buffer Overflow)
@@ -1,3 +1,9 @@
---
triggers: python, pickle, flask, django
chains: command_injection
priority: 22
max_rounds: 1
---
# Python Pickle Deserialization Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: admin, role, user, privilege
chains: account_takeover_chain, exposed_admin_panel
priority: 26
max_rounds: 2
---
# Privilege Escalation Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: llm, chat, ai, gpt, claude, assistant
chains: llm_system_prompt_leak, llm_tool_invocation_abuse, prompt_injection_indirect
priority: 24
max_rounds: 2
---
# Direct Prompt Injection Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: llm, rag, retrieval, ai, agent
chains: llm_rag_poisoning, llm_tool_invocation_abuse
priority: 22
max_rounds: 2
---
# Indirect Prompt Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: node, javascript, json, merge, lodash
chains: prototype_pollution_gadget_hunt, xss_dom, command_injection
priority: 22
max_rounds: 2
---
# Prototype Pollution Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: api, transfer, coupon, balance, order
chains: business_logic, price_manipulation
priority: 20
max_rounds: 1
---
# Race Condition Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: php, include, url=
chains: command_injection
priority: 22
max_rounds: 1
---
# Remote File Inclusion Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: s3, bucket, aws, amazonaws
chains: s3_bucket_takeover, presigned_url_abuse
priority: 22
max_rounds: 1
---
# S3 Bucket Misconfiguration Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: session, cookie, jsessionid, phpsessid
chains: account_takeover_chain
priority: 18
max_rounds: 1
---
# Session Fixation Specialist Agent
## User Prompt
@@ -1,3 +1,9 @@
---
triggers: php, jsp, asp, .bak, source
chains: api_key_exposure, sqli_error, insecure_deserialization
priority: 22
max_rounds: 2
---
# Source Code Disclosure Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: .map, sourcemap, webpack, react, vue, angular
chains: js_source_deep_analysis, api_key_exposure, spa_api_discovery
priority: 28
max_rounds: 2
---
# Sourcemap & Build Artifact Exposure Agent
CWE-540 (Inclusion of Sensitive Information in Source Code) · CWE-200 (Information Exposure)
+6
View File
@@ -1,3 +1,9 @@
---
triggers: spa, react, vue, angular, xhr, fetch
chains: api_bola_numeric_ids, bfla, api_excessive_data
priority: 22
max_rounds: 2
---
# SPA API & Route Discovery Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: sql, mysql, postgres, mssql
chains: sqli_time, postgres_superuser_rce
priority: 20
max_rounds: 2
---
# Blind SQL Injection (Boolean) Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: sql, mysql, postgres, mssql, oracle, php, id=, query
chains: sqli_union, sqli_blind, postgres_superuser_rce, source_code_disclosure
priority: 26
max_rounds: 2
---
# Error-Based SQL Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: sql, mysql, postgres
chains: postgres_superuser_rce
priority: 18
max_rounds: 1
---
# Time-Based Blind SQL Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: sql, mysql, postgres, mssql
chains: postgres_superuser_rce, source_code_disclosure, privilege_escalation
priority: 22
max_rounds: 2
---
# Union-Based SQL Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: url=, callback, webhook, proxy, fetch, import, redirect
chains: ssrf_cloud, cloud_metadata_exposure, aws_imds_v2_bypass, gcp_metadata_ssrf
priority: 30
max_rounds: 2
---
# SSRF Specialist Agent
## User Prompt
You are testing **{target}** for Server-Side Request Forgery (SSRF).
+6
View File
@@ -1,3 +1,9 @@
---
triggers: aws, gcp, azure, cloud, metadata
chains: cloud_metadata_exposure, cloud_iam_privesc
priority: 26
max_rounds: 1
---
# Cloud SSRF / Metadata Specialist Agent
## User Prompt
You are testing **{target}** for SSRF to Cloud Metadata Services.
+6
View File
@@ -1,3 +1,9 @@
---
triggers: jinja, twig, freemarker, velocity, thymeleaf, handlebars, template
chains: ssti_jinja2, ssti_freemarker, ssti_thymeleaf, ssti_velocity, command_injection
priority: 26
max_rounds: 1
---
# Server-Side Template Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: freemarker, java, spring
chains: command_injection
priority: 20
max_rounds: 1
---
# FreeMarker SSTI Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: jinja, flask, python, django
chains: command_injection
priority: 22
max_rounds: 1
---
# Jinja2 SSTI Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: thymeleaf, spring, java
chains: command_injection
priority: 20
max_rounds: 1
---
# Thymeleaf SSTI Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: velocity, java
chains: command_injection
priority: 18
max_rounds: 1
---
# Velocity SSTI Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: cname, subdomain, dns
chains: s3_bucket_takeover
priority: 22
max_rounds: 1
---
# Subdomain Takeover Specialist Agent
## User Prompt
You are testing **{target}** for Subdomain Takeover.
@@ -1,3 +1,9 @@
---
triggers: jwt, hs256, eyj
chains: jwt_forgery_spa, privilege_escalation
priority: 20
max_rounds: 1
---
# Weak JWT Secret Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: wordpress, wp-content, wp-json, wp-admin
chains: default_credentials, vulnerable_dependency, file_upload
priority: 26
max_rounds: 1
---
# WordPress Security Audit Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: xpath, xml
chains: auth_bypass
priority: 16
max_rounds: 1
---
# XPath Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: javascript, hash, location, innerhtml, spa
chains: dom_clobbering, prototype_pollution
priority: 22
max_rounds: 2
---
# DOM XSS Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: search, q=, query, param, input, html
chains: xss_stored, blind_xss, session_fixation
priority: 24
max_rounds: 2
---
# Reflected XSS Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: comment, profile, post, message, upload
chains: account_takeover_chain, blind_xss
priority: 26
max_rounds: 2
---
# Stored XSS Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: xml, soap, svg, docx, xsd, upload
chains: arbitrary_file_read, ssrf, xxe_oob_exfiltration
priority: 26
max_rounds: 2
---
# XXE Injection Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: xml, soap, xxe
chains: arbitrary_file_read
priority: 20
max_rounds: 1
---
# OOB XXE Exfiltration Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: yaml, yml, snakeyaml, ruby
chains: command_injection
priority: 20
max_rounds: 1
---
# Unsafe YAML Deserialization Specialist Agent
## User Prompt
+6
View File
@@ -1,3 +1,9 @@
---
triggers: zip, archive, upload, extract
chains: arbitrary_file_delete
priority: 18
max_rounds: 1
---
# Zip Slip Specialist Agent
## User Prompt
+165
View File
@@ -696,3 +696,168 @@ mod tests {
assert_eq!(scored.len(), 2, "first round should include all skills even without triggers");
}
}
#[cfg(test)]
mod loop_reality_tests {
use super::*;
/// Build a catalogue in memory the way `load_catalog` builds it from disk.
fn catalog_of(skills: Vec<Skill>) -> SkillCatalog {
let by_name = skills.iter().enumerate().map(|(i, s)| (s.name.clone(), i)).collect();
let chain_map = skills.iter()
.filter(|s| !s.meta.chains.is_empty())
.map(|s| (s.name.clone(), s.meta.chains.clone()))
.collect();
SkillCatalog { skills, by_name, chain_map }
}
/// Mirrors what the exploration loop actually does: skills carry no
/// frontmatter (none of the 530 shipped agents do) and the loop starts at
/// round 1, not 0. The initial-sweep fallback in `route` is gated on
/// round == 0, so it never fires here.
#[test]
fn no_frontmatter_at_round_one_routes_nothing() {
let skills: Vec<Skill> = ["sql_injection", "xss_reflected", "ssrf_basic"]
.iter()
.map(|n| Skill {
name: n.to_string(),
title: n.to_string(),
cwe: String::new(),
category: "vuln".into(),
meta: SkillMeta::default(),
system: String::new(),
user: String::new(),
})
.collect();
let catalog = catalog_of(skills);
let ctx = ExplorationContext {
recon: "nginx php mysql /login /api/users".into(),
findings: Vec::new(),
skills_ran: HashSet::new(),
round: 1,
};
let picked = route(&catalog, &ctx, 5);
assert!(
picked.is_empty(),
"expected nothing routable without frontmatter at round 1, got {:?}",
picked.iter().map(|s| (&s.skill.name, s.score)).collect::<Vec<_>>()
);
}
/// The same catalogue with triggers routes immediately.
#[test]
fn triggers_make_the_same_catalogue_routable() {
let mut meta = SkillMeta::default();
meta.triggers = vec!["php".into(), "mysql".into()];
meta.priority = 20;
meta.max_rounds = 2;
let catalog = catalog_of(vec![Skill {
name: "sql_injection".into(),
title: "SQL Injection".into(),
cwe: "CWE-89".into(),
category: "vuln".into(),
meta,
system: String::new(),
user: String::new(),
}]);
let ctx = ExplorationContext {
recon: "nginx php mysql /login".into(),
findings: Vec::new(),
skills_ran: HashSet::new(),
round: 1,
};
let picked = route(&catalog, &ctx, 5);
assert_eq!(picked.len(), 1);
// two trigger hits (20) + priority 20 * 0.5 (10) = 30, over the 15 gate
assert!(picked[0].score >= 15.0, "score {} below the round>0 gate", picked[0].score);
}
}
#[cfg(test)]
mod shipped_catalog_tests {
use super::*;
fn repo_root() -> std::path::PathBuf {
// crates/harness -> crates -> neurosploit-rs -> repo root
std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.ancestors().nth(3).unwrap().to_path_buf()
}
/// The shipped catalogue must route at round 1, where the exploration loop
/// actually starts. Before frontmatter existed this returned nothing, so
/// the loop broke on its first iteration and never ran a round.
#[test]
fn shipped_catalogue_routes_at_round_one() {
let catalog = load_catalog(&repo_root());
assert!(catalog.total() > 100, "catalogue did not load: {}", catalog.total());
let ctx = ExplorationContext {
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(),
findings: Vec::new(),
skills_ran: HashSet::new(),
round: 1,
};
let picked = route(&catalog, &ctx, 10);
assert!(!picked.is_empty(), "nothing routed at round 1");
// next_round's gate for any round past the first.
let over_gate = picked.iter().filter(|s| s.score >= 15.0).count();
assert!(over_gate >= 5, "only {over_gate} skill(s) clear the score>=15 gate");
}
/// A confirmed finding must pull its chained skills in, which is what makes
/// the loop continue past the round that produced the finding.
#[test]
fn a_finding_chains_into_followup_skills() {
let catalog = load_catalog(&repo_root());
let mut f = crate::types::Finding::default();
f.agent = "ssrf".into();
f.id = "ssrf-1".into();
f.severity = "High".into();
let ctx = ExplorationContext {
recon: "api gateway".into(),
findings: vec![f],
skills_ran: ["ssrf".to_string()].into_iter().collect(),
round: 2,
};
let picked = route(&catalog, &ctx, 10);
let chained: Vec<&str> = picked.iter()
.filter(|s| s.reason.contains("chain:"))
.map(|s| s.skill.name.as_str())
.collect();
assert!(
chained.contains(&"cloud_metadata_exposure"),
"ssrf did not chain into cloud_metadata_exposure; chained: {chained:?}"
);
}
/// Every chain target must name a skill that exists, or the edge is dead.
#[test]
fn no_chain_points_at_a_missing_skill() {
let catalog = load_catalog(&repo_root());
let names: HashSet<&str> = catalog.skills.iter().map(|s| s.name.as_str()).collect();
let mut dangling = Vec::new();
for s in &catalog.skills {
for c in &s.meta.chains {
if !names.contains(c.as_str()) {
dangling.push(format!("{} -> {}", s.name, c));
}
}
}
assert!(dangling.is_empty(), "dangling chain edges: {dangling:?}");
}
}