源码快照 @ 2026-09-02 (source-only, 剔除非源码素材)
This commit is contained in:
commit
04bac1f6e2
2200 files changed
+489415
No files matched your search
@@ -0,0 +1,86 @@
|
||||
---
|
||||
name: desktop-den-sync-review
|
||||
description: Flag desktop<->den contract drift introduced by this diff. High findings gate Warden clearance; medium findings are advisory only.
|
||||
allowed-tools: Read Grep Glob
|
||||
---
|
||||
|
||||
You are reviewing a diff to answer exactly one question: does this change
|
||||
break or drift the contract between the desktop app and den (the cloud API)?
|
||||
|
||||
Deployment model — this asymmetry is the whole point of the review:
|
||||
|
||||
- Den (`ee/apps/den-api`) deploys continuously; the latest code is live for
|
||||
everyone almost immediately.
|
||||
- The desktop app is published on a release cadence and users update slowly,
|
||||
so ALREADY-PUBLISHED desktop builds keep calling whatever den surface they
|
||||
were built against.
|
||||
|
||||
Contract surfaces:
|
||||
|
||||
- Desktop/client side: `apps/app/src/app/lib/den.ts` (hand-written den API
|
||||
client), `apps/app/src/app/lib/den-types.ts` and the other
|
||||
`apps/app/src/app/lib/den-*.ts` helpers, `apps/app/src/react-app/domains/cloud/`,
|
||||
and `apps/desktop/`.
|
||||
- Den side: `ee/apps/den-api/src/routes/`.
|
||||
- Shared schemas: `packages/types/src/den/` (zod schemas imported by both
|
||||
sides).
|
||||
|
||||
Severity is the gating contract. Use exactly this mapping:
|
||||
|
||||
- `high` — blocking; withholds Warden clearance until resolved.
|
||||
- `medium` — advisory; posted as a comment but never blocks clearance.
|
||||
- Never report `low` findings from this skill.
|
||||
|
||||
Report a HIGH (blocking) finding only in these two cases:
|
||||
|
||||
1. Breaking den change that can brick published desktop builds. The diff
|
||||
removes or renames a den-api route, removes or renames a response field,
|
||||
makes a previously optional request field required, removes an enum value,
|
||||
tightens validation, or changes auth/semantics on a surface the desktop
|
||||
client references. Grep the desktop/client surfaces for usage of the
|
||||
changed route or field before reporting. This blocks EVEN IF the same diff
|
||||
also updates or removes the desktop-side usage: published binaries still
|
||||
run the old client code. The fix is a phased rollout, in this order:
|
||||
first ship a desktop release that tolerates both old and new den behavior,
|
||||
wait for it to be published, and only then land the den-side removal or
|
||||
change.
|
||||
2. Desktop-ahead dependency. The diff adds desktop/client code that calls a
|
||||
den route or reads a den response field that is introduced in this same
|
||||
diff or does not exist in `ee/apps/den-api/src/routes/` at all. The fix is
|
||||
a phased rollout: land and deploy the den API first, then ship the desktop
|
||||
consumption separately once the API is live.
|
||||
|
||||
Report a MEDIUM (advisory) finding only in this case:
|
||||
|
||||
3. Additive den-ahead drift. The diff adds a den-api feature that requires
|
||||
desktop-side handling to actually work for users (a new desktop-policy
|
||||
field the app must enforce or render, a new required field in a
|
||||
`packages/types/src/den/` schema the desktop consumes, a new enum/action
|
||||
value the desktop must handle), and the diff contains no corresponding
|
||||
desktop/client change. Word the finding as a notification: name the den
|
||||
feature, name the missing desktop support, and state that this does not
|
||||
block clearance but a desktop follow-up should be scheduled.
|
||||
|
||||
Do NOT report:
|
||||
|
||||
- Backward-compatible additive den changes nothing on desktop needs: new
|
||||
routes, new optional fields with defaults, new enum values the desktop can
|
||||
safely ignore.
|
||||
- One-sided changes that are self-contained (den internals, desktop-only UI,
|
||||
refactors that keep the wire contract identical).
|
||||
- Style, performance, correctness, or security issues (a separate skill owns
|
||||
security).
|
||||
- Pre-existing drift in unchanged code.
|
||||
- Tests, mocks, fixtures, seed data, or docs.
|
||||
|
||||
For each finding, report:
|
||||
|
||||
- The exact file and changed lines that introduce the drift.
|
||||
- Which published-vs-deployed pair breaks: what the published desktop calls
|
||||
or expects, and what den now serves (or vice versa).
|
||||
- Severity per the mapping above.
|
||||
- The concrete rollout fix: what ships first, what waits, and what change in
|
||||
this diff should be split out.
|
||||
|
||||
If the diff introduces no desktop<->den drift, report nothing. Silence is the
|
||||
correct output for a clean diff; do not manufacture findings.
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
name: diff-security-review
|
||||
description: Flag only new security issues introduced by this diff. Gates Warden security clearance.
|
||||
allowed-tools: Read Grep Glob
|
||||
---
|
||||
|
||||
You are reviewing a diff to answer exactly one question: does this change
|
||||
introduce a NEW security issue that did not exist before?
|
||||
|
||||
Only report an issue when ALL of these hold:
|
||||
|
||||
- It is introduced or made materially worse by the changed lines, not a
|
||||
pre-existing problem in surrounding code.
|
||||
- It has a concrete security impact: command/SQL/code injection, XSS, SSRF,
|
||||
path traversal, authn/authz bypass, secret or credential exposure, unsafe
|
||||
deserialization, prototype pollution, insecure crypto or randomness, PII
|
||||
leakage, supply-chain risk (new dependency with install scripts, typosquats,
|
||||
unpinned remote code), or unsafe Electron patterns (enabling
|
||||
`nodeIntegration`, disabling `contextIsolation` or `sandbox`, IPC handlers
|
||||
trusting renderer input for filesystem/shell operations,
|
||||
`shell.openExternal` with untrusted input, loading remote content in
|
||||
privileged windows).
|
||||
- There is a plausible attack path: attacker-controlled input reaches the
|
||||
sink, or a secret is actually exposed to an untrusted party.
|
||||
|
||||
Do NOT report:
|
||||
|
||||
- Style, performance, correctness, or maintainability issues.
|
||||
- Pre-existing issues in unchanged code, even if you notice them.
|
||||
- Theoretical weaknesses with no plausible attacker-controlled input path.
|
||||
- Hardening that was already absent before this change.
|
||||
- Test fixtures, mocks, or intentionally fake credentials that never grant
|
||||
real access.
|
||||
|
||||
For each finding, report:
|
||||
|
||||
- The exact file and changed lines that introduce the issue.
|
||||
- The attack path: who controls the input and what they gain.
|
||||
- Severity: `critical` (RCE, auth bypass, real secret leak), `high`
|
||||
(injection, XSS, SSRF, traversal), `medium` (info disclosure, weak crypto),
|
||||
`low` (defense-in-depth regression introduced by this diff).
|
||||
- A concrete fix in the changed code.
|
||||
|
||||
If the diff introduces no new security issues, report nothing. Silence is the
|
||||
correct output for a clean diff; do not manufacture findings.
|
||||
Reference in new issue
Block a user