Thank you for your interest in contributing! This guide will help you get started.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Making Changes
- Testing
- Code Style
- Pull Request Process
- Reporting Bugs
- Requesting Features
- Secrets & Credentials
- License
This project follows the Contributor Covenant Code of Conduct.
By participating, you agree to uphold this code.
1. Fork and clone
-
Fork the repository on GitHub.
-
Clone your fork locally:
git clone https://github.com/<your-username>/ExtensionShield.git cd ExtensionShield
-
Add the upstream remote:
git remote add upstream https://github.com/<org>/ExtensionShield.git
| Tool | Version | Purpose |
|---|---|---|
| Python | 3.11+ | Backend (FastAPI) |
| Node.js | 20+ | Frontend (React/Vite) |
| uv | latest | Python package manager |
| pre-commit | latest | Git hooks |
| Docker | latest | (Optional) Full-stack local run |
Backend
# Install Python dependencies
make install # or: uv sync
# Copy environment config
cp .env.example .env
# Edit .env and add your API keys (see .env.example for guidance)
# Start the API server (port 8007)
make apiFrontend
cd frontend
# Install Node dependencies
npm install
# Copy environment config
cp .env.example .env
# Edit .env with your Supabase credentials (see .env.example)
# Start the dev server (port 5173)
npm run devPre-commit Hooks
pip install pre-commit # or: uv pip install pre-commit
pre-commit installThis installs hooks for:
- Black (Python formatting)
- Pylint (Python linting)
- gitleaks (secret detection)
- Trailing whitespace, YAML/JSON/TOML validation, large file checks
Docker (full stack)
cp .env.example .env
# Edit .env with your keys
docker compose up --build
# App available at http://localhost:8007ExtensionShield/
├── src/extension_shield/ # Python backend (FastAPI, analyzers, LLM, scoring)
│ ├── api/ # FastAPI app, routes, middleware
│ ├── core/ # Manifest parser, analyzers, report generation
│ ├── scoring/ # Security scoring engine
│ ├── governance/ # Policy rules, evidence, scorecards
│ ├── llm/ # LLM clients (OpenAI, WatsonX, Ollama, Groq)
│ ├── workflow/ # LangGraph analysis workflow
│ └── cli/ # CLI entry point
├── frontend/ # React SPA (Vite, Tailwind, Radix UI)
│ ├── src/components/ # UI components
│ ├── src/pages/ # Route pages
│ └── src/services/ # API clients, auth
├── tests/ # Python tests (pytest)
├── supabase/ # Database schemas and migrations
├── scripts/ # Utility and deployment scripts
└── docs/ # Documentation
Workflow
-
Create a branch from
main:git checkout -b feat/my-feature
-
Make your changes in small, focused commits.
-
Write or update tests for any new functionality.
-
Run the full check suite before pushing:
make format # Auto-format Python make lint # Lint Python make test # Run Python tests cd frontend && npm run lint # Lint frontend cd frontend && npm test # Run frontend tests
Python (Backend)
make test # All tests
uv run pytest tests/ -v # Verbose
uv run pytest tests/api/ -v # API tests only
uv run pytest --cov=extension_shield # With coverageFrontend
cd frontend
npm test # Unit tests (Vitest)
npm run test:coverage # With coverage
npm run test:visual # Visual regression (Playwright)| Language | Formatter | Linter |
|---|---|---|
| Python | Black (line-length=100) | Pylint |
| JavaScript/JSX | Prettier | ESLint |
Pre-commit hooks enforce these automatically. You can also run manually:
# Python
make format && make lint
# Frontend
cd frontend && npm run format && npm run lintChecklist
- Ensure CI passes. All PRs must pass linting, tests, secret scanning, and dependency audits.
- Fill out the PR template. Describe what changed and why.
- Keep PRs focused. One logical change per PR. Large refactors should be discussed in an issue first.
- Request a review. Tag a maintainer or let CODEOWNERS auto-assign.
- Address feedback. Push fixup commits, then squash before merge if requested.
Commit messages (Conventional Commits)
feat: add entropy analyzer for obfuscated code detection
fix: handle missing manifest.json in CRX files
docs: update quickstart with Docker instructions
test: add scoring engine edge case tests
chore: bump fastapi to 0.115.x
Open a GitHub Issue with:
- Steps to reproduce
- Expected vs. actual behavior
- Environment (OS, Python/Node versions, browser)
- Relevant logs or screenshots
Security vulnerabilities: Please follow SECURITY.md instead of opening a public issue.
Open a GitHub Issue tagged enhancement with:
- Problem or use case you're solving
- Proposed solution (if any)
- Alternatives you've considered
Never commit secrets
Never commit secrets, API keys, or production identifiers. Before every push:
make secrets-check.envis gitignored and must never be committed.env.examplecontains only placeholder values- Production Supabase URLs, keys, and tokens belong in your local
.envonly - If you accidentally commit a secret, rotate it immediately and notify maintainers
By contributing to ExtensionShield, you agree that your contributions will be licensed under the MIT License (see LICENSE).
Note: ExtensionShield is open-core. The core scanner is MIT; cloud features (auth, Supabase persistence, history, telemetry admin, community queue, enterprise forms) are proprietary. Contributions to the core are always welcome. See OPEN_CORE_BOUNDARIES.md for details.
Thank you for helping make ExtensionShield better!
Back to README.