Nemesis
AGENTS.md1k starsChanged 6 months agoBSD-3-ClauseView on GitHub
NEVER read, open, or access .env files under any circumstances. This includes: - .env - .env.local - .env.development - .env.production - Any file matching the pattern .env* If you need environment variable information, refer to env.example instead. Nemesis is an open-source, centralized data processing platform (v2.0) that ingests, enriches, and enables collaborative analysis of files collected during offensive security assessments. Built on Docker with Dapr integration, it functions as an "offensive VirusTotal." Nemesis is organized as a multi-service monorepo: -…
- Reads credentials
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 12
If you need environment variable information, refer to env.example instead.
- Distinctive: line 64
Run linting/formatting after each fix/change.
- Distinctive: line 112
Mock external services: Do not make real calls to external dependencies (Dapr, SeaweedFS, PostgreSQL, RabbitMQ, etc.) in unit tests.
- Very specific: line 177
Use $enrichment-module-builder <file type description> to run the guided module workflow for new modules.
- Very specific: line 178
Use $managing-packages <task> when adding, upgrading, removing, or syncing Python dependencies.
- Distinctive: line 182
Follow root Ruff config: 4-space indentation, 120-char line length, double quotes, and sorted imports.
- Very specific: line 216
Do not commit secrets; keep .env local and derive it from env.example.
- Very specific: line 217
When changing runtime topology, update related compose*.yaml and infra/* files in the same commit.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Guidelines
File Restrictions
NEVER read, open, or access .env files under any circumstances. This includes:
.env.env.local.env.development.env.production- Any file matching the pattern
.env*
If you need environment variable information, refer to env.example instead.
Project Overview
Nemesis is an open-source, centralized data processing platform (v2.0) that ingests, enriches, and enables collaborative analysis of files collected during offensive security assessments. Built on Docker with Dapr integration, it functions as an "offensive VirusTotal."
Project Structure & Module Organization
Nemesis is organized as a multi-service monorepo:
projects/: deployable services (for exampleweb_api,file_enrichment,frontend,agents), each typically with its ownpyproject.tomlandtests/.libs/: shared Python libraries (common,file_linking,nemesis_dpapi,file_enrichment_modules).infra/: Docker, Dapr, Traefik, and observability configuration.tools/: repo-level developer scripts (install_dev_env.sh,lint.sh,test.sh,nemesis-ctl.sh).docs/: MkDocs content and generated API documentation assets.
Common Commands
Running Nemesis
# Start production services
./tools/nemesis-ctl.sh start prod
# Start with monitoring, jupyter, and LLM support
./tools/nemesis-ctl.sh start prod --monitoring --jupyter --llm
# Start development environment (always builds)
./tools/nemesis-ctl.sh start dev
# Stop services (use same flags as start)
./tools/nemesis-ctl.sh stop prod --monitoring --jupyter --llm
# Stop and remove volumes
./tools/nemesis-ctl.sh clean prod --monitoring --jupyter --llmDevelopment Setup
# Install all uv dependencies across projects
./tools/install_dev_env.sh
# Install dependencies for a single project
cd projects/web_api && uv syncPackage Management
For adding, upgrading, or removing packages, use the $managing-packages skill.
Linting & Formatting (Ruff)
Run linting/formatting after each fix/change.
# Check all Python code (configured in root pyproject.toml)
uv run ruff check . --fix
# Format code
uv run ruff format .
# Check specific project
cd projects/web_api && uv run ruff check . --fixTesting
# Run tests for a specific project
cd projects/file_enrichment && uv run pytest tests/
# Run single test file
cd projects/web_api && uv run pytest tests/test_specific.py
# Run specific test
cd projects/web_api && uv run pytest tests/test_file.py::test_function_nameDocker Commands
Information about building dev/prod container images can be found in the docker compose docs.
General instructions for dev docker containers/images:
# Build base images first (required before building services)
docker compose -f compose.base.yaml build
# View logs for a service
docker compose logs -f web-api
# Rebuild Dapr-enabled services (must include the -dapr sidecar)
docker compose up -d --build file-enrichment file-enrichment-dapr
docker compose up -d --build web-api web-api-daprNote: Services using Dapr (file-enrichment, web-api, alerting, etc.) have a companion -dapr sidecar container. When rebuilding these services, always restart both the service and its Dapr sidecar to ensure proper communication.
Testing Guidelines
- Write tests for every new feature. New functionality must include tests before it is considered complete.
- Cover both happy path and unhappy path cases. Tests should verify correct behavior with valid inputs (positive cases) and proper error handling with invalid inputs, missing data, edge cases, and failure conditions (negative cases).
- Mock external services. Do not make real calls to external dependencies (Dapr, SeaweedFS, PostgreSQL, RabbitMQ, etc.) in unit tests. Use mocks or fakes to isolate the code under test.
Architecture
Tech Stack
- Python 3.13 with uv for dependency management
- FastAPI for REST services
- React 18 + Vite + TypeScript for frontend
- PostgreSQL for database
- Dapr for pub/sub, workflows, secrets, and service invocation
- RabbitMQ for message queue
- SeaweedFS for object storage
- Traefik for reverse proxy
Directory Structure
projects/ # Microservices
├── web_api/ # FastAPI REST gateway (port 8000)
├── file_enrichment/# File analysis orchestration with Dapr workflows
├── document_conversion/ # Text extraction, PDF conversion
├── cli/ # Command-line file submission tool
├── frontend/ # React web UI
├── alerting/ # Apprise-based notification service
├── housekeeping/ # Cleanup/retention service
├── agents/ # AI-powered alert triage
├── jupyter/ # Jupyter notebook service
├── dotnet_service/ # .NET assembly analysis service
├── titus_scanner/ # Secret scanning with Titus
├── velociraptor_connector/ # Velociraptor integration
└── ...
libs/ # Shared Python libraries
├── common/ # DB connections, logging, models, Dapr wrappers
├── file_enrichment_modules/ # 20+ enrichment module implementations
├── chromium/ # Chrome/Edge data extraction
├── file_linking/ # File association logic
└── nemesis_dpapi/ # Windows DPAPI credential handling
infra/ # Infrastructure configuration
├── dapr/ # Dapr components and workflows
├── postgres/ # Database schema (01-schema.sql)
├── grafana/ # Monitoring dashboards
└── ...Data Flow
- Files uploaded via web_api or cli → stored in SeaweedFS
- file_enrichment receives file events via Dapr pub/sub
- Dapr workflow orchestrates enrichment modules in parallel
- Results written to PostgreSQL, findings published for alerting
- frontend displays results via Hasura GraphQL
Key Configuration
- Root
pyproject.toml: Ruff linting config (line-length: 120, Python 3.12) .env: Passwords, URLs, feature flags (copy fromenv.example)infra/postgres/01-schema.sql: Database schema
Adding Enrichment Modules
New file enrichment modules go in libs/file_enrichment_modules/. Each module implements a standard interface for detecting applicable files and extracting data.
Codex Skills
Repo-local Codex skills live under .codex/skills/.
- Use
$enrichment-module-builder <file type description>to run the guided module workflow for new modules. - Use
$managing-packages <task>when adding, upgrading, removing, or syncing Python dependencies.
Coding Style & Naming Conventions
- Python version target is 3.13 (
>=3.13,<3.14in project manifests). - Follow root Ruff config: 4-space indentation, 120-char line length, double quotes, and sorted imports.
- Naming: Python modules/functions
snake_case, classesPascalCase, constantsUPPER_SNAKE_CASE. - In frontend code, keep component filenames
PascalCaseunderprojects/frontend/src/components.
Commit Guidelines
- Match existing commit style: short, imperative subjects like
fix docs,bump deps,linting, lint+test scripts; optional issue/PR refs (for example(#100)).
Kubernetes (k3d) Deployment
See k8s/README.md and docs/kubernetes.md for full documentation.
# Setup cluster (k3d + Traefik + Dapr + KEDA via Helm)
./k8s/scripts/setup-cluster.sh
# Deploy with pre-built images
./k8s/scripts/deploy.sh install
# Build locally and deploy
./k8s/scripts/deploy.sh install --build
# Check status
./k8s/scripts/deploy.sh status
# Verify deployment
./k8s/scripts/verify.sh
# Teardown
./k8s/scripts/teardown-cluster.shHelm chart is at k8s/helm/nemesis/. Configuration in values.yaml. KEDA autoscales file-enrichment and document-conversion based on RabbitMQ queue depth.
Configuration Tips
- Do not commit secrets; keep
.envlocal and derive it fromenv.example. - When changing runtime topology, update related
compose*.yamlandinfra/*files in the same commit. - For k8s changes, update the Helm chart under
k8s/helm/nemesis/and test with./k8s/scripts/deploy.sh install --dry-run.
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about SpecterOps/Nemesis
- @harmj0y.bsky.social“Happy Friday! @tifkin.bsky.social and I are happy to announce that we have cut the release for Nemesis …”Bluesky · Jun 28, 2025 · 18 likes
- @harmj0y.bsky.social“Lots of cool new Nemesis features merging in soon from @tifkin_ and I! Development definitely didn't stop …”Bluesky · Sep 16, 2025 · 6 likes
- @bearstech.com“Nemesis : un pipeline d'enrichissement de données offensif, conçu pour les évaluations de sécurité …”Bluesky · Dec 12, 2023 · 4 likes
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- addressing-dependabotSkill
- enrichment-module-builderSkill
- managing-packagesSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

