Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/instructions/code-review.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ Flag any code that:
- Accepts unknown, ambiguous, or semantically invalid configuration that should have been rejected at startup.
- Uses special cases to handle the tests or test environment, including bypassing factor validation.
- Adds exemptions to teeplint for new code.
- Sends a request to an endpoint that the provider's E2EE protocol does not
support while E2EE is enabled, instead of refusing it.
- Compares a provider's name outside provider construction, instead of reading
a field that every provider sets.

Error paths MUST fail closed. They may also log, clean up, zero key material,
invalidate caches, and record metrics, but must never silently continue or
Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ Reference implementations to mirror when adding providers or verification logic:
- **Attestation verification:** `internal/proxy/proxy.go:fetchVerified` and `internal/verify/verify.go:runEvidence`
- **Proxy handler:** `internal/proxy/proxy.go:handleChat`

### Provider-Independent Rules

Only provider construction selects code by provider name. Outside it, no check compares a provider's name. When one provider needs a rule, add a field that every provider sets, such as `UsesTLSBinding`, and apply the rule to every provider that sets it.

### Follow Go Conventions

- Follow Effective Go idioms and best practices.
Expand Down Expand Up @@ -228,6 +232,7 @@ The word "gate" refers only to a physical fence. Do not use it for checks, condi

- NEVER weaken or bypass factor validation, unless it has been explicitly disabled via `--offline`, `--force`, or an `allow_fail` policy.
- NEVER fall back to plaintext, accept or use empty keys, or perform unauthenticated cryptography.
- NEVER send a request to an endpoint that the provider's E2EE protocol does not support while E2EE is enabled; refuse it. To use such an endpoint, the user sets `e2ee = false` and adds `e2ee_usable` to `allow_fail`. The request then uses TLS, which attestation binds only for a provider that uses TLS binding.
- NEVER convert an error into successful or less strictly validated behavior through a fallback path.
- NEVER add exemptions to teeplint for new code.
- Tests MUST NOT special-case production code to bypass security behavior.
Expand Down
Loading