From 4b619d57a0c61e7a9cee8473bb0d831c8154dc0e Mon Sep 17 00:00:00 2001 From: Ahmed Allam Date: Thu, 16 Jul 2026 11:31:36 +0000 Subject: [PATCH] docs(prompts,skills): bound recon output for shared-disk hygiene Add lightweight, always-on disk-hygiene guidance so agents keep recon artifacts bounded on the shared /workspace instead of writing very large uncapped crawl output. - system_prompt.jinja: DISK & SCRATCH HYGIENE note in the shared-workspace block; recon PHASE 1 crawl bullet asks to bound each crawl and tidy up. - skills/tooling/katana.md: bound the baseline/deep examples with -ct, add a Keeping-output-manageable note (bound by -ct/-d, reserve -jsl/-kf all for narrowed targets, check du -sh, dedupe and remove raw .jsonl). --- strix/agents/prompts/system_prompt.jinja | 8 +++++++- strix/skills/tooling/katana.md | 12 +++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/strix/agents/prompts/system_prompt.jinja b/strix/agents/prompts/system_prompt.jinja index bfd0ee76..6141179b 100644 --- a/strix/agents/prompts/system_prompt.jinja +++ b/strix/agents/prompts/system_prompt.jinja @@ -240,12 +240,18 @@ AGENT ISOLATION & SANDBOXING: - All agents share the same /workspace directory and proxy history - Agents can see each other's files and proxy traffic for better collaboration +DISK & SCRATCH HYGIENE: +- /workspace is a shared, finite disk used by all agents at once — be a considerate tenant +- Prefer bounded recon: scope crawls and scans by depth, duration, and target rather than "collect everything" +- Send large tool output to /workspace/scratch/, and once you've extracted what you need (e.g. a URL/endpoint list), remove the raw output +- If disk gets tight or a write fails for space, check what's large under /workspace and clean up before continuing + MANDATORY INITIAL PHASES: BLACK-BOX TESTING - PHASE 1 (RECON & MAPPING): - COMPLETE full reconnaissance: subdomain enumeration, port scanning, service detection - MAP entire attack surface: all endpoints, parameters, APIs, forms, inputs -- CRAWL thoroughly: spider all pages (authenticated and unauthenticated), discover hidden paths, analyze JS files +- CRAWL thoroughly: spider all pages (authenticated and unauthenticated), discover hidden paths, analyze JS files — keep each crawl bounded by depth/duration, write to /workspace/scratch, and tidy up raw output once endpoints are extracted - ENUMERATE technologies: frameworks, libraries, versions, dependencies - Reconnaissance should normally happen before targeted vulnerability discovery unless the correct next move is already obvious or the user/system explicitly asks to prioritize a specific area first - ONLY AFTER comprehensive mapping → proceed to vulnerability testing diff --git a/strix/skills/tooling/katana.md b/strix/skills/tooling/katana.md index 82ed6eb9..1abb5da2 100644 --- a/strix/skills/tooling/katana.md +++ b/strix/skills/tooling/katana.md @@ -37,13 +37,13 @@ High-signal flags: - `-silent`, `-j, -jsonl`, `-o ` output controls Agent-safe baseline for automation: -`mkdir -p crawl && katana -u https://target.tld -d 3 -jc -kf robotstxt -c 10 -p 10 -rl 50 -timeout 10 -retry 1 -ef png,jpg,jpeg,gif,svg,css,woff,woff2,ttf,eot,map -silent -j -o crawl/katana.jsonl` +`mkdir -p crawl && katana -u https://target.tld -d 3 -ct 10m -jc -kf robotstxt -c 10 -p 10 -rl 50 -timeout 10 -retry 1 -ef png,jpg,jpeg,gif,svg,css,woff,woff2,ttf,eot,map -silent -j -o crawl/katana.jsonl` Common patterns: - Fast crawl baseline: `katana -u https://target.tld -d 3 -jc -silent` -- Deeper JS-aware crawl: - `katana -u https://target.tld -d 5 -jc -jsl -kf all -c 10 -p 10 -rl 50 -o katana_urls.txt` +- Deeper JS-aware crawl (narrowed target; keep it time-bounded): + `katana -u https://target.tld -d 5 -ct 15m -jc -jsl -kf all -c 10 -p 10 -rl 50 -o katana_urls.txt` - Multi-target run with JSONL output: `katana -list urls.txt -d 3 -jc -silent -j -o katana.jsonl` - Headless crawl with local Chrome: @@ -59,6 +59,12 @@ Critical correctness rules: - For `-kf`, keep depth at least `-d 3` so known files are fully covered. - If writing to a file, ensure parent directory exists before `-o`. +Keeping output manageable: +- katana does not cap its own output size, so bound crawls with `-ct` (crawl-duration) and `-d` (depth); on large sites an unbounded `-jsl` / `-kf all` deep crawl can grow very large. +- Reserve deep JS crawling (`-jsl`, `-kf all`, higher `-d`) for a specific narrowed target rather than broad scopes. +- After a crawl, glance at output size (`du -sh `); if it looks outsized for the scope, tighten `-d`/`-ct`/`-ef` or split per host. +- Dedupe and reduce before use (`sort -u`), and remove the raw `.jsonl` once you've parsed the URLs you need. + Usage rules: - Keep `-d`, `-c`, `-p`, and `-rl` explicit for reproducible runs. - Use `-ef` early to reduce static-file noise before fuzzing.