-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
137 lines (123 loc) · 5.78 KB
/
Copy path.coderabbit.yaml
File metadata and controls
137 lines (123 loc) · 5.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
#
# Review rules live in `.github/copilot-instructions.md` and `AGENTS.md`
# CodeRabbit picks both up automatically. This file only carries settings that
# differ from CodeRabbit's defaults.
reviews:
profile: chill
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: true
auto_review:
enabled: true
drafts: false
base_branches:
- main
ignore_usernames:
- 'dependabot[bot]'
- 'dependabot-preview[bot]'
labels:
- '!dependabot'
path_filters:
# Generated protobuf bindings — regenerate via ./gen-protos.sh, never
# hand-edit (AGENTS.md > Architecture).
- '!osprey_rpc/src/osprey/rpc/**/*_pb2*.py'
- '!osprey_rpc/src/osprey/rpc/**/*_pb2*.pyi'
- '!osprey_coordinator/src/proto/**'
# Build artifacts and caches.
- '!**/node_modules/**'
- '!**/dist/**'
- '!**/build/**'
- '!**/target/**'
- '!**/__pycache__/**'
- '!**/.venv/**'
- '!**/*.snap'
# Cross-cutting rules live in .github/copilot-instructions.md.
path_instructions:
- path: 'osprey_worker/src/osprey/worker/ui_api/**/*.py'
instructions: |
Flask HTTP API on port 5004. Verify each view enforces authentication
and that any caller-supplied IDs are authorization-checked, not just
existence-checked (IDOR). Flag string-built SQL or shell commands —
SQLAlchemy bound parameters and `subprocess` arg arrays (no
`shell=True`) are required. Validate request bodies and query params
(Pydantic preferred). Error responses must not leak Python stack
traces or internal exception messages.
- path: 'osprey_worker/src/osprey/worker/sinks/**/*.py'
instructions: |
Output sinks emit verdicts/effects to external systems (Kafka, HTTP,
etc.). Flag sink writes that don't bound retries or backoff, that log
full request/response bodies or raw Kafka payloads (PII risk), or
that swallow exceptions without a metric, log, or rethrow.
- path: 'osprey_worker/src/osprey/worker/adaptor/**/*.py'
instructions: |
Pluggy plugin manager and hookspecs (`register_udfs`,
`register_output_sinks`, `register_labels_service_or_provider`). New
or renamed hookspecs change the plugin contract — surface signature
changes that would break `example_plugins/` or downstream consumers.
Generic-name UDFs collide silently; flag duplicates.
- path: 'osprey_ui/src/**/*.{ts,tsx}'
instructions: |
- XSS: flag `dangerouslySetInnerHTML`, `innerHTML`, `document.write`,
`javascript:` URLs, and unsanitized `href`/`src` from user input.
Prefer `textContent`; sanitize with DOMPurify when raw HTML is
unavoidable.
- Token storage: auth tokens belong in HttpOnly, Secure, SameSite
cookies — flag `localStorage` or `sessionStorage` use for tokens.
- Open redirects: redirecting to a user-supplied URL without an
allowlist is risky.
- path: 'osprey_coordinator/src/**/*.rs'
instructions: |
- `unwrap()` / `expect()` / `panic!` on user-driven or RPC paths
turn a bad input into a process crash; prefer `?` or explicit
error mapping.
- `unsafe` blocks deserve a justifying comment and the tightest
possible scope.
- Holding a `std::sync::Mutex` guard across `.await` deadlocks the
tokio runtime; long-lived `tokio::sync` guards can starve other
tasks. Flag them.
- Spawned tasks should be cancellation-safe — surface anything that
will leak on shutdown.
- path: 'proto/osprey/rpc/**/*.proto'
instructions: |
gRPC contract consumed by both Python workers and the Rust
coordinator. Removing or renaming fields, changing field numbers, or
changing tag types is a breaking change — flag it and ask for a
migration plan. Bindings must be regenerated with `./gen-protos.sh`
in the same PR.
- path: 'example_plugins/**/*.py'
instructions: |
Reference plugins. Per AGENTS.md > Architecture no production code
belongs here — flag if production-only logic is being added.
- path: 'example_rules/**'
instructions: |
Sample SML rules and YAML config. Reference, not production — flag
if production rule logic is being added here instead of in the
consumer's own rules directory.
- path: '**/{pyproject.toml,uv.lock,Cargo.toml,Cargo.lock,package.json,package-lock.json}'
instructions: |
Dependency additions, removals, or upgrades (including transitive
bumps) require human approval for license (Apache 2.0, per
`LICENSE.md`) and CVE review per AGENTS.md > "Human-approval-required
actions". Surface every change so reviewers don't miss it. New
Python deps must also be exercised by `fawltydeps` or added to
`[tool.fawltydeps].ignore_unused` with a comment.
- path: '{docker-compose.yaml,start.sh,entrypoint.sh,**/Dockerfile,.github/workflows/publish-coordinator-image.yml,.github/workflows/release-osprey-rpc.yml,.github/workflows/mdbook.yml}'
instructions: |
AGENTS.md > "Human-approval-required actions" lists these as
restricted: release/deploy workflows, production Dockerfiles,
signing/tagging, and infra entrypoints. Flag any change here as
needing explicit human approval. Default Docker bindings are
`127.0.0.1` — flag any bind-address change.
# These overlap with checks already enforced in CI, or add style noise.
tools:
ruff:
enabled: false
prettier:
enabled: false
markdownlint:
enabled: false
languagetool:
enabled: false