Metadata-Version: 2.4
Name: otynx
Version: 0.1.2
Summary: Sniff out the keys your AI agent could grab: an offline scanner for secrets and risky AI-agent settings.
Author: Vaibhav Tiwari
License-Expression: MIT
Project-URL: Homepage, https://github.com/BuildsVaibhav/otynx
Project-URL: Repository, https://github.com/BuildsVaibhav/otynx
Project-URL: Issues, https://github.com/BuildsVaibhav/otynx/issues
Keywords: security,secrets,scanner,ai-agents,mcp,claude-code,cursor,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Dynamic: license-file

# Otynx

*Sniff out the keys your AI agent could grab.*

In April 2026 an AI coding agent fixing a small bug found an unrelated API
token in a project file, and used it to delete a company's live database and
backups in 9 seconds. Rules in a prompt are suggestions: the only real
protection is that dangerous keys aren't reachable in the first place.

**Otynx shows you what your agent can reach, before you let it loose.**
It scans a folder for secret keys and risky AI-agent settings, ranks them by
how much damage they could do, and tells you how to fix each one.
It's read-only, works offline and never sends anything anywhere.

![Otynx scanning a project with a production database URL, a GitHub token in .mcp.json, loose Claude Code permissions and a Stripe test key](https://raw.githubusercontent.com/BuildsVaibhav/otynx/main/docs/demo.svg)

## Quick start

```bash
pip install otynx
otynx scan .           # scan the current folder
```

Requires Python 3.11+. Status: v0.1.2, alpha. Feedback and new rules welcome!

## Options

| Command | What it does |
| --- | --- |
| `otynx scan <folder>` | Scan a project folder (default: `.`) |
| `--home` | Also check credential files in your home folder: `~/.aws`, `~/.kube`, `~/.docker`, `~/.npmrc`, `~/.pypirc`, `~/.netrc`, `~/.git-credentials`, gcloud, Azure, and `~/.ssh` (only checks that key files *exist*, never reads them) |
| `--json` | Print results as JSON for scripts and CI |
| `--list-files` | Also list every file that was scanned |

**Exit code:** `1` if anything is CRITICAL, otherwise `0`. Use it in CI or as a
pre-agent hook. You can also run it with `python -m otynx scan <folder>`.

## What it checks

- **Secrets:** database URLs with passwords, AWS keys, GitHub tokens, OpenAI and
  Anthropic keys, Stripe live and test keys, Supabase service-role keys, Slack
  tokens, Google API keys, private keys, npm and PyPI tokens, and any
  random-looking value stored under a name like `SECRET`, `TOKEN`, `PASSWORD`
  or `API_KEY`.
- **Agent configs:** secrets written straight into `.mcp.json`,
  `.cursor/mcp.json` or `.vscode/mcp.json` instead of loaded from the
  environment, and `.claude/settings.json` files that allow every Bash
  command with no deny rules (or turn permission prompts off).
- **Skipped:** `node_modules`, `.git`, `venv`, binary files, files over 1 MB,
  and placeholders like `your-key-here`, `xxxx`, `<API_KEY>` or `${TOKEN}`.

## How the danger level is worked out

Each finding starts with points for the worst thing its key can do: **40** if
it controls real systems (databases, cloud, private keys), **30** if it changes
code or money (GitHub, Stripe live), **20** if it spends money or reads data
(OpenAI, Slack, Google), and **10** for test or unknown keys. Then it gets
**+10** if it looks live (`prod`, `production`, `live` nearby), **−10** if it
looks safe (`localhost`, `test`, `dev`, `sandbox`), **+5** if it's inside the
project folder, **+5** if the same secret is in more than one file, and **+5**
if tools load it automatically (a `.env` file or the default AWS profile).
**45+ is CRITICAL, 30–44 HIGH, 20–29 MEDIUM, under 20 LOW.** Loose agent
permissions aren't secrets, so they're always MEDIUM.

## Safety promises

1. **Read-only.** Otynx never edits, moves or deletes a file.
2. **Offline.** No network calls, ever.
3. **Masked.** Secrets are always shown masked, e.g. `sk_live_****9f2a`, in the
   terminal, in JSON and in errors.
4. **Never reads `~/.ssh`.** It only reports that private key files exist.
5. **Home folder is opt-in.** It looks outside the project only with `--home`.
6. **No telemetry.** Nothing about you or your scans is collected.

Only scan projects and computers you own or are allowed to check.

## Developing

```bash
python -m venv .venv
.venv\Scripts\activate          # Windows  (macOS/Linux: source .venv/bin/activate)
pip install -e ".[dev]"
pytest
```

The full plan is in [SPEC.md](SPEC.md). To add a detection rule, add one
`Rule(...)` to `src/otynx/rules.py` and a must-find and must-ignore test to
`tests/test_detectors.py`. Never put a real-looking secret in a file: build
fake ones at runtime (see `tests/fake_secrets.py`).
