mirror of
https://github.com/germondai/trawl.git
synced 2026-08-17 12:11:23 +02:00
docs: add CONTRIBUTING, CODE_OF_CONDUCT, and SECURITY
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our community include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces — the GitHub repository, issue tracker, pull requests, discussions, and any other channel associated with the project. It also applies when an individual is officially representing the community in public spaces.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **conduct@trawl.dev**. All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
||||
|
||||
For sensitive issues where you cannot reach the maintainer by email, open a [private security advisory](https://github.com/germondai/trawl/security/advisories/new) instead.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
# Contributing to TRAWL
|
||||
|
||||
Thanks for your interest in contributing! TRAWL is a self-hosted web scraping engine released under [AGPL-3.0](LICENSE). By submitting a contribution, you agree to license your work under the same terms.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). Be respectful, assume good faith, and focus on the technical merits.
|
||||
|
||||
## Reporting bugs & requesting features
|
||||
|
||||
Please use the GitHub issue templates — they ensure we have the context we need:
|
||||
|
||||
- **Bug reports:** [`.github/ISSUE_TEMPLATE/bug_report.md`](.github/ISSUE_TEMPLATE/bug_report.md)
|
||||
- **Feature requests:** [`.github/ISSUE_TEMPLATE/feature_request.md`](.github/ISSUE_TEMPLATE/feature_request.md)
|
||||
|
||||
For security issues, **do not open a public issue** — see [SECURITY.md](SECURITY.md).
|
||||
|
||||
## Development setup
|
||||
|
||||
Requirements: **Bun ≥ 1.1** and **Docker** (for the Redis service used in tests).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/germondai/trawl.git
|
||||
cd trawl
|
||||
bun install
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
### Running the apps
|
||||
|
||||
```bash
|
||||
bun run dev:api # Elysia API on :8191
|
||||
bun run dev:web # Nuxt 4 landing page
|
||||
bun run dev:docs # VitePress docs site
|
||||
```
|
||||
|
||||
The API requires Redis. The fastest way is `docker compose up -d redis`.
|
||||
|
||||
### Linting & formatting
|
||||
|
||||
We use [Biome](https://biomejs.dev/) for both:
|
||||
|
||||
```bash
|
||||
bun run lint # check
|
||||
bun run format # write
|
||||
bun run check # format + lint + import sort, write
|
||||
```
|
||||
|
||||
CI runs `bun run lint` on every PR.
|
||||
|
||||
## Project layout
|
||||
|
||||
This is a Bun monorepo with workspaces:
|
||||
|
||||
```
|
||||
apps/
|
||||
api/ Elysia API (the scraper service)
|
||||
web/ Nuxt 4 landing page
|
||||
docs/ VitePress documentation
|
||||
packages/
|
||||
browser/ Camoufox Firefox pool
|
||||
tiers/ Tier 1–4 execution engine
|
||||
types/ Shared TypeScript types
|
||||
```
|
||||
|
||||
Apps are independently deployable; `packages/*` are imported via the workspace protocol (e.g. `workspace:*`).
|
||||
|
||||
## Commit conventions
|
||||
|
||||
We use [Conventional Commits](https://www.conventionalcommits.org/). Recent examples:
|
||||
|
||||
```
|
||||
ci(publish): build images for linux/amd64, linux/arm64, linux/arm/v7
|
||||
chore: add .gitignore files for api, docs, web, and browser packages
|
||||
fix(browser): restore pool after worker crash
|
||||
```
|
||||
|
||||
The `type` is one of `feat`, `fix`, `chore`, `docs`, `ci`, `refactor`, `test`, `perf`. Keep the subject under 72 chars and in the imperative mood.
|
||||
|
||||
## Pull request process
|
||||
|
||||
1. **Open an issue first** for non-trivial changes. A two-paragraph problem statement is enough.
|
||||
2. **Branch from `main`.** Use a descriptive name (`feat/captcha-hcaptcha`, `fix/redis-reconnect`).
|
||||
3. **Run `bun run check` before pushing.** Lint and format must be clean.
|
||||
4. **Update `CHANGELOG.md`** under `## [Unreleased]` for any user-visible change.
|
||||
5. **Fill out the PR template** — the checklist catches the easy-to-miss items.
|
||||
6. **Keep PRs focused.** One feature or fix per PR; large refactors should be split.
|
||||
|
||||
## Adding a new tier or solver
|
||||
|
||||
TRAWL's design centers on a 4-tier escalation ladder (HTTP → cached session → fresh CF solve → residential proxy). If your contribution introduces a new tier or a new solver:
|
||||
|
||||
- Put tier logic in `packages/tiers/`.
|
||||
- Put browser/solver adapters in `packages/browser/`.
|
||||
- Update the tier diagram in `README.md`.
|
||||
- Add an entry to `CHANGELOG.md`.
|
||||
|
||||
## License
|
||||
|
||||
TRAWL is licensed under **AGPL-3.0**. By submitting a pull request, you affirm that your contribution is your own work and you agree to license it under AGPL-3.0. AGPL is more restrictive than MIT/Apache — if your employer might claim ownership of your work, get explicit approval first.
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported versions
|
||||
|
||||
TRAWL is currently in pre-1.0 development (`0.1.x`). Only the latest minor release receives security fixes; older versions are not patched.
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 0.1.x | ✅ Active |
|
||||
| < 0.1 | ❌ No |
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
**Do not open a public GitHub issue for security vulnerabilities.**
|
||||
|
||||
Report privately through either of these channels (in order of preference):
|
||||
|
||||
1. **GitHub Security Advisories** — open a [private security advisory](https://github.com/germondai/trawl/security/advisories/new) on this repository.
|
||||
2. **Email** — `security@trawl.dev`
|
||||
|
||||
Both channels reach the maintainer (@germondai). Please include:
|
||||
|
||||
- A clear description of the vulnerability and its impact.
|
||||
- Reproduction steps (PoC code, `curl` commands, screenshots — whatever you have).
|
||||
- The affected version or commit SHA.
|
||||
- Whether you intend to disclose publicly, and on what timeline.
|
||||
|
||||
## Response timeline
|
||||
|
||||
- **Acknowledgement** — within 72 hours.
|
||||
- **Triage & impact assessment** — within 7 days.
|
||||
- **Patch** — as soon as practical, typically within 30 days for high-severity issues.
|
||||
|
||||
We follow [coordinated disclosure](https://en.wikipedia.org/wiki/Coordinated_vulnerability_disclosure): the report stays private until a fix is released, after which the advisory is published with credit to the reporter (unless they prefer anonymity).
|
||||
|
||||
## Scope
|
||||
|
||||
In scope:
|
||||
|
||||
- Anything in `apps/api/` that lets an unauthenticated remote actor read or modify data they shouldn't.
|
||||
- Anything in `packages/browser/` that escapes the browser sandbox or exposes host state.
|
||||
- Anything in the Redis-backed session cache that leaks another operator's session.
|
||||
- Supply-chain issues in pinned dependencies (compromised lockfile entries, malicious transitive packages).
|
||||
|
||||
Out of scope:
|
||||
|
||||
- The scraper's ability to bypass Cloudflare or other anti-bot measures against sites the operator doesn't own or have permission to test against. TRAWL is a tool — operators are responsible for using it legally.
|
||||
- Reports that depend on social engineering, physical access, or a compromised operator account.
|
||||
- Voluntary rate-limiting or DoS conditions triggered by design (the API is single-tenant by default).
|
||||
- Issues only present in unsupported versions (see table above).
|
||||
|
||||
## Recognition
|
||||
|
||||
Reporters who follow this policy are credited in the fix release notes unless they request otherwise. Thank you for helping keep TRAWL and its users safe.
|
||||
Reference in New Issue
Block a user