graphrag-codeproperty-graph 0.4.3__tar.gz → 0.4.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. graphrag_codeproperty_graph-0.4.4/.gitignore +31 -0
  2. graphrag_codeproperty_graph-0.4.4/CHANGELOG.md +16 -0
  3. graphrag_codeproperty_graph-0.4.4/CONTRIBUTING.md +76 -0
  4. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/PKG-INFO +35 -29
  5. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/README.md +30 -23
  6. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/pyproject.toml +8 -10
  7. graphrag_codeproperty_graph-0.4.3/.gitignore +0 -5
  8. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/.github/workflows/publish.yml +0 -0
  9. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/LICENSE +0 -0
  10. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/NOTICE +0 -0
  11. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/ARCHITECTURE.md +0 -0
  12. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/Defining the Master Evidence Graph: A Formal Model for Stateful Software Verdicts.md +0 -0
  13. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/HYBRID-GRAPH.md +0 -0
  14. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/NOTICE.md +0 -0
  15. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/Toward a Master Evidence Graph for Software Verdicts.md +0 -0
  16. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/graphrag_com_redrawn_architecture.md +0 -0
  17. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/graphrag_phased_architecture.md +0 -0
  18. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/neptune_vs_neptune_analytics_cpg_rag_architecture copy.md +0 -0
  19. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/docs/neptune_vs_neptune_analytics_cpg_rag_architecture.md +0 -0
  20. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/sbom/AWS-SERVICES.md +0 -0
  21. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/sbom/SBOM.md +0 -0
  22. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/sbom/codeproperty-graph.cdx.json +0 -0
  23. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/src/codeproperty_graph/__init__.py +0 -0
  24. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/src/codeproperty_graph/delta_ingestor.py +0 -0
  25. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/src/codeproperty_graph/graph_diff.py +0 -0
  26. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/src/codeproperty_graph/manifest_manager.py +0 -0
  27. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/src/codeproperty_graph/models.py +0 -0
  28. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/src/codeproperty_graph/tenant_ops.py +0 -0
  29. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/tests/__init__.py +0 -0
  30. {graphrag_codeproperty_graph-0.4.3 → graphrag_codeproperty_graph-0.4.4}/tests/test_codeproperty_graph.py +0 -0
@@ -0,0 +1,31 @@
1
+ # Kiro
2
+ .kiro/
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+ *.egg-info/
9
+ dist/
10
+ build/
11
+ *.egg
12
+ .eggs/
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+ ENV/
18
+
19
+ # IDE
20
+ .idea/
21
+ .vscode/
22
+ *.swp
23
+
24
+ # OS
25
+ .DS_Store
26
+ Thumbs.db
27
+
28
+ # Testing
29
+ .pytest_cache/
30
+ .coverage
31
+ htmlcov/
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## [0.4.3] - 2026-08-03
4
+
5
+ ### Added
6
+ - Initial public release
7
+ - Joern/Semgrep CPG extraction and ingestion
8
+ - Delta ingestion — skip-or-replace logic to minimize Neptune writes
9
+ - Graph diff comparison between CPG states
10
+ - S3-backed manifest management for repository state tracking
11
+ - AI vulnerability enrichment and risk scoring
12
+ - Tenant lifecycle management (create, purge, replace)
13
+ - CPGNode and CPGEdge Pydantic models (Joern-specific types)
14
+
15
+ ### Dependencies
16
+ - graphrag-document-graph>=3.0.8
@@ -0,0 +1,76 @@
1
+ # Contributing
2
+
3
+ Thank you for your interest in contributing! This project is maintained by [Kanjani AI Research](https://github.com/kanjani-ai-research).
4
+
5
+ ## Development Setup
6
+
7
+ 1. Clone the repository:
8
+ ```bash
9
+ git clone <repo-url>
10
+ cd <project-dir>
11
+ ```
12
+
13
+ 2. Create a virtual environment and install in editable mode with dev dependencies:
14
+ ```bash
15
+ python -m venv .venv
16
+ source .venv/bin/activate
17
+ pip install -e '.[dev]'
18
+ ```
19
+
20
+ ## Running Tests
21
+
22
+ ```bash
23
+ pytest tests/
24
+ ```
25
+
26
+ For coverage:
27
+ ```bash
28
+ pytest tests/ --cov --cov-report=term-missing
29
+ ```
30
+
31
+ ## Code Style
32
+
33
+ This project uses:
34
+ - **[Black](https://github.com/psf/black)** for code formatting
35
+ - **[Ruff](https://github.com/astral-sh/ruff)** for linting
36
+
37
+ Before submitting, ensure your code passes:
38
+ ```bash
39
+ black .
40
+ ruff check .
41
+ ```
42
+
43
+ ## Submitting Pull Requests
44
+
45
+ 1. Fork the repository
46
+ 2. Create a feature branch from `main`:
47
+ ```bash
48
+ git checkout -b feature/your-feature
49
+ ```
50
+ 3. Make your changes, including tests
51
+ 4. Ensure all tests pass and code style checks are clean
52
+ 5. Commit with a clear, descriptive message
53
+ 6. Push and open a Pull Request against `main`
54
+
55
+ ### PR Guidelines
56
+
57
+ - Keep PRs focused — one feature or fix per PR
58
+ - Include tests for new functionality
59
+ - Update documentation if behavior changes
60
+ - Reference any related issues in the PR description
61
+
62
+ ## Reporting Issues
63
+
64
+ Open an issue on GitHub with:
65
+ - A clear description of the problem
66
+ - Steps to reproduce
67
+ - Expected vs actual behavior
68
+ - Python version and OS
69
+
70
+ ## License
71
+
72
+ By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).
73
+
74
+ ## Organization
75
+
76
+ This project is part of the [Kanjani AI Research](https://github.com/kanjani-ai-research) organization.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphrag-codeproperty-graph
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: Code Property Graphs — Joern/Semgrep extraction, AI vulnerability enrichment, risk scoring
5
- Project-URL: Repository, https://github.com/RW-Lab/codeproperty-graph
5
+ Project-URL: Repository, https://github.com/kanjani-ai-research/codeproperty-graph
6
6
  Author-email: Evan Erwee <evan@erwee.com>
7
7
  License-Expression: MIT
8
8
  License-File: LICENSE
@@ -13,30 +13,49 @@ Classifier: Intended Audience :: Developers
13
13
  Classifier: Topic :: Security
14
14
  Classifier: Topic :: Software Development :: Quality Assurance
15
15
  Requires-Python: >=3.11
16
- Requires-Dist: boto3>=1.26.0
17
- Requires-Dist: graphrag-document-graph>=3.0.8
16
+ Requires-Dist: graphrag-document-graph>=3.0.9
18
17
  Provides-Extra: dev
18
+ Requires-Dist: black; extra == 'dev'
19
19
  Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
20
20
  Requires-Dist: pytest-cov>=4.0; extra == 'dev'
21
21
  Requires-Dist: pytest>=7.0; extra == 'dev'
22
- Provides-Extra: graphrag
23
- Requires-Dist: graphrag-toolkit-lexical-graph>=3.18.0; extra == 'graphrag'
22
+ Requires-Dist: ruff; extra == 'dev'
24
23
  Description-Content-Type: text/markdown
25
24
 
26
25
  # Code Property Graph
27
26
 
28
- Code Property Graphs — Joern/Semgrep extraction, AI vulnerability enrichment, risk scoring.
27
+ [![PyPI version](https://img.shields.io/pypi/v/graphrag-codeproperty-graph.svg)](https://pypi.org/project/graphrag-codeproperty-graph/)
28
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
29
29
 
30
- > **This package depends on AWS GraphRAG Toolkit (graphrag-toolkit-lexical-graph) for graph storage, vector indexing, and retrieval.**
30
+ **Code Property Graphs — Joern/Semgrep extraction, AI vulnerability enrichment, risk scoring.**
31
31
 
32
- ## Quick Start
32
+ > **This package depends on AWS GraphRAG Toolkit (graphrag-toolkit-lexical-graph) for graph storage, vector indexing, and retrieval.**
33
33
 
34
- ### Install
34
+ ## Installation
35
35
 
36
36
  ```bash
37
- pip install codeproperty-graph
37
+ pip install graphrag-codeproperty-graph
38
38
  ```
39
39
 
40
+ ## Dependencies
41
+
42
+ - `graphrag-document-graph>=3.0.8` — Document graph infrastructure (typed nodes, Cypher builders, multi-tenancy)
43
+
44
+ This package does **not** depend on `bona`.
45
+
46
+ ## Dependency Chain
47
+
48
+ ```
49
+ graphrag-codeproperty-graph
50
+ └── graphrag-document-graph>=3.0.8
51
+ └── graphrag-toolkit-lexical-graph>=3.18.0 (AWS foundation)
52
+ ├── Neptune graph storage
53
+ ├── OpenSearch Serverless vector indexing
54
+ └── Entity resolution & retrieval
55
+ ```
56
+
57
+ ## Quick Start
58
+
40
59
  ### Python API Example
41
60
 
42
61
  ```python
@@ -49,8 +68,8 @@ result = await ingestor.ingest(
49
68
  repo="my-service",
50
69
  job_id="build-456",
51
70
  tenant_id="tenant_abc123",
52
- nodes_data=joern_nodes, # Joern CPG export
53
- edges_data=joern_edges, # Joern CPG export
71
+ nodes_data=joern_nodes,
72
+ edges_data=joern_edges,
54
73
  nodes_path="s3://bucket/cpg-exports/my-service/build-456/nodes.json",
55
74
  edges_path="s3://bucket/cpg-exports/my-service/build-456/edges.json",
56
75
  graph_store=neptune_store,
@@ -113,7 +132,7 @@ src/codeproperty_graph/
113
132
  │ codeproperty-graph (this package) │
114
133
  │ Joern/Semgrep CPG, delta ingestion, risk scoring │
115
134
  ├─────────────────────────────────────────────────────┤
116
- │ document-graph (infra) │
135
+ │ document-graph │
117
136
  │ Node, Edge, CypherBuilder, PipelineExecutor │
118
137
  │ Multi-tenancy, batch operations │
119
138
  ├─────────────────────────────────────────────────────┤
@@ -144,22 +163,9 @@ from graphrag_toolkit.document_graph import Node, Edge
144
163
  from codeproperty_graph import CPGNode, CPGEdge
145
164
  ```
146
165
 
147
- ### AI Vulnerability Enrichment
148
-
149
- After CPG ingestion, enrich with AI-powered vulnerability analysis:
150
-
151
- ```python
152
- # Query Neptune for high-risk patterns
153
- # Score methods by complexity, dependency depth, and known CVE proximity
154
- # Annotate graph with risk scores for downstream consumption
155
- ```
156
-
157
- ## Requirements
166
+ ## Contributing
158
167
 
159
- - Python >= 3.11
160
- - `document-graph >= 0.1.0`
161
- - `boto3 >= 1.26.0`
162
- - Optional: `graphrag-toolkit-lexical-graph >= 3.18.0`
168
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and PR guidelines.
163
169
 
164
170
  ## License
165
171
 
@@ -1,17 +1,37 @@
1
1
  # Code Property Graph
2
2
 
3
- Code Property Graphs — Joern/Semgrep extraction, AI vulnerability enrichment, risk scoring.
3
+ [![PyPI version](https://img.shields.io/pypi/v/graphrag-codeproperty-graph.svg)](https://pypi.org/project/graphrag-codeproperty-graph/)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
5
 
5
- > **This package depends on AWS GraphRAG Toolkit (graphrag-toolkit-lexical-graph) for graph storage, vector indexing, and retrieval.**
6
+ **Code Property Graphs — Joern/Semgrep extraction, AI vulnerability enrichment, risk scoring.**
6
7
 
7
- ## Quick Start
8
+ > **This package depends on AWS GraphRAG Toolkit (graphrag-toolkit-lexical-graph) for graph storage, vector indexing, and retrieval.**
8
9
 
9
- ### Install
10
+ ## Installation
10
11
 
11
12
  ```bash
12
- pip install codeproperty-graph
13
+ pip install graphrag-codeproperty-graph
13
14
  ```
14
15
 
16
+ ## Dependencies
17
+
18
+ - `graphrag-document-graph>=3.0.8` — Document graph infrastructure (typed nodes, Cypher builders, multi-tenancy)
19
+
20
+ This package does **not** depend on `bona`.
21
+
22
+ ## Dependency Chain
23
+
24
+ ```
25
+ graphrag-codeproperty-graph
26
+ └── graphrag-document-graph>=3.0.8
27
+ └── graphrag-toolkit-lexical-graph>=3.18.0 (AWS foundation)
28
+ ├── Neptune graph storage
29
+ ├── OpenSearch Serverless vector indexing
30
+ └── Entity resolution & retrieval
31
+ ```
32
+
33
+ ## Quick Start
34
+
15
35
  ### Python API Example
16
36
 
17
37
  ```python
@@ -24,8 +44,8 @@ result = await ingestor.ingest(
24
44
  repo="my-service",
25
45
  job_id="build-456",
26
46
  tenant_id="tenant_abc123",
27
- nodes_data=joern_nodes, # Joern CPG export
28
- edges_data=joern_edges, # Joern CPG export
47
+ nodes_data=joern_nodes,
48
+ edges_data=joern_edges,
29
49
  nodes_path="s3://bucket/cpg-exports/my-service/build-456/nodes.json",
30
50
  edges_path="s3://bucket/cpg-exports/my-service/build-456/edges.json",
31
51
  graph_store=neptune_store,
@@ -88,7 +108,7 @@ src/codeproperty_graph/
88
108
  │ codeproperty-graph (this package) │
89
109
  │ Joern/Semgrep CPG, delta ingestion, risk scoring │
90
110
  ├─────────────────────────────────────────────────────┤
91
- │ document-graph (infra) │
111
+ │ document-graph │
92
112
  │ Node, Edge, CypherBuilder, PipelineExecutor │
93
113
  │ Multi-tenancy, batch operations │
94
114
  ├─────────────────────────────────────────────────────┤
@@ -119,22 +139,9 @@ from graphrag_toolkit.document_graph import Node, Edge
119
139
  from codeproperty_graph import CPGNode, CPGEdge
120
140
  ```
121
141
 
122
- ### AI Vulnerability Enrichment
123
-
124
- After CPG ingestion, enrich with AI-powered vulnerability analysis:
125
-
126
- ```python
127
- # Query Neptune for high-risk patterns
128
- # Score methods by complexity, dependency depth, and known CVE proximity
129
- # Annotate graph with risk scores for downstream consumption
130
- ```
131
-
132
- ## Requirements
142
+ ## Contributing
133
143
 
134
- - Python >= 3.11
135
- - `document-graph >= 0.1.0`
136
- - `boto3 >= 1.26.0`
137
- - Optional: `graphrag-toolkit-lexical-graph >= 3.18.0`
144
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and PR guidelines.
138
145
 
139
146
  ## License
140
147
 
@@ -7,7 +7,7 @@ packages = ["src/codeproperty_graph"]
7
7
 
8
8
  [project]
9
9
  name = "graphrag-codeproperty-graph"
10
- version = "0.4.3"
10
+ version = "0.4.4"
11
11
  description = "Code Property Graphs — Joern/Semgrep extraction, AI vulnerability enrichment, risk scoring"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.11"
@@ -22,22 +22,20 @@ classifiers = [
22
22
  ]
23
23
 
24
24
  dependencies = [
25
- "graphrag-document-graph>=3.0.8",
26
- "boto3>=1.26.0",
25
+ "graphrag-document-graph>=3.0.9",
27
26
  ]
28
27
 
29
28
  [project.optional-dependencies]
30
- graphrag = [
31
- "graphrag-toolkit-lexical-graph>=3.18.0",
32
- ]
33
29
  dev = [
34
- "pytest>=7.0",
35
- "pytest-cov>=4.0",
36
- "pytest-asyncio>=0.21.0",
30
+ "pytest>=7.0",
31
+ "pytest-cov>=4.0",
32
+ "pytest-asyncio>=0.21.0",
33
+ "black",
34
+ "ruff",
37
35
  ]
38
36
 
39
37
  [project.urls]
40
- Repository = "https://github.com/RW-Lab/codeproperty-graph"
38
+ Repository = "https://github.com/kanjani-ai-research/codeproperty-graph"
41
39
 
42
40
  [tool.pytest.ini_options]
43
41
  testpaths = ["tests"]
@@ -1,5 +0,0 @@
1
- .venv/
2
- dist/
3
- *.egg-info/
4
- __pycache__/
5
- .pytest_cache/