graph-db-writes
Skill2.9k starsChanged 9 months agoMITView on GitHub
Writing to the Neo4j attack-surface graph in RedAmon: the tenant-isolation MERGE key every entity node must carry, where graph methods live (mixins, not the client), and the schema places that must be updated together. A MERGE missing the tenant key silently merges one project's data into another's. Trigger: editing anything under graph_db/mixins/; adding or changing an update_graph_from_* method; writing a Cypher MERGE/CREATE that adds a node, relationship or property; adding a new node label to the graph.
Trending
More talk lately.thin dataabout the whole repository
Who's talking about samugit83/redamon
- @agentwire.thecompound.tech“https://github.com/samugit83/redamon more like this: https://agentwire.thecompound.tech/aw/s7ukpg”Bluesky · Oct 2, 2026 · 1 likes
- raphabot/awesome-cybersecurity-agentic-ai“Add RedAmon to Tools”GitHub · Oct 1, 2026
- kyrolabs/awesome-langchain“Add RedAmon to Agents”GitHub · Oct 1, 2026
- enaqx/awesome-pentest“Add RedAmon to Multi-paradigm Frameworks”GitHub · Oct 1, 2026
- The-Art-of-Hacking/h4cker“Add RedAmon to AI Agentic Tools for Cybersecurity”GitHub · Oct 1, 2026
The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 7
Talked about on GitHub and Bluesky (7 times).
On GitHub · 6
- 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
1 more on GitHub
- Jun 6, 2026[Add] RedAmon (samugit83/redamon) — PyTorchKR/landscape0 reactions
On Bluesky · 1
- Oct 2, 2026https://github.com/samugit83/redamon more like this: https://agentwire.thecompound.tech/aw/s7ukpg — @agentwire.thecompound.tech1 likes and repost
In this repository24 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
- agentic/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- recon/CLAUDE.mdCLAUDE.md
- recon_orchestrator/CLAUDE.mdCLAUDE.md
- webapp/CLAUDE.mdCLAUDE.md
- add-community-skillSkill
- add-partial-reconSkill
- agentic-tool-integrationSkill
- builtin-agent-skillSkill
- llm-provider-integrationSkill
- mcp-server-toolsSkill
- orchestrator-container-spawnSkill
- priority-board-triageSkill
- project-settings-cascadeSkill
- recon-ai-enrichmentSkill
- recon-tool-integrationSkill
- redamon-testingSkill
- supply-chain-scanSkill
- traffic-captureSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
NEVER unconditionally
SETa field another tool owns: Use ON CREATE SET for provenance/first-writer fields (e.g. - Distinctive: line 74
When a data provider was paused or a scan host was skipped, "not seen this run" does NOT mean "gone".
- Very specific: line 87
Every read and write carries user_id/project_id.
- Very specific: line 98
Do NOT copy the schema into the prompt or into GRAPH.SCHEMA.md: the prompt splices the catalog in at __GRAPH_SCHEMA__, and GRAPH.SCHEMA.md …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
- Adding or changing any Cypher that writes nodes/relationships/properties, in a
graph_dbmixin or a scan tool that persists to the graph.
For placing a whole new recon tool (which includes its graph write), use
recon-tool-integration; this skill is the
graph-write rules it depends on.
Critical Rules
- NEVER add the tenant key to a reference node, and NEVER omit it from an entity
node. Entity nodes (per-project findings) MERGE on
{<natural_key>, user_id, project_id}- the tenant-isolation triple. A MERGE missinguser_id/project_idmerges one project's data into another's, silently. Global reference nodes (e.g.CVE) key on their natural id only (MERGE (c:CVE {id: $cve_id})); adding tenant keys there fragments shared data. - NEVER edit graph_db/neo4j_client.py directly. It is a thin orchestrator that combines the mixins by inheritance. Graph methods live in the mixin for their domain (see the table below).
- NEVER unconditionally
SETa field another tool owns. UseON CREATE SETfor provenance/first-writer fields (e.g.source) so a later tool merging the same node does not clobber them; use plainSETonly for this tool's own enrichment fields. Reference: graph_db/mixins/graphql_mixin.py:189. - NEVER collect a field in a tool and not write it to the graph. Every field in the tool's output dict must land on a node property or relationship, or it is silent data loss. If it fits no node, map it to the closest property or say why it is dropped.
- NEVER put a map, or a list of maps, in a property. Neo4j rejects it, so
SET v += $propsfails the whole node write and the mixin's per-findingexceptturns that into a silently dropped finding. Flatten first: nuclei'scvesarrive as{id,cvss,url}maps and are stored as id strings vianuclei_cve_idsin graph_db/mixins/recon/vuln_mixin.py. - NEVER delete a finding a person has touched, and NEVER clear findings up
front. A scan MERGEs its findings (which refreshes
updated_at) and afterwards prunes the ones it did not touch - ingest-then-prune, never clear-then-ingest. A half-failed scan that reported nothing would otherwise empty the project, so the CALLER decides whether to prune and only does so after an ingest that actually produced findings. Nodes an operator muted and ones carryingtriage_source = 'human'are never deleted, only stampedstale_since: they hold an operator's mute, verdict and the fix items written against them. A mute a node-filter RULE applied (muted_bystartingrule:) is not a person's decision and is pruned like any stale finding. Reference:prune_unseen_findingsin graph_db/mixins/base_mixin.py, and the four clears that spare them. A delete that spares muted findings takes the node's write lock (SET n._prune_lock = true REMOVE n._prune_lock) BEFORE it readsn:Muted, or a mute committing in between is deleted with the node. An external agent's MCP mute keeps the owner's id inmuted_by, so it is kept like a person's; itsmuted_channel/muted_tokenstamp must be REMOVEd by every unmute and cleared by every other mute, or a later mute inherits it. - NEVER prune a source or host the run could not re-check (circuit breakers).
When a data provider was paused or a scan host was skipped, "not seen this run"
does NOT mean "gone". The caller passes
keep_hosts(anchored regexes, matched against_KEEP_HOST_FIELDSwithtoStringOrNull, passed as a Cypher parameter) toprune_unseen_findings, and skips the prune entirely for a degraded source. What was cut is recorded on theDomaincoverage record —recon_coverage_at,recon_coverage_gaps,recon_skipped_hosts,recon_nuclei_truncated(written byupdate_graph_coveragein graph_db/mixins/recon/domain_mixin.py). Those four are in the webapp'sVOLATILE_PROPERTIES, so they never make aDomainread as "changed" in the Recon Delta. - NEVER write an unscoped
MATCHfor an entity node. Uniqueness is the(id, user_id, project_id)triple, so a natural id is NOT unique across the database andMATCH (n {id: $id})can read or write another project's node. Every read and write carriesuser_id/project_id; agent-facing queries go throughscope_query, neverinject_tenant_filteralone. - ALWAYS reuse an existing node label before inventing one. Discovered
hostnames are
Subdomain, not a new label. Check graph_db/schema_sections.md first - that is the single declaration of every label, property and relationship. - ALWAYS declare a new label / relationship / property in ONE place:
graph_db/schema_sections.md, then re-seed
with
python3 tooling/scripts/seed_schema_catalog.py. A uniqueness key also goes in graph_db/schema_keys.py, from whichschema.pyrenders itsCREATE CONSTRAINTstatements. Do NOT copy the schema into the prompt or into GRAPH.SCHEMA.md: the prompt splices the catalog in at__GRAPH_SCHEMA__, and GRAPH.SCHEMA.md deliberately no longer lists labels at all. Three copies is what drifted, and four tests now fail if you make a fourth. Editing or removing a line there failstest_the_composed_document_still_contains_the_baselinein recon/tests/test_schema_catalog.py (additions pass: it is a CONTAINS check, so a stale golden file can sit unnoticed). Refresh the fixture in the same commit with the command in that test's docstring, then read the fixture diff. Still updateNODE_COLORSin webapp/src/app/graph/config/colors.ts, which is presentation, not schema.
MERGE: the copy target
// entity node - tenant-scoped: the {natural key, user_id, project_id} triple is mandatory
MERGE (bu:BaseURL {url: $baseurl, user_id: $user_id, project_id: $project_id})
ON CREATE SET bu.source = 'graphql_scan', bu.updated_at = datetime() // provenance: first writer only
MERGE (e:Endpoint {path: $path, method: 'POST', baseurl: $baseurl, user_id: $user_id, project_id: $project_id})
ON CREATE SET e.source = 'graphql_scan'
SET e += $props // this tool's own enrichment fields
MERGE (bu)-[:HAS_ENDPOINT]->(e)
// reference node - global: natural id only, NO tenant key
MERGE (c:CVE {id: $cve_id})Copied from graph_db/mixins/graphql_mixin.py.
Which mixin
| Writing | Mixin |
| core recon phases (subdomains, IPs, ports, HTTP, endpoints) | recon_mixin.py |
| passive OSINT enrichment | osint_mixin.py |
| secrets / credentials | secret_mixin.py |
| vuln scan (GVM) | gvm_mixin.py |
| GraphQL probes | graphql_mixin.py |
| supply-chain packages | supply_chain_mixin.py |
Resources
- graph_db/schema_sections.md - THE declaration: every label, property and relationship
- graph_db/schema_keys.py - each label's uniqueness key; schema.py renders its constraints from it
- docs/readmes/GRAPH.SCHEMA.md - the rationale: design principles, tenancy strategy, the Muted label. No longer lists labels
- graph_db/neo4j_client.py - the mixin MRO (do not edit; edit a mixin)
- Related skill:
recon-tool-integration
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.

