Skip to content

Add optional data access edges for Read, Write, and Delete - #26

Open
jazofra wants to merge 5 commits into
SpecterOps:mainfrom
jazofra:main
Open

Add optional data access edges for Read, Write, and Delete#26
jazofra wants to merge 5 commits into
SpecterOps:mainfrom
jazofra:main

Conversation

@jazofra

@jazofra jazofra commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Today the only edge that terminates on an MSSQL_Database node representing elevated access is MSSQL_ControlDB (traversable, created from CONTROL on the database or the db_owner fixed role). I want to also surface principals that can read, write, or delete data in a database: a weaker but still security-relevant capability. These new edges must be non-traversable (they are informational, not privilege-escalation paths) and their creation must be opt-in via a new flag so existing output is unchanged by default.

claude and others added 5 commits August 30, 2026 20:59
Introduce three non-traversable, opt-in edges that surface principals who
can read, write, or delete data in a database (previously only the
traversable MSSQL_ControlDB edge connected principals to databases):

- MSSQL_ReadDB   <- SELECT on the database / db_datareader fixed role
- MSSQL_WriteDB  <- INSERT or UPDATE on the database / db_datawriter
- MSSQL_DeleteDB <- DELETE on the database / db_datawriter

Creation is gated behind the new --enable-data-access-edges flag (off by
default) so existing output is unchanged. Sources are explicit
DATABASE-scoped grants in sys.database_permissions and the
db_datareader/db_datawriter fixed roles.

Registers the edge kinds, marks them non-traversable, adds property
generators, schema and seed-data entries, config plumbing, unit tests
(positive, negative, and flag-off cases), and README docs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5TQ7KrD4DuRdFvQ56ChbM
…-edges-hhr8i3

Add opt-in data-access edges (ReadDB/WriteDB/DeleteDB)
The --enable-data-access-edges example was placed after the closing code
fence, causing the shell-comment lines to render as markdown headings.
Move it inside the fenced bash block with the other examples.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5TQ7KrD4DuRdFvQ56ChbM
Resolve conflicts with upstream's AD-edges refactor and version bump:
- Take upstream version 2.0.4
- Keep the new --enable-data-access-edges flag in the Collection annotation group
- Keep upstream's updated --skip-ad-nodes README comment, plus the
  --enable-data-access-edges usage example
- Adapt writeDataAccessEdge to the new edgeSink interface introduced upstream

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5TQ7KrD4DuRdFvQ56ChbM
…-edges-hhr8i3

Claude/database read write delete edges hhr8i3
@jazofra

jazofra commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Fine from my side @Mayyhem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants