OWASP / OWASP/openshield

feat(graph): [1/3] attack graph foundation - DB schema and ARG rule migration

Open
#331 0 comments 0 reactions 1 assignee View on GitHub

@TFT444 is already working on this.

Since Sep 5, 2026.

core enhancement roadmap
Dominant language
Python
Stars
57
Forks
68
Avg merge
3d 15h
Merged PRs (30d)
17

Description

Objective

Lay the two foundations the rest of the attack graph depends on:
the DB schema and the ARG-based scan data pipeline.

Scope

DB schema (Alembic migration)
  • graph_nodes: node_id, tenant_id, subscription_id, resource_id,
    resource_type, name, location, resource_group, snapshot_id,
    properties (JSONB), created_at, updated_at
  • graph_edges: edge_id, source_node_id, target_node_id,
    relationship_type, evidence_source, evidence_snapshot_id,
    confidence (float), collected_at, properties (JSONB)
  • finding_graph_nodes: finding_id, node_id (links findings to nodes)
ARG rule migration (scanner/engine.py + scanner/rules/)
  • Collect one InventorySnapshot per subscription at scan start
  • Update RuleBase signature to evaluate(snapshot, client)
    where snapshot is primary and client is for SDK enrichment only
  • Migrate all rules in scanner/rules/ to read from snapshot.resources
  • Comment any rule still requiring a direct SDK call

Test plan

  • Migration applies and rolls back cleanly
  • All existing rule tests pass with new interface
  • End-to-end scan time recorded in PR description
  • No regression in finding counts vs old SDK path

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.