Skip to content

Commit 3303371

Browse files
committed
Harden ReRouted for 0.4.2 launch
1 parent b6ccf8c commit 3303371

41 files changed

Lines changed: 2154 additions & 374 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Bug report
2+
description: Report a reproducible ReRouted problem without exposing credentials or private data.
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for helping improve ReRouted.
11+
12+
**Do not paste API keys, gateway keys, tokens, OAuth callback URLs or codes, cookies, raw `config.json`, email addresses, account IDs, private prompts, or full unreviewed logs.** Use placeholders and include only sanitized diagnostic excerpts.
13+
14+
For a suspected vulnerability, follow [SECURITY.md](https://github.com/gitcommit90/rerouted/blob/main/SECURITY.md) instead of filing a public report.
15+
- type: input
16+
id: version
17+
attributes:
18+
label: ReRouted version
19+
placeholder: "For example: 0.4.2"
20+
validations:
21+
required: true
22+
- type: input
23+
id: macos
24+
attributes:
25+
label: macOS version and Mac
26+
placeholder: "macOS 15.5, M2 MacBook Air"
27+
validations:
28+
required: true
29+
- type: input
30+
id: client
31+
attributes:
32+
label: Client and request mode
33+
description: Name the editor, agent, or script and whether the request was streaming.
34+
placeholder: "Client name/version, streaming"
35+
validations:
36+
required: true
37+
- type: input
38+
id: provider
39+
attributes:
40+
label: Provider, authentication method, and model
41+
description: Use generic account labels; do not include an email address or account ID.
42+
placeholder: "Claude, OAuth, claude-sonnet model"
43+
validations:
44+
required: true
45+
- type: dropdown
46+
id: request_target
47+
attributes:
48+
label: Request target
49+
options:
50+
- Direct provider/model
51+
- Named fallback route
52+
- Named round-robin route
53+
- Onboarding or account connection
54+
- Application UI or settings
55+
- Other
56+
validations:
57+
required: true
58+
- type: textarea
59+
id: problem
60+
attributes:
61+
label: What happened?
62+
description: Describe the expected and actual behavior, including sanitized status codes or error text.
63+
validations:
64+
required: true
65+
- type: textarea
66+
id: reproduction
67+
attributes:
68+
label: Minimal reproduction
69+
description: List the smallest safe sequence that reproduces the problem. Replace credentials and private request content with placeholders.
70+
placeholder: |
71+
1. Connect one provider using OAuth.
72+
2. Create a route with ...
73+
3. Send a sanitized request with ...
74+
4. Observe ...
75+
validations:
76+
required: true
77+
- type: textarea
78+
id: diagnostics
79+
attributes:
80+
label: Sanitized diagnostics
81+
description: Optional. Paste only the few relevant lines after reviewing and redacting them.
82+
render: shell
83+
- type: checkboxes
84+
id: safety
85+
attributes:
86+
label: Safety check
87+
options:
88+
- label: I tested the latest stable release and searched existing issues.
89+
required: true
90+
- label: I removed credentials, OAuth data, account identifiers, email addresses, private prompts, and other sensitive information.
91+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security report
4+
url: https://github.com/gitcommit90/rerouted/blob/main/SECURITY.md
5+
about: Read the private-reporting instructions before disclosing a vulnerability.
6+
- name: Privacy information
7+
url: https://github.com/gitcommit90/rerouted/blob/main/PRIVACY.md
8+
about: Learn what ReRouted stores locally and how to remove its data.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Feature request
2+
description: Suggest a focused improvement to ReRouted.
3+
title: "[Feature]: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Describe the routing or application problem first, then the change you would like.
11+
12+
**Do not include credentials, tokens, OAuth callback data, account identifiers, email addresses, private prompts, or unreviewed logs.**
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: Problem to solve
17+
description: What workflow is difficult or unavailable today?
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: proposal
22+
attributes:
23+
label: Proposed behavior
24+
description: Explain the smallest useful outcome rather than prescribing an implementation.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: context
29+
attributes:
30+
label: Relevant context
31+
description: Include sanitized provider, client, or route details only when they clarify the request.
32+
- type: checkboxes
33+
id: safety
34+
attributes:
35+
label: Safety check
36+
options:
37+
- label: I searched existing issues for the same request.
38+
required: true
39+
- label: This request contains no credentials, OAuth data, account identifiers, email addresses, private prompts, or other sensitive information.
40+
required: true
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Question or support
2+
description: Ask a focused usage or compatibility question without exposing private data.
3+
title: "[Question]: "
4+
labels:
5+
- question
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Include enough sanitized context to understand the workflow.
11+
12+
**Do not include credentials, tokens, OAuth callback data, account identifiers, email addresses, private prompts, or unreviewed logs.**
13+
- type: input
14+
id: version
15+
attributes:
16+
label: ReRouted version
17+
placeholder: "For example: 0.4.2"
18+
validations:
19+
required: true
20+
- type: input
21+
id: environment
22+
attributes:
23+
label: macOS version and client
24+
placeholder: "macOS 15.5, client name/version"
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: question
29+
attributes:
30+
label: Question
31+
description: Describe what you are trying to accomplish and where you are unsure.
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: context
36+
attributes:
37+
label: Sanitized context
38+
description: Optional provider, authentication method, route, or model details that clarify the question.
39+
- type: checkboxes
40+
id: safety
41+
attributes:
42+
label: Safety check
43+
options:
44+
- label: I searched existing issues and documentation first.
45+
required: true
46+
- label: This question contains no credentials, OAuth data, account identifiers, email addresses, private prompts, or other sensitive information.
47+
required: true

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## External contributions are not yet accepted
2+
3+
ReRouted is source-visible while its licensing approach is finalized. Please read [CONTRIBUTING.md](../CONTRIBUTING.md) before opening a pull request. External code and documentation contributions may be closed without review until a license and contribution process are published.
4+
5+
Never include real API keys, gateway keys, OAuth tokens or codes, callback URLs, cookies, account identifiers, email addresses, private prompts, provider responses, or unreviewed logs.
6+
7+
## Maintainer change
8+
9+
Describe the user-visible problem and the resulting behavior.
10+
11+
## Verification
12+
13+
- [ ] Focused validation passes.
14+
- [ ] `npm test` passes.
15+
- [ ] `git diff --check` passes.
16+
- [ ] UI changes include current captures where applicable.
17+
- [ ] No credentials, private user data, or generated release artifacts are included.
18+
- [ ] Release/version work is left to the maintainer release process.

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 15
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
- name: Use Node.js 22.13
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22.13.0
23+
cache: npm
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Run tests
27+
run: npm test

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing
2+
3+
Thank you for helping improve ReRouted.
4+
5+
## Current contribution status
6+
7+
ReRouted is source-visible while its licensing approach is finalized. No software license has been selected, and external code contributions are not currently accepted.
8+
9+
Please do not open a pull request with code or documentation changes yet. It may be closed without review. Focused issues, feature requests, compatibility reports, and sanitized reproduction cases are welcome.
10+
11+
## Before opening an issue
12+
13+
1. Install the latest stable release and check existing issues.
14+
2. Confirm the behavior with the smallest route and request that reproduce it.
15+
3. Record the ReRouted version, macOS version, provider type, authentication method, model, client, and whether the request streamed.
16+
4. Replace account names, model identifiers, or request content when they are not essential to the report.
17+
18+
Never attach `config.json` or paste full, unreviewed diagnostics. Remove API keys, gateway keys, tokens, OAuth callback URLs or codes, cookies, account IDs, email addresses, prompts, and private provider responses.
19+
20+
Use the repository's bug or feature request form so maintainers receive the context needed to reproduce the report.
21+
22+
## Reproduction cases
23+
24+
Good reports distinguish between:
25+
26+
- A response produced by the upstream provider and a response produced by ReRouted.
27+
- A direct provider/model request and a named-route request.
28+
- Streaming and non-streaming behavior.
29+
- One connected account and an OAuth account pool.
30+
31+
Include exact status codes and sanitized error text when available. Do not include credentials to make a reproduction executable.
32+
33+
## Local verification
34+
35+
These commands document the baseline used by maintainers and may help when investigating an issue locally:
36+
37+
```bash
38+
npm ci
39+
npm test
40+
git diff --check
41+
```
42+
43+
Node.js 22.13 or newer is required. The packaged application currently targets Apple Silicon and macOS 12 Monterey or newer.
44+
45+
Maintainers handle package version changes, signing, notarization, release publication, and installation verification. Reproduction branches should not include generated release artifacts or real provider credentials.
46+
47+
## Security reports
48+
49+
Do not use a public issue for a vulnerability or credential exposure. Follow [Security](./SECURITY.md) instead.
50+
51+
This policy will be updated when a project license and an external pull-request process are in place.

PRIVACY.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Privacy
2+
3+
ReRouted is a local macOS application. It has no ReRouted account, hosted control plane, or third-party product analytics service.
4+
5+
This document describes the application as shipped. The upstream providers and clients you connect have their own privacy policies and data practices.
6+
7+
## Website
8+
9+
The public `rerouted.dev` website is a static site delivered through Cloudflare and loads its display fonts from Google Fonts. Those services may receive ordinary web-request metadata such as your IP address, browser headers, and requested asset URLs under their own privacy policies. The website does not include ReRouted product analytics or an account system.
10+
11+
## Data stored on your Mac
12+
13+
ReRouted stores application data in its macOS Application Support directory, normally `~/Library/Application Support/ReRouted`. Existing installations may use `~/Library/Application Support/rerouted`.
14+
15+
Local data includes:
16+
17+
- Provider settings, OAuth credentials, API keys, gateway keys, routes, and application preferences in `config.json`.
18+
- Request metadata, provider and route selections, statuses, timestamps, and token counts in the uncapped `usage.sqlite` database.
19+
- Gateway, OAuth, update, and routing diagnostics in `rerouted.log`.
20+
21+
Prompt bodies are not intentionally persisted. Provider credentials and gateway keys are not encrypted at rest. ReRouted restricts local file permissions where macOS supports doing so, but anyone who can access your macOS user account or its files may be able to read them.
22+
23+
Diagnostics can contain provider error text, model and route names, account identifiers, and OAuth metadata. Treat logs as sensitive and review every line before sharing an excerpt.
24+
25+
## Local credential discovery
26+
27+
Credential discovery happens when you choose to scan or import accounts. Depending on the providers installed on the Mac, ReRouted may inspect supported entries in the Codex configuration, the Claude Code macOS Keychain or supported local auth files, ReRouted auth-profile folders, and Antigravity-named JSON files in supported folders including `~/Downloads`. ReRouted summarizes discoveries before import; selected credentials are copied into its own configuration.
28+
29+
At startup, ReRouted may also read the local `~/.grok/auth.json` file to attach a human-readable identity to an xAI account that is already connected. This startup lookup only updates local account labeling; it does not import a new account by itself.
30+
31+
## Network activity
32+
33+
ReRouted makes network requests only as needed to operate features you choose:
34+
35+
- Completion requests, credentials, and supported image inputs are sent to the selected upstream provider.
36+
- OAuth authorization and token refresh requests are sent to the relevant provider.
37+
- Quota checks are sent to supported providers when you open the Quota page, every 60 seconds while that page remains open, or when you manually refresh it.
38+
- Automatic update checks contact `update.electronjs.org` shortly after launch and about every six hours; signed update downloads come from GitHub Releases.
39+
40+
The gateway binds to `127.0.0.1` by default. If you enable network access, it binds to `0.0.0.0`; devices that can reach the Mac can attempt to access it, and the gateway bearer key becomes the primary access boundary.
41+
42+
## OAuth and subscription notice
43+
44+
ReRouted is independent and is not affiliated with or endorsed by any upstream provider. This provider's subscription or OAuth session is not officially licensed for proxy or router use. Using it this way may result in account restrictions or bans. Proceed at your own risk, review the provider's current terms, and prefer a documented API-key integration when you need a stable production path.
45+
46+
## Retention and deletion
47+
48+
Usage history is not automatically pruned and remains on the Mac until the Application Support data is removed. Existing installations may also retain the former `usage.json` as a one-time migration backup. Logs can be cleared from the Activity diagnostics view.
49+
50+
Uninstalling the application bundle does not automatically remove Application Support data. To remove ReRouted and its stored credentials completely:
51+
52+
1. Quit ReRouted.
53+
2. Delete `/Applications/ReRouted.app`.
54+
3. Delete the ReRouted Application Support directory listed above.
55+
56+
Deleting the Application Support directory permanently removes connected accounts, keys, routes, settings, usage history, and logs. Back up only the data you intentionally want to retain.
57+
58+
## Sharing diagnostics
59+
60+
Never post `config.json` or an unreviewed log file. Remove API keys, gateway keys, tokens, OAuth codes and callback URLs, cookies, email addresses, account identifiers, private provider responses, and prompt content before sharing a reproduction or log excerpt.
61+
62+
See [Security](./SECURITY.md) for reporting a suspected vulnerability and [Contributing](./CONTRIBUTING.md) for safe bug-report guidance.

0 commit comments

Comments
 (0)