logs-management
Skill3.5k starsChanged 9 months agoMITView on GitHub
The per-project logs in ./logs: the orchestrator's scan log archive, file service and sweeper, the agent's per-run log routing and levels, the scans' Verbose/Debug detail, and the Logs tab. Detail is raw data that must never reach a scan's stdout; every path is an id walked by descriptor under a root the agent also writes; the database decides who reads a chat's log, never a meta file; the two redaction copies stay identical. Trigger: editing recon_orchestrator/log_archive/; a container removal or _discard in recon_orchestrator/container_manager.py; the routing, policy or level code of agentic/logging_config.py, agentic/log_redaction.py or the log ContextVars of agentic/agent_context.py; recon/helpers/tool_log.py or a tool_log.record call site; scanners/*/detail_log.py or the supply-chain scanner's detail recorder; webapp/src/lib/logs/, webapp/src/app/api/projects/[id]/logs/, webapp/src/app/api/internal/logs/, webapp/src/app/graph/components/LogsView/ or LoggingSection.tsx; a log{Group}* project setting.
Trending
More talk lately.thin dataabout the whole repository
Who's talking about samugit83/redamon
- @yogsec.bsky.social“RedAmon is an open-source, self-hosted AI penetration testing framework. It maps your attack surface into a …”Bluesky · Oct 15, 2026 · 6 likes
- Athar-HQ/Athar“feat: Add RedAmon rules”GitHub · Nov 25, 2026
- TensorBlock/awesome-mcp-servers“Add RedAmon MCP server”GitHub · Oct 7, 2026
- Jenqyang/Awesome-AI-Agents“Add RedAmon to Applications / Autonomous Agent Task Solver Projects”GitHub · Oct 7, 2026
- frangelbarrera/Awesome-Hacking-with-AI“Add RedAmon to Authorized Security Agents”GitHub · Oct 7, 2026
The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 12
Talked about on GitHub and Bluesky (12 times).
On GitHub · 11
- Nov 25, 2026feat: Add RedAmon rules — Athar-HQ/Athar0 reactions
- Oct 7, 2026Add RedAmon MCP server — TensorBlock/awesome-mcp-servers0 reactions · 2 comments
- Oct 7, 2026Add RedAmon to Applications / Autonomous Agent Task Solver Projects — Jenqyang/Awesome-AI-Agents0 reactions · 1 comment
- Oct 7, 2026Add RedAmon to Authorized Security Agents — frangelbarrera/Awesome-Hacking-with-AI0 reactions · 1 comment
- Oct 7, 2026Add RedAmon to Autonomous AI Pentesting Agents — skyvanguard/awesome-ai-pentesting0 reactions
6 more on GitHub
- Oct 1, 2026Add RedAmon to Tools — raphabot/awesome-cybersecurity-agentic-ai0 reactions
- Oct 1, 2026Add RedAmon to Agents — kyrolabs/awesome-langchain0 reactions
- Oct 1, 2026Add RedAmon to Multi-paradigm Frameworks — enaqx/awesome-pentest0 reactions
- Oct 1, 2026Add RedAmon to AI Agentic Tools for Cybersecurity — The-Art-of-Hacking/h4cker0 reactions
- Oct 1, 2026Add RedAmon to Pentest & Red-Team Agents — scadastrangelove/awesome-ai-security-tools0 reactions · 1 comment
- Jun 6, 2026[Add] RedAmon (samugit83/redamon) — PyTorchKR/landscape0 reactions · 1 comment
On Bluesky · 1
- Oct 15, 2026RedAmon is an open-source, self-hosted AI penetration testing framework. It maps your attack surface into a Neo4j graph, then autonomously… — @yogsec.bsky.socialsays it tested it6 likes and reposts · 1 reply
In this repository26 other files it gives its agents.
- agentic/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- recon/AGENTS.mdAGENTS.md
- recon_orchestrator/AGENTS.mdAGENTS.md
- webapp/AGENTS.mdAGENTS.md
- add-community-skillSkill
- add-partial-reconSkill
- agentic-tool-integrationSkill
- agent-in-the-loopSkill
- builtin-agent-skillSkill
- graph-db-writesSkill
- llm-provider-integrationSkill
- mcp-server-toolsSkill
- navigatorSkill
- orchestrator-container-spawnSkill
- plugin-platformSkill
- priority-board-triageSkill
- project-settings-cascadeSkill
- rbac-authzSkill
- recon-ai-enrichmentSkill
- recon-tool-integrationSkill
- redamon-testingSkill
- supply-chain-scanSkill
- tradecraft-librarySkill
- traffic-captureSkill
- wordlist-catalogSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 123
A group switched off writes nothing: no file, no meta, no events, and a record of no route logged during that run is dropped.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to Use
- Changing what a scan, a chat, a Triage run or a CodeFix session saves, where, at which level.
- Changing how the orchestrator lists, serves, zips, deletes, compresses or expires an entry.
- Changing who may read or delete a log, or the Logs tab and the Logging settings.
The design, layout and troubleshooting are README.LOGS.md.
Also follow orchestrator-container-spawn (a spawn's bind and labels), rbac-authz (every route
check), project-settings-cascade (a logging column), redamon-testing (the tests).
Critical Rules
- NEVER write Verbose or Debug detail to a scan's stdout or stderr. A scan's stdout is the live
drawer, which streams at plain
recon:read(R); detail (command lines, raw tool output) is raw data (R*). Detail goes only underREDAMON_DETAIL_DIR, through tool_log.record (recon) or the scanners'detail_log.py(gvm_scan and its three byte-identical copies). Never turn on a tool's own verbose flag that prints: AI attack's Debug first used garak's-v, which printed target replies to stdout, and now copies only the bytes this run appended to garak's own log (garak_log_pathin main.py). Each kind has a test that stdout is byte-identical at every level (test_tool_log.py, test_scanner_detail_log.py, thetests/test_*_detail_log.pyfiles, test_detail_log.py for AI attack); a new writer or call site adds its own. - NEVER remove a scan container except through
_discard(container_manager.py). A removed container's Docker log is gone for good;_discardfinalizes the entry, then removes withv=True. The stop path once removed recon containers withfunctools.partial(container.remove, force=True), which lost their last lines and leaked two anonymous volumes per run. test_scan_containers_leave_no_volumes.py reads the module's syntax tree and fails on any other removal form. A deliberate stop calls_mark_stopping(container)before its signal, or the entry readsfailed/completed(GVM exits 130, GitHub hunt 0); test_log_archive_stops.py covers each stop path. - Ids, never paths. A caller names an entry by project, group and stem, each checked against
its pattern, and only service.py turns that into
a file:
layout.open_dir_nofollowone component at a time, the leaf withO_NOFOLLOWrelative to its folder's descriptor (layout.py). Neverrealpaththen open, neveros.path.join(root, ...): the agent writes under the same root and the orchestrator runs as root with the Docker socket. The agent opens its files the same way (_open_folder/_open_filein logging_config.py). - A route key is
route_key(raw), never a sanitised id, and the rule lives in four copies:route_keyin logging_config.py and layout.py,routeKeyin ids.ts, and the e2e runner's pinned copy in runner.py. Change all four or none; the same hashes are pinned inids.test.tsandtest_log_service.py. A lossy filter once madesession.abcandsession_abcone folder, so one person wrote into and deleted another's chat log. Never reverse a key: whoever holds the raw id (the database) computes it. - Check the exact name before every open, create or delete of a name derived from a route key or
a stem (
layout.exact_name/open_dir_exact, the agent's_exact_name_at, the runner's_listed). On a case-insensitive diskSESSION_Xopenssession_x: a case-variant conversation id read, deleted and wrote into another person's chat log until713bbf4d. Absent exact name: the orchestrator answers 404 and deletes nothing, the agent sends that route's records to its system log. - The database decides who reads a log; a meta file never does. Anyone on the host can edit a
.meta.json. An agent entry is readable only throughreadableAgentSessions(joins.ts:readableConversationsWhereplusrouteKey(sessionId)equal to the stem), in the list, the read, the download, the zip and the delete alike; a refused entry is the same 404 as a missing one. Nevermeta.session_id, neverrequireConversationRead(its author branch asksagent:chatat W+A, so an author below it would see an entry listed and be refused opening it). "By" names only the project's owner or a current collaborator. - The two redaction copies stay byte-identical, standard library only:
agentic/log_redaction.py and
log_archive/redaction.py
(test_log_redaction_copies.py). Edit both, and bump
REDACTION_VERSIONwith any pattern change: it is written into every meta'sredaction. - A scan never relies on its own redaction; the sweeper never redacts a live run's folder; the
file service serves detail only when it is
redactedand untracked. Scanners carry no copy of the redaction module: what they mask at write time (argv header values and credential flags intool_log, the GMP password in GVM's detail) is by structure, and everything else is written raw for the orchestrator to redact after the run. A Debug scan whose group was switched off before an orchestrator restart was skipped by adoption, then redacted while it still wrote raw lines, and served asredacted. Now adoption takes back an existing entry whatever the switch, the sweeper asks Docker for the live runs by label before it redacts (_live_runsin retention.py) and redacts nothing when Docker cannot answer, and a tracked entry's detail is never zipped (test_log_detail_guard.py). - The logging settings stay
mcp: never,deny_reason: not-tuning,share: gate: neither read nor written over MCP, never in a preset, never set by a RoE document (registry.consistency.test.ts, test_registry_share_key.py). Their risk direction comes from the field's shape (loggingDirectionin settingsRisk.ts: switchdisable, levelhigher,*RetentionDaysshorten); a logging field of another shape has none and fails the gate test. - The agent's log policy never comes from
get_setting. A handler reads the run'scurrent_log_policy(record_policy()); outside every run it takes the defaults, and a route bound where no policy is takes its project's last loaded one, or is held until there is one.get_settingoutside a run's task answers for whichever project loaded last (test_logging_routes.py..._even_after_another_project_loaded). Triage and CodeFix load their settings beforebind_route, or an off run writes its first lines. - A group switched off writes nothing: no file, no meta, no events, and a record of no route
logged during that run is dropped; a scan group off is never tracked, binds no detail and runs at
normal. An off group once kept writing after a Stop (test_log_policy_levels.pytest_off_writes_nothing_not_even_a_metaand its neighbours). - The webapp's start runs
prisma db push --accept-data-loss(the entrypoint in webapp/Dockerfile). Any webapp rebuild pushes whateverschema.prismaholds in the tree, dropping a column that is not there, another session's half-done edit included. Before a rebuild that carries a schema change (a logging column), diff the live database against the tree read-only (Commands) and build only when it isADD COLUMN.
Patterns
A recon tool run recorded for the detail folder (it prints nothing and never raises):
from recon.helpers import tool_log
tool_log.record("katana", cmd,
rc=None if timed_out else process.returncode,
duration_s=elapsed, stdout=katana_out,
stderr=stderr_output, timed_out=timed_out)A logs route that reads one entry, agent entries through the one predicate:
const auth = await requirePermission(request, 'logs:read', { projectId })
if (auth instanceof NextResponse) return auth
const id = logId(group, stem)
if (!id) return invalidLogId()
if (id.group === 'agent' && !(await readableAgentSession(logReader(auth, projectId), id.stem))) return logNotFound()Commands
# the per-file Docker gate, by section (never host pytest)
./redamon.sh test unit
./agentic/run_tests.sh tests/test_logging_routes.py tests/test_log_policy_levels.py
cd webapp && npx vitest run --no-file-parallelism src/lib/logs src/app/api/projects/\[id\]/logs \
src/app/graph/components/LogsView src/lib/authz/sharingWrite.flags.off.test.ts
# before a webapp rebuild that changes schema.prisma: what the start's push would do, read-only
docker compose exec -T webapp sh -c 'cat > /tmp/schema.next.prisma' < webapp/prisma/schema.prisma
docker compose exec -T webapp sh -c \
'npx prisma migrate diff --from-url "$DATABASE_URL" --to-schema-datamodel /tmp/schema.next.prisma --script'Resources
- README.LOGS.md - layout, writers, levels, sweeper, routes, trust model, troubleshooting
- Logs - the tab as users see it
- Related skills:
orchestrator-container-spawn,rbac-authz,project-settings-cascade,redamon-testing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

