GitScope is a two-part local tool:
-
gitScope.cppscanner – pulls metadata from a GitHub repository and exports it torepo.json. It also performs a security sweep that checks for:- Classification – “Safe / Moderate Risk / High Risk” based on cumulative findings.
- Risk Score – integer value that increases as secrets, missing ignores, or dependency folders are detected.
- Has .env file – flags exposed environment files anywhere in the tree.
- Has .gitignore – warns when it’s missing at the root or inside nested folders.
- API Keys Exposed – surfaces filenames containing
key,token,secret, etc.
-
React + Vite frontend – reads
repo.jsonfrom disk and renders:- A Commit Graph panel (see sample below) that visualizes branches, merges, and commit ordering.
- A Safety Standards Report (sample below) that mirrors the scanner’s fields with glowing status rows.
This is a local-only workflow: the frontend simply fetches repo.json from the project root, so there is no backend server.
- Install libcurl headers (example for Debian/Ubuntu):
sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev- If you don’t already have the single-header JSON dependency, pull it directly:
curl -L https://github.com/nlohmann/json/releases/latest/download/json.hpp -o json.hpp- Install frontend dependencies:
npm installYou’ll need g++ with libcurl and OpenSSL development headers.
g++ gitScope.cpp -o gitscope -lcurl -lssl -lcrypto- The repository already includes a prebuilt
gitscopeexecutable, but recompile with the command above whenever you changegitScope.cpp. - Run the scanner and follow the prompt for a GitHub repository URL:
./gitscopeThis produces repo.json in the project root.
npm run dev- The Vite dev server serves the React dashboard on
http://localhost:5173. - After each new
repo.jsonexport, refresh the browser to load the latest data.
├─ gitScope.cpp # C++ scanner and safety audit
├─ gitscope # Compiled executable (rebuild after edits)
├─ repo.json # Scanner output consumed by the frontend
├─ src/ # React components (RepoInfo, CommitGraph, SafetyStandards, etc.)
└─ public/ # Static assets
Feel free to tailor the dashboard styling or extend the scanner, keeping the build command above handy whenever you tweak the C++ source.


