Skip to main content

GitGalaxy

Repository-scale structural intelligence without compilation.

Docs · Visualizer · Language Crucible · Raw Output

1 scan · 97 structural signals · 50+ languages · no compilation · 19 risk-exposure categories · 6 outputs

The short version

GitGalaxy builds a language-agnostic structural graph of an entire repository directly from source text.

It is designed for repositories that are polyglot, partially broken, legacy, vendor-heavy, or otherwise difficult to analyze through a build-first workflow.

Instead of requiring a successful build and a separate parser/toolchain for every language, GitGalaxy extracts a common vocabulary of structural signatures---functions, classes, arguments, control flow, state mutation, I/O, APIs, dependencies, and other signals---and normalizes those observations into one repository model.

The same graph can then feed:

  • architecture analysis
  • risk-exposure prioritization
  • dependency/SBOM analysis
  • refactoring and ownership analysis
  • legacy-code analysis
  • AI-oriented codebase context
  • CI/CD workflows
  • historical risk analysis

Central thesis: complete language parsing is not always necessary to recover highly useful structural information at repository scale.


The problem

Large repositories routinely contain:

Go + C++ + Python + Java + Bash + YAML
+ generated code + vendored code + legacy code
+ half-migrated modules + broken dependencies

Traditional language tooling can be excellent within its intended scope while still leaving the repository fragmented across language-specific representations.

GitGalaxy makes a different trade:

Source repository
       |
       v
Structural signatures
       |
       v
Normalized entities + risk signals
       |
       v
Deterministic repository graph
       |
       +---- Architecture
       +---- Risk exposure
       +---- Dependencies / SBOM
       +---- AI context
       +---- Refactoring
       +---- Git-history analysis

The objective is not to reproduce every syntactic detail of every language.

The objective is to recover the structural information downstream repository intelligence actually needs.


One graph, many consumers

GitGalaxy's core output is a deterministic structural representation of the repository.


Consumer Question


Architecture What is this repository made of?

Structural analysis Where are the functions, classes, APIs, dependencies and control structures?

Risk exposure Where are potentially important risk patterns concentrated?

Refactoring Which files are complex, high-churn or load-bearing?

Supply chain What dependencies physically exist on disk?

AI context What architecture and relationships should an agent know?

Legacy migration Where are the structural units to transform?

Historical analysis How does measured exposure change as the repository evolves?

GitGalaxy architecture pipeline


The structural-extraction thesis

GitGalaxy deliberately does not begin by constructing a complete AST for every language.

It uses approximately 97 structural-signal categories to identify things such as:

  • function and method boundaries
  • classes and declarations
  • arguments
  • branches and control flow
  • state mutation
  • I/O
  • APIs and routes
  • imports and dependencies
  • unsafe operations
  • reflection and dynamic execution
  • concurrency
  • closures
  • globals
  • entropy and physical-file anomalies

This creates a specific, testable hypothesis:

For repository-scale intelligence, targeted structural extraction can recover the entities required for useful code intelligence without requiring a complete language parser for every file.

That hypothesis is being tested empirically.


Structural validation: GitGalaxy vs Tree-sitter vs Ctags

This is currently one of the most important validation programs in the project.

GitGalaxy is being evaluated against Tree-sitter and Universal Ctags on the same Language Crucible corpus.

The first structural targets are:

  • functions
  • classes
  • arguments

The benchmark is deliberately not treated as a three-tool popularity contest.

When tools disagree:

  1. the disagreement is recorded;
  2. the source is inspected;
  3. each tool's behavior is investigated;
  4. GitGalaxy is fixed when GitGalaxy is wrong;
  5. comparator/adaptor code is fixed when the comparator is wrong;
  6. genuine tool limitations are documented;
  7. the result is re-measured.

24 of 45 languages get all three tools compared, 16 more get two, and 5 GitGalaxy-only languages (abap, dockerfile, jcl, livecode, yaml) get hand-reviewed manual verification instead of cross-tool agreement. Of the 180 discrepancy shapes logged so far, 87 are validated (48%) — read, investigated, and recorded with a verdict, not just counted.

The goal is to finish the audit, close remaining GitGalaxy defects, establish independent ground truth where necessary, and then publish final precision/recall measurements. See the tri-comparison methodology doc for how matching, the ledger lifecycle, and CI enforcement work.

Tri-comparison

See:

What the benchmark is actually asking

Not:

"Is GitGalaxy a better parser than Tree-sitter?"

But:

"For the structural entities GitGalaxy needs to build its repository graph, how accurately can targeted structural extraction recover them compared with established parsing and indexing systems?"

That is the narrower claim the experiment can support.

Languages without suitable comparator coverage

Some languages do not currently have a suitable independent Tree-sitter/Ctags comparison path.

Those are kept in a separate evidentiary category and use committed manual verification rather than pretending cross-tool agreement exists.

This currently includes languages such as:

  • ABAP
  • Dockerfile
  • JCL
  • LiveCode
  • YAML

Where practical, the next step is to add independent lexical, grammar-based, or domain-specific comparators. Where no credible independent comparator exists, human-verified ground truth remains the appropriate category.


Validation is a ladder

GitGalaxy's evidence is being organized around progressively stronger questions.

1. Structural validity

Does GitGalaxy correctly identify code structures?

Tree-sitter + Ctags + independently investigated disagreements. See "Structural validation" above.

2. Regression validity

Does the implementation remain stable on real code?

Golden-master testing against Language Crucible.

3. Scale validity

Does it work on real repositories?

Unedited raw scan output from hundreds of repositories.

4. Model validity

Do structural signatures correspond to the exposure categories they are intended to represent?

Statistical analysis against independently observable outcomes---not merely against GitGalaxy's own equations.

5. Temporal validity

Does exposure behave sensibly as software changes?

Git-history analysis comparing repository states before and after real changes.

6. External validity

Do exposure changes correspond to independently documented security or maintenance outcomes?

Future work: security fixes, regressions, advisories, defects and other external event datasets.

This distinction matters: a score can be internally consistent without necessarily being externally meaningful.


Risk exposure: what GitGalaxy claims

GitGalaxy produces risk-exposure measurements, not vulnerability verdicts.

A high exposure means:

This location deserves attention relative to the rest of the repository.

It does not mean:

"This code is definitely vulnerable."

The current system produces normalized exposure categories across the repository and rolls information from structural entities through files, folders and repository-level views.

The underlying signatures cover patterns involving areas such as:

  • secrets
  • injection surface
  • unsafe/memory operations
  • dynamic execution
  • I/O
  • concurrency
  • state mutation
  • reflection
  • APIs
  • dependencies
  • entropy
  • other structural/security characteristics

The important research question is whether these signatures are empirically associated with meaningful classes of software risk, rather than merely correlated with a score that GitGalaxy itself mathematically constructed.

That distinction drives the next phase.


The next validation: risk over Git history

Once structural validation is sufficiently mature, GitGalaxy can test its exposure model longitudinally.

Git history
    |
    v
security-relevant event
    |
    +-------------------+
    |                   |
    v                   v
parent state        changed state
    |                   |
    v                   v
GitGalaxy scan      GitGalaxy scan
    |                   |
    +---------+---------+
              |
              v
        exposure delta
              |
              v
     independent event class

The central experiment is:

Do commits independently identified as security fixes typically reduce the corresponding GitGalaxy exposure?

Negative controls are equally important:

Do ordinary development commits show the same behavior?

Eventually:

Do security regressions increase exposure?

The planned harness will preserve commit SHA, parent state, changed files/functions, exposure before/after, exposure deltas, structural changes and event classification.

That tests:

structure → exposure → real software evolution

rather than merely testing the internal mathematics of the exposure model.


Evidence, not just claims

Language Crucible

A pinned corpus of real-world source including projects such as Godot, Roslyn, curl, Kubernetes and Apollo 11 flight software.

Language Crucible

Golden-master regression

Real source is rescanned and compared against checked-in expected output so parser changes have an observable diff. Regenerated with tests/tools/update_golden_master.py, never hand-edited.

Tri-comparison

The same corpus is analyzed against GitGalaxy, Tree-sitter and Ctags where coverage exists — 24 of 45 languages get all three tools, 87 of 180 logged discrepancies validated so far. See the methodology and the "structural validation" section above for the full picture.

Raw repository output

Unedited GitGalaxy output is retained for hundreds of independently selected repositories.

Raw Output

Regression suite

7,043 tests in the default suite (python -m pytest tests/), of which 6,165 are per-signature tests across all 45 structurally-signatured languages — positive matches, explicit exclusions, and adversarial/ReDoS inputs. See tests/README.md for the breakdown, and docs/why_gitgalaxy_beats_ast_here.md for specific, evidenced cases where this extraction beats an AST read.

Historical validation

The next research layer will test whether exposure measurements correspond to real security and maintenance events over Git history.


What GitGalaxy is --- and isn't

GitGalaxy is

  • repository-scale structural intelligence
  • language-agnostic source analysis
  • a common structural representation across heterogeneous code
  • risk-exposure prioritization
  • architecture mapping
  • CI-native evidence generation
  • useful on broken/uncompiled repositories
  • designed for local/offline operation

GitGalaxy is not

  • a replacement for CodeQL's deep dataflow analysis
  • a replacement for Semgrep's rule ecosystem
  • a replacement for dependency CVE databases
  • a proof of exploitability
  • a runtime analyzer
  • a complete language parser
  • a guarantee that a high exposure is a vulnerability

Tool Primary question


GitGalaxy What does this entire repository look like, structurally, and where should attention go first?

Tree-sitter What syntactic structure does this source contain?

Ctags Where are the navigable code entities?

Semgrep Does this code match a specified pattern?

CodeQL What data/control relationships can deeper analysis establish?

SCA/CVE tools Is this dependency/version associated with a known advisory?


Real-world scale

GitGalaxy is intended for repositories too heterogeneous or broken for a traditional single-language build-first workflow.

Example: Kubernetes

~1.39M lines across Go, YAML, JSON, Shell and Proto.

End-to-end scan: 50.83 seconds.

GitGalaxy scan speed

See the raw output repository for unedited artifacts.


Outputs

Output Purpose


SARIF CI/security dashboard integration CycloneDX SBOM Dependency inventory/compliance SQLite Queryable repository knowledge graph LLM architecture brief Compact machine/agent-oriented context JSON audit data Forensic/automation workflows 3D visualization data Interactive repository topology

These are different views of the same deterministic scan, rather than independent analysis engines.


Git history and architecture

GitGalaxy already incorporates Git history into signals such as:

  • churn
  • contributor concentration
  • bus-factor exposure
  • refactoring hotspots
  • file ownership
  • temporal activity

The research direction is to extend this from history as a contextual signal to history as an external validation source for the exposure model.


Privacy and deployment

GitGalaxy is designed for local and air-gapped operation.

  • Source code is not sent to a GitGalaxy cloud service.
  • Scanning and vectorization occur locally.
  • The scanner has no runtime network requirement.
  • CI/CD execution can remain inside the user's environment.
  • The browser visualizer operates on locally supplied data.

Installation

pip install gitgalaxy

See the documentation for current commands and configuration.

CI/CD

Templates are provided for:

  • GitHub Actions
  • GitLab CI
  • Bitbucket Pipelines
  • Azure Pipelines
  • generic shell-invocable CI environments

See templates/ and the CI integration guide.


Explore the evidence


Resource What it contains


Documentation Architecture, claims and methodology

Language Crucible Cross-language benchmark and golden corpus

Raw Output Unedited scans of real repositories

tests/README.md Regression and golden-master methodology

tri_comparison_ledger.json Disagreement-by-disagreement validation record

manual_verification.json Reviewed cases where comparator coverage is unavailable

how_to_investigate_a_discrepancy.md Comparator-disagreement methodology

Visualizer Local browser-based repository visualization


Current research direction

GitGalaxy is moving through a sequence of increasingly difficult questions:

Can we scan heterogeneous source without compiling it?

Can we reliably recover the structural entities needed to understand it?

Do those structural measurements correspond to meaningful risk exposure?

Does measured exposure behave correctly as real software evolves?

The Tree-sitter/Ctags validation is currently about halfway complete. The immediate priority is to finish that audit before turning preliminary measurements into stronger claims.

The next major experiment is:

Git history → independently identified change/fix events → GitGalaxy before/after scans → exposure deltas → statistical analysis.

That is where GitGalaxy can begin testing not only whether it sees structure, but whether its structural model tracks meaningful changes in real software.


License

Copyright (c) 2026 Joe Esquibel

GitGalaxy is distributed under the PolyForm Noncommercial License 1.0.0.

See the repository license for full terms.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitgalaxy-2.4.8.tar.gz (4.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitgalaxy-2.4.8-py3-none-any.whl (777.4 kB view details)

Uploaded Python 3

File details

Details for the file gitgalaxy-2.4.8.tar.gz.

File metadata

  • Download URL: gitgalaxy-2.4.8.tar.gz
  • Upload date:
  • Size: 4.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gitgalaxy-2.4.8.tar.gz
Algorithm Hash digest
SHA256 66e19ff5fa5ad8b03e2107a2cf88a0f732fd11a7fa39bbb31fd5ef3bd82fe159
MD5 99e365c5621f3313d1a9898417c4968a
BLAKE2b-256 ace5d9268b5cc5e684652c48caa253e7bd3cbb409a5dc3876b9a7ab58c1fd701

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitgalaxy-2.4.8.tar.gz:

Publisher: publish.yml on squid-protocol/gitgalaxy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitgalaxy-2.4.8-py3-none-any.whl.

File metadata

  • Download URL: gitgalaxy-2.4.8-py3-none-any.whl
  • Upload date:
  • Size: 777.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gitgalaxy-2.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 06bf8cd0319f792b045013e9695d17006c4a19a23a2fddf5c7c8f67d4b5bd2b9
MD5 eb4344c0d1944e9649e51c22b001a613
BLAKE2b-256 09b4bae97773b174dc2603340552b77ec323f8b23a8c065540e5bba1ae55a417

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitgalaxy-2.4.8-py3-none-any.whl:

Publisher: publish.yml on squid-protocol/gitgalaxy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.4.8 This release

2 files

2.4.7

2 files

2.4.6

2 files

2.4.5

2 files

2.4.1

2 files

2.3.43

2 files

2.3.42

2 files

2.3.40

2 files

2.3.39

2 files

2.3.38

2 files

2.3.37

2 files

2.3.36

2 files

2.3.34

2 files

2.3.33

2 files

2.3.32

2 files

2.3.31

2 files

2.3.30

2 files

2.3.29

2 files

2.3.28

2 files

2.3.23

2 files

2.3.22

2 files

2.3.21

2 files

2.3.20

2 files

2.3.18

2 files

2.3.17

2 files

2.3.16

2 files

2.3.15

2 files

2.3.13

2 files

2.3.12

2 files

2.3.10

2 files

2.3.9

2 files

2.3.8

2 files

2.3.7

2 files

2.3.6

2 files

2.3.0

2 files

2.2.6

2 files

2.2.4

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.9

2 files

2.0.8

2 files

2.0.7

2 files

2.0.5

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.1.6

2 files

1.1.5

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page