Repository navigation
Conversation
ecd492a to
28351ac
Compare
28351ac to
7035762
Compare
Design Review (Fable 5, fork) — 🔴 BLOCK (blocking)Design-level review of Design-Verdict: BLOCK Live Google/Microsoft OAuth is unverified end-to-end; the headline connect path rests on provider-side assumptions no test or human has exercised. BlockersUnverified provider handshake for the feature's core path. WatchThe CalDAV credential is fenced at rest but not bound to a destination: [DESIGN-REVIEWED] 8dc1f9f Description read[DESCRIPTION-READ] b3325194356eb1b3b32edbe7379074ef019418d6ac82209799be271b90fd4b24 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed Adjudication upheld 1 of 1 blocking finding(s); those must be resolved before merging. BLOCKING -- src/kiro_crew/apps/builtins/meetings/backend/providers/calendar.py:1376 -- calendar overflow is silently discarded Adjudication (Opus 5) — is blocking on each finding proportionate?Harm rung: MEDIUM — a truncated CalDAV sync returns fewer meetings than the collection holds, and the list/poller cannot tell a truncated tail from events that were never on the calendar. [ADJUDICATION] 8dc1f9f total=1 uphold=1 downgrade=0 |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed |
7035762 to
5d22109
Compare
|
🤖 Kiro Crew [operator: bolichen97]: This PR has been inactive for 7+ days with failing CI. I've assessed the blockers and they appear resolvable — I'll push fixes directly to this branch as a co-author. Assessment: GPT 5.6 flagged 3 concrete bugs (credential temp-file path gate bypass, concurrent-write race in credentials store, read-failure causing credential loss). The only CI test failure ( If you'd prefer I don't touch this PR, add the |
5d22109 to
269e4a1
Compare
|
🤖 Kiro Crew [operator: bolichen97] Drive-to-green pass on this PR (original work by @kaizawa97, authorship preserved; head is now 1. Rebased onto current main (was based on a commit from 08-13). This also absorbs the fix for the 2. Re: the GPT 5.6 blocking review of 3. One new fix (local GPT 5.6 review of the rebased head): the invalid/expired/forged- 4. PR description updated to remove the stale claim that Local gates on the pushed head: isort / flake8 / mypy clean, full pytest 56380 passed. Opus 4.8 local review: NO-BLOCKING (SSRF vetting, redirect auth-drop, gate coverage, and Graph timezone handling all verified sound). |
|
🤖 Kiro Crew [operator: bolichen97] — dispositions for the GPT 5.6 blocking review of
|
Head branch was pushed to by a user without write access
ca08283 to
e1c5a0c
Compare
|
|
|
|
|
|
|
|
|
|
|
|
Security Scope Review (fork) — 🟡 CONCERNSWhich legitimate operations does the reviewer's own judgement; no confirmed regression All halves of the tightening are confirmed to live outside the three adjudicated tiers; Scope-Verdict: CONCERNS TIGHTENING: The crew data-home keystone floor and the agent-sandbox bind mask each gained the top-level leaf ADJUDICATED: 13 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: Candidates were written in posix spellings ( UNADJUDICATED: The entire tightening lives in guards the classifier does not adjudicate, which is why the verdict is CONCERNS rather than PASS despite an expected-empty confirmed set:
Neither gap is a demonstrated regression — the narrow entry shape and the no-in-sandbox-reader design both read as correctly scoped — but "no confirmed regressions" over guards nothing could classify is coverage this lane must not report as a pass. [SCOPE-REVIEWED] 8dc1f9fSecurity scope review -- adjudicated candidates
No candidate flipped from allowed to refused. |
…osoft 365
Meetings had to be created by hand, so the app never knew what was already
scheduled. This adds calendar providers -- CalDAV, Google Calendar and
Microsoft 365 -- behind the existing `CalendarProvider` seam, plus the
credential store and OAuth handshake they need. Five providers ship:
`none`, `ics`, `caldav`, `google`, `microsoft`.
Credential store (`backend/credentials.py`)
Credentials live in a TOP-LEVEL leaf of the crew data home,
`<crew-home>/meetings-credentials/calendar-credentials.json`. Not under
`app_data_dir("meetings")`, which `store.contain` opens to agent-supplied
paths; and not under `workspace/`, because the OS sandbox mask binds only
over a directory that exists at spawn time and only a direct child of the
data home can be materialised before every spawn (a nested leaf's
agent-writable parent could also be renamed out from under the mask). The
directory is registered in all three places at once: `_CREW_SECRET_LEAVES`
(agent file tools), `sandbox._CREW_HIDDEN_LEAVES` (spawned commands, every
mode) and `sandbox._CREW_PRECREATE_HIDDEN_DIR_LEAVES` (created empty at 0700
before each namespace spawn). The DIRECTORY is fenced, not the file, so the
`atomic_write` temp sibling is covered too. A store an earlier build left at
`workspace/meetings/calendar-credentials.json` is moved (never copied) on
the first read that finds the new location empty; only a regular file is
moved (lstat), and a reader that loses the move race to a concurrent reader
still reads the relocated store.
The store is read-modify-write under one lock, written through
`atomic_write(restrict_to_owner=True)` fail-closed, and refuses writes
while the file is unreadable or schema-invalid (display degrades to "not
connected"; the malformed file stays for a human to salvage). The path is
module state, not a request parameter. `GET /calendar/credentials`
publishes field names and booleans only; `PUT` is an allow-list per
provider, so a client cannot hand the app an `access_token`.
Fetch safety (`fetch_vetted`)
All outbound HTTP -- the `.ics` fetch, the CalDAV REPORT, both cloud APIs
and the OAuth token POST -- goes through one module-level gated fetch:
`link_unfurl.vet_unfurl_url` vets the address, DNS is pinned per hop,
redirects are followed manually so every hop is vetted, the body is
size-capped while streaming. `auth_headers` are dropped across a
cross-origin redirect, and a non-GET follows only the method-preserving
307/308. https-only implies port 443 at the vet boundary.
OAuth (`backend/oauth.py`)
Authorization-code + PKCE (S256), run by the gateway's app backend rather
than through kiro-cli's connections because the token is consumed by the
gateway itself (the calendar poller syncs with no agent session). Pending
flows live in memory with a TTL; `state` is compared in constant time and
the flow is consumed before the exchange; access tokens refresh early. The
token POST accepts HTTP 400 so an RFC 6749 error body (`invalid_grant`) is
read and its description surfaced. Every callback exit, including a forged
or expired `state`, writes a `meetings.calendar_oauth_callback` audit
record. The redirect URI derives from the request's own origin.
Events
Every provider funnels through `build_event`, which redacts displayed
fields once and derives `event_id` from the ORIGINAL uid; a uid the
redactor flags as credential-shaped switches to a digest-only id.
Google's date-only start and Graph's `isAllDay` set `all_day`. Graph
responses that ignore the UTC `Prefer` header are mapped through
`_WINDOWS_TO_IANA` before the UTC fallback. CalDAV Multi-Status is parsed
with `defusedxml` (`forbid_dtd=True`).
Two ratchets re-pinned for the new leaf, each with its reason recorded at
the pin: `test_security_gate_liveness._PACKAGE_LINE_BUDGET` (the fence
declaration and its comment in `paths.py`) and
`test_sandbox_protected_name_holds.EXPECTED` (a root leaf is held by its
own name only, three launcher entries per tier, like `auth-store-staging`).
Specs updated: `docs/system-specs/modules/meetings.md` (routes, provider
table, credential store, OAuth custody decision) and `security.md`
(keystone directory `meetings-credentials`).
Co-authored-by: Kiro Crew <noreply@kirodotdev.github.io>
|
|
|
|
|
|
|
|
Open PR triage (2026-10-05): REBASE + merge discussion with #8081Point-in-time code-level audit of head Status: stale, with conflicts. The merge base is
Relationships (from the code, not the topic):
Not new, but still open on this head: the GPT BLOCK (500-event CalDAV cap drops events without counting the overflow, Recommendation: REBASE onto current main, then resolve or rebut the two outstanding BLOCKs. |
|
Thanks for the thorough work on the calendar providers and the Settings flow. We are closing #2190 and #8081 together: both branches are about 5,500 commits behind main and conflict, #8081 has an open security review (the Linux sandbox does not mask workspace/meetings for already-running namespaces), and #2190 still has open review blocks. Main now ships the .ics provider plus the calendar poller (#8080), and Google Calendar and Microsoft 365 can both publish an .ics feed, so the basic need is covered. Richer provider support is tracked in #6769 (first-party Google Workspace connectors) and #16228 (multiple calendar sources). A fresh, smaller PR on current main is welcome. The branch is left untouched, so you can reopen this PR at any time, or open a fresh one on current main, if you want to pick it back up. |
Problem / Motivation
Goal: Meetings reads the user's schedule from their existing CalDAV, Google or Microsoft 365 calendar, so upcoming meetings no longer have to be created by hand.
Meetings had to be created by hand. The app never knew what was already scheduled, so being ready for the meeting that is about to start was left to the user every time. There was no way to connect a calendar at all: no provider, no credential store, and no OAuth handshake for the two providers that need one.
Why it matters
Every downstream feature is gated on knowing the schedule. Without it the app cannot pre-create a meeting, name it, attach attendees or start on time. It also blocks the calendar settings UI (#8081), which has nothing to render until a provider exists.
Not a goal
docs/system-specs/modules/meetings.md.What changed (motivation → approach → change)
The app can now read events from three real calendar providers, and their credentials are kept where no agent can reach them.
providers/calendar.pyadds CalDAV, Google Calendar and Microsoft 365 behind the existingCalendarProviderinterface, next tononeandics. Every event goes through onebuild_event(), so redaction and the all-day flag are applied once for all providers. Remote fetches reuse main's vetted, address-pinned fetch path; CalDAV XML is parsed withdefusedxmland DTDs refused.credentials.pystores the CalDAV password and OAuth tokens in<crew-home>/meetings-credentials/, a top-level data-home directory.oauth.pyruns the authorization-code flow with a single-use randomstate, derives the redirect URI from the request's own origin (kepthttpsbehind a local TLS-terminating proxy throughdashboard.origin.is_https_request), and surfaces the provider'serror_descriptionon a refused token request. Token requests follow no redirect, so a client secret cannot be sent to another host. Tokens are stored only while the connection they were started for still exists: a refresh checks the refresh token it used, and a sign-in checks the client id and a generation that Disconnect advances, so a Disconnect stays disconnected.@odata.nextLinkcomes from the response body, so it is followed only when its origin (scheme, host, port) is the Graph endpoint's; the access token never goes anywhere else.routes/calendar.pyadds credential save/forget and OAuth start/callback. Save, forget and start are owner-only (require_owner).Why the credential directory is top-level: a refresh token is a live bearer credential that outlives any session. A directory nested under
workspace/would be created after a sandbox starts, and the sandbox mask only covers directories that exist at spawn. As a direct child of the data home it is precreated before every spawn and masked in every sandbox mode (sandbox.py), and file tools refuse it (security/paths.py).The OAuth callback is not owner-gated. Its authority is the unguessable
stateminted by the owner-gated start. A cookie gate would refuse the provider redirect on surfaces that authenticate by token. Thestateis compared as bytes, so a non-ASCII value is an ordinary audited rejection rather than a 500.The module and security specs (
meetings.md,security.md) describe the new routes, providers, credential location and OAuth custody.Backwards compatibility
Compatible: every route, file and provider here is new; the one existing contract touched, the Meetings owner gate, only adds routes to it.
Tests
test_meetings_providers.py— CalDAV/Google/Microsoft parsing, all-day detection for Google date-only starts and GraphisAllDay, redaction throughbuild_event, and a GraphnextLinkon another origin refused (including an explicit default port, host case and userinfo tricks).test_meetings_oauth.py— state, redirect URI, token exchange and refresh, a 400 error body surfaced, a token-less body refused, a mismatched non-ASCII state refused, a refresh or a sign-in suspended across a Disconnect (or a reconnect with the same client id) not recreating the credentials, a replaced refresh token not overwritten, and a token request that is redirected refused.test_meetings_calendar_routes.py— the HTTP surface, the store's location, the redirect URI behind a forwardedhttps, and a non-ASCII callbackstaterejected and audited.test_meetings_owner_gate.py— save, forget and OAuth start refuse non-owners and app tokens.test_sandbox_governance_mask.py—meetings-credentialsis masked in every mode and precreated before the first save; the ratchets intest_sandbox_protected_name_holds.pyandtest_security_gate_liveness.pyare re-measured for the new leaf.Manual verification
OAuth against live Google and Microsoft tenants is not verified here: it needs registered client credentials for each. The handshake is covered at the protocol level, and redirect-URI derivation is tested against non-default ports and both loopback spellings.
Related Issues
no linked issue: part of bringing up the Meetings app's calendar support; the UI lands in #8081, which is stacked on this PR.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)