Repository navigation
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
199 lines (195 loc) · 9.57 KB
/
Copy path.coderabbit.yaml
File metadata and controls
199 lines (195 loc) · 9.57 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# Docs: https://docs.coderabbit.ai/reference/configuration
language: "en-US"
tone_instructions: >-
Review this security-critical vulnerability analysis and VEX pipeline.
Prioritize correctness, trust boundaries, evidence provenance, fail-safe
behavior, and stable contracts. Be concise; skip lint/style nits and flag
missing failure-path tests.
reviews:
profile: assertive
review_status: true
review_details: true
collapse_walkthrough: false
pre_merge_checks:
title:
mode: error
requirements: >-
Title must follow Conventional Commits format:
type(optional-scope)[!]: concise imperative summary.
Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
Use lowercase type and scope. If the change is a breaking change, add a ! before the colon.
Keep it under 72 characters and do not use a trailing period.
description:
mode: warning
issue_assessment:
mode: warning
docstrings:
mode: "off"
auto_title_instructions: >-
Generate the PR title in Conventional Commits format:
type(optional-scope)[!]: concise imperative summary.
Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
Use lowercase type and scope, add a ! before the colon for breaking changes,
keep it under 72 characters, and do not use a trailing period.
auto_review:
base_branches: ["develop"]
enabled: true
drafts: false
auto_incremental_review: true
auto_pause_after_reviewed_commits: 0
path_filters:
- "!LICENSE"
- "!aiq/**"
- "!uv.lock"
- "!images/*.png"
- "!src/vuln_analysis/data/eval_datasets/**"
- "!tests/server/webhooks/fixtures/**"
- "!**/.gitkeep"
path_instructions:
- path: "src/vuln_analysis/pipeline/**"
instructions: >-
Pipeline orchestration fans out per vulnerability and shares image-level
analysis. Check async cancellation, retry classification, concurrency
limits, partial-result aggregation, and stage transitions. A failed or
inconclusive analysis must remain unknown/uncertain; never convert
missing evidence, timeouts, or tool/model errors into not_affected.
Cache keys must include every input, model, prompt, policy, and image
identity element that can change a result.
- path: "src/vuln_analysis/{functions,prompts,plugins}/**"
instructions: >-
Agent workflows, prompts, and VEX decisions are security-sensitive.
Check prompt-injection resistance, strict tool separation, untrusted
model-output validation, evidence/citation preservation, deterministic
decision precedence, and bounded retry/token behavior. Container or
proprietary filesystem content must not leak to web-enabled agents.
Classification changes require focused tests and must preserve
uncertainty when the available evidence is insufficient.
- path: "src/vuln_analysis/tools/**"
instructions: >-
Tools consume attacker-controlled identifiers, URLs, package metadata,
and extracted container filesystems. Scrutinize path traversal and
symlink escape, SSRF and unsafe redirects, command/argument injection,
shell use, decompression/resource exhaustion, response-size limits, and
timeouts. Filesystem tools must stay within the authorized rootfs and
network tools must not receive private container content.
- path: "src/vuln_analysis/server/auth.py"
instructions: >-
Authentication boundary. Verify JWT issuer, audience, signature,
algorithm, expiry, and required-claim validation; reject insecure
defaults and fail closed. Never log bearer tokens, keys, or credentials.
- path: "src/vuln_analysis/server/webhooks/**"
instructions: >-
Outbound webhook security boundary. Check destination validation and
SSRF resistance, signing and canonicalization, secret handling,
replay/idempotency behavior, retry bounds, delivery state transitions,
and redaction from logs and errors.
- path: "src/vuln_analysis/server/**"
instructions: >-
Public service and asynchronous-job API. Review authorization coverage,
request validation, report-path containment, information disclosure,
race conditions, cancellation, resource limits, and stable response
contracts. Errors should be actionable without exposing secrets or host
filesystem details.
- path: "src/vuln_analysis/data_models/**"
instructions: >-
These models define user-facing workflow, report, and VEX contracts.
Flag silently relaxed validation, ambiguous defaults, lossy
serialization, or breaking schema changes. Keep vulnerability IDs,
image identities, status values, and output paths normalized and
unambiguous.
- path: "src/vuln_analysis/utils/{image_extraction,image_config,pre_triage,report_*,vex_details}.py"
instructions: >-
Security-sensitive image materialization and evidence processing. Check
immutable digest handling, archive and path traversal defenses, command
arguments, rootfs isolation, provenance metadata, parsing of untrusted
reports, and fail-safe pre-triage/VEX conclusions.
- path: "src/vuln_analysis/configs/**"
instructions: >-
Runtime and model configuration. Check that component names and options
match registered implementations, secrets are referenced through
environment variables rather than committed, security controls remain
enabled by default, and prompt/model/cache namespace changes stay in
sync. Flag unbounded concurrency, retries, timeouts, or token budgets.
- path: "deploy/**"
instructions: >-
Deployment assets and executable notebooks. Check for secrets, unsafe
interpolation, untrusted shell input, insecure exposed ports, weak auth
or TLS defaults, excessive privileges/capabilities, writable or broad
mounts, missing resource limits, unsafe proxying, and unpinned images.
Compose changes must preserve supported startup, health, persistence,
and ownership behavior. Notebook instructions and code must agree with
the deployment files and current API.
- path: "**/*.sh"
instructions: >-
Shell scripts should quote expansions, use safe failure handling (set
-euo pipefail where appropriate), avoid eval and shell interpolation of
untrusted data, preserve exit status, and never print credentials.
- path: "tests/**"
instructions: >-
Tests should be deterministic, isolated from live network/model services,
and cover failure and adversarial paths as well as success. Security and
behavior changes need regression tests. Do not weaken assertions or
broadly mock away the boundary under test merely to make a test pass.
- path: "{README.md,docs/**,deploy/README.md,quick_start/**}"
instructions: >-
User-facing documentation and examples must match current commands,
configuration names, API schemas, authentication requirements, output
semantics, and supported deployment flow. Treat security and VEX claims
as consequential; generated reports support analyst review and must not
be presented as unquestionable findings.
- path: ".gitmodules"
instructions: >-
The aiq directory is a Git submodule. Review URL and branch changes for
supply-chain risk. Do not suggest editing files beneath aiq from this
repository; dependency updates should change the recorded submodule
commit deliberately.
- path: "**/*"
instructions: >-
Every hand-authored source and configuration file must carry the
repository's Apache-2.0 SPDX copyright and license header. When a file
is modified, confirm its copyright range includes the current year.
Generated artifacts, binary images, data fixtures, and the aiq
submodule are exempt.
poem: false
sequence_diagrams: true
suggested_reviewers: false
finishing_touches:
docstrings:
enabled: false
unit_tests:
enabled: false
auto_apply_labels: true
labeling_instructions:
- label: DO NOT MERGE
instructions: >-
Apply this label to non-draft PRs with critical issues, broken security
boundaries, unsafe VEX conclusions, incomplete work, or other blocking
concerns.
- label: duplicate
instructions: >-
Apply this label when the PR duplicates another existing PR or issue.
- label: invalid
instructions: >-
Apply this label when the changes are fundamentally invalid or do not
follow the project's contribution and security requirements.
knowledge_base:
code_guidelines:
enabled: true
filePatterns:
- ".agents/**/*.md"
- "CONTRIBUTING.md"