GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — v0.8.16: aws lambda, dynamics 365, actorless run fixes, usage chart by TheodoreSpeaks · Pull Request #7224 · simstudioai/sim Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* feat(secrets): reveal visible values to members * fix(secrets): harden visible value reveal * fix(secrets): reveal legacy values safely
…al (#7228) * fix(execution): treat an undetermined lease as a fallback, not a denial The distributed owner lease is a cross-process fairness check, not a correctness lock. A round trip that did not answer before its deadline was reported as a hard failure and rejected the execution, even though the per-process pool and the per-owner active/queued limits still bound the work. - Fall back to the local limits when the lease is undetermined. Only `limit_exceeded` denies an execution, since it is an actual answer. - Rename that outcome from `unavailable` to `undetermined` so the absence of an answer is not read as a negative one, and log it at warn. - Make the round-trip deadline configurable and raise its default. This deadline and the client's `commandTimeout` are both plain timers, so a value near normal event-loop latency misreads a scheduling pause as an unreachable dependency. - Skip the release round trip when no lease was ever registered. * fix(execution): reclaim a lease Redis registers after the local deadline Addresses review findings on the fallback path. - Always release the lease. The deadline abandons the local wait but cannot cancel the script, so a late completion still registers the lease id; leaving it unreleased kept it counted against the owner for the whole TTL and denied later executions that did have capacity. The id is unique per execution, so removing one that was never registered is a no-op. - Treat a non-positive configured deadline as unconfigured. A timer of zero or less fires immediately, which would leave every acquisition undetermined and silently drop cross-replica enforcement. - Cover both with tests: a lease that completes after the deadline is still released, and a non-positive deadline still lets a real answer land. * test(execution): stop the lease deadline override leaking between tests - Add `IVM_LEASE_REDIS_DEADLINE_MS` to the harness env reset. It was absent, so a test that overrode it left the value in the module-scoped mock env for every later test in the file, quietly changing their fallback timing. - Drop the duplicate over-limit test and fold its extra assertion into the existing one; the two had identical setup and covered the same path.
* fix(guardrails): route PII validation through app runtime * fix(guardrails): bound PII validation results
* fix(executor): preserve actors for actorless tool calls * fix(auth): bind legacy execution actors to principals
|
Too many files changed for review (567 files, 100 file limit). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
7 issues found across 567 files
Confidence score: 2/5
apps/sim/lib/internal/datadog/operations/update-slo.ts can send Datadog credentials to an attacker-controlled api.<site> when site is arbitrary, creating a serious credential disclosure risk — validate the value against the runtime DatadogSite allowlist before building the URL.apps/sim/lib/internal/google-drive/operations.ts may include an existing destination parent in both addParents and removeParents, causing Drive to reject the update or remove the intended parent — exclude the destination from removals.apps/sim/lib/internal/bitbucket/operations/get-file.ts can request an invalid range for zero-byte text files, while apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx can place the caret incorrectly when editing masked secrets — short-circuit empty files and preserve the real secret length when positioning the caret.apps/sim/lib/internal/cbinsights/operations/rag.ts, apps/sim/lib/internal/managed-agent/operations/respond-tool-confirmation.ts, and apps/sim/lib/internal/cbinsights/operations/get-exit-probability-history.ts: boundary or non-string inputs can bypass contracts or throw instead of returning validation responses — enforce the documented types and limits before trimming or invoking downstream operations.
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/internal/bitbucket/operations/get-file.ts">
<violation number="1" location="apps/sim/lib/internal/bitbucket/operations/get-file.ts:28">
P2: When metadata reports a zero-byte text file, this requests `Range: bytes=0-...` and can receive 416 instead of returning the valid empty file. Short-circuit zero-size files with `content: ''` before the raw request.</violation>
</file>
<file name="apps/sim/lib/internal/cbinsights/operations/rag.ts">
<violation number="1" location="apps/sim/lib/internal/cbinsights/operations/rag.ts:10">
P2: When `message` is exactly 10,000 characters, this guard allows it despite the tool contract requiring fewer than 10,000 characters. Reject the boundary value before calling CB Insights.</violation>
</file>
<file name="apps/sim/lib/internal/google-drive/operations.ts">
<violation number="1" location="apps/sim/lib/internal/google-drive/operations.ts:324">
P2: When the destination is already a current parent, this sends it in both `addParents` and `removeParents`, so Drive can reject the update or remove the destination parent. Exclude the destination from `removeParents` and omit the parameter when no parents remain.</violation>
</file>
<file name="apps/sim/lib/internal/managed-agent/operations/respond-tool-confirmation.ts">
<violation number="1" location="apps/sim/lib/internal/managed-agent/operations/respond-tool-confirmation.ts:39">
P2: When a malformed request supplies a non-string `denyMessage`, `.trim()` throws before the `try` block, so the operation escapes without a `ToolResponse`. Accept only strings (or coerce the value) before trimming.</violation>
</file>
<file name="apps/sim/lib/internal/cbinsights/operations/get-exit-probability-history.ts">
<violation number="1" location="apps/sim/lib/internal/cbinsights/operations/get-exit-probability-history.ts:20">
P2: When `startDate` or `endDate` arrives with a non-string runtime value, optional chaining does not protect `.trim()`, so this operation throws a `TypeError` instead of returning the existing descriptive validation error. Use `parseOptionalStringParam` for both date parameters, as the sibling history operation does.</violation>
</file>
<file name="apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx:59">
P2: When an editable secret is longer than ten characters, clicking to edit it computes the caret against the ten-character mask before focus replaces it with the real value, so typing inserts at the wrong offset. Keep the real value in editable inputs and apply visual masking, or remap the selection when revealing it.</violation>
</file>
<file name="apps/sim/lib/internal/datadog/operations/update-slo.ts">
<violation number="1" location="apps/sim/lib/internal/datadog/operations/update-slo.ts:14">
P1: When an operation input contains an arbitrary `site`, this URL builder sends the Datadog credentials to `api.<site>`. Validate `site` against the fixed `DatadogSite` allowlist at the runtime boundary before constructing the URL, and reject unknown sites.</violation>
</file>
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Triaged the 33 open Cubic findings on this release against the workspace storage lock change from #7187. No overlap. None of the findings touch any of that PR's 11 changed files, and none touch row locking, transaction ordering, storage accounting, or workspace payer semantics. They group as: AWS Lambda contract bounds (17), Dataverse/Dynamics 365 OAuth and credential UI (5), CB Insights input guards (2), overflow-tooltip UI (2), and one each in Datadog, Google Drive, Bitbucket, managed-agent, isolated-vm, the secret value field, and a skill doc. The nearest neighbour is the isolated-vm finding, which concerns a Redis execution lease rather than a database row lock. Verified the change is intact as merged here: every #7187 was reviewed at 5/5 with zero open threads, so no follow-up code change is needed for that scope. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Reviewed the 33 Cubic findings against the integration-defects change from #7195 (Confluence Zero of the 33 threads touch any of that PR's 70 changed files. The one with a real connection is the I also re-verified that #7207's retirement carried the #7195 GitHub fix forward intact rather than dropping it in the rewrite. The rest of the #7195 surface is byte-identical on staging (46 Confluence tools, 5 Drive tools plus the block, Vanta, the subblock migration, No further code change needed for that scope. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… checklist (#7236) The transport checklist listed the property inside a bare enumeration -- "declares `request.internal`, or `directExecution`, or has an HTTP fallback" -- which stacks two disjunctions and drops the "retired" framing every other statement of this rule carries, including line 71 of the same file and the add-tools, add-trigger, and add-block skills. A reader scanning the checklist could take it for a property that still exists and is merely discouraged. Wording only; the rule itself is unchanged and is enforced by check:tool-request-boundary.
…quisition (#7237) * fix(execution): release the lease when abort races an undetermined acquisition The cancellation return for an aborted execution ran before `releaseLease` was declared, so it exited without releasing. An undetermined acquisition can still be registered by Redis after the deadline abandons the local wait, and that member then counted against the owner for the whole TTL, denying later executions that had capacity. Declare the release before the early returns so every exit path that can leave a registration behind reaches it, and call it on the cancellation path. The over-limit return still skips it: the script answers that before its ZADD, so nothing was ever registered. * fix(execution): keep the over-limit abort path release-free The abort guard fires for any non-acquired result, so an over-limit acquisition that was already aborted also released — contradicting the rule stated two lines below, where the same result returns without releasing because the script answers before its ZADD. Restrict the release to undetermined results and assert the no-release behavior in the existing over-limit abort test.
* fix(dataverse): harden OAuth connection preflight * fix(dataverse): preserve legacy reconnect behavior
|
Went through the review threads on this release PR and handled the 17 that land on the AWS Lambda integration from #7216. Fix is up as #7241 against 16 were real and are fixed. Two were genuine holes rather than missing bounds:
The rest are documented AWS bounds — alias names (1–128 plus the pattern that rejects all-digit names), descriptions (256), layer names (140 plus the name-or-ARN pattern), optional One I did not change: Two details worth flagging for anyone reading the diff:
I also scoped a couple of requests down where the reference doesn't back them: no per-key maximum on The remaining open threads on this PR belong to the other changes in the release (Dataverse, Datadog, Bitbucket, CB Insights, Google Drive, managed agents, isolated-vm, secrets, sidebar) and are for those authors. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* feat(credential-groups): add seventeen OAuth providers Adds Airtable, Asana, Attio, Box, Cal.com, ClickUp, DocuSign, Dropbox, HubSpot, Linear, LinkedIn, monday.com, Notion, Pipedrive, Salesforce, WordPress.com and Zoom to Credential Groups. * fix(credential-groups): hydrate the list cache with the whole response The settings prefetch seeded the shared list key with only the groups array, so every consumer read an empty list for as long as the hydrated value stayed fresh. Also resets the account-type filter when a group opens or closes, alongside the tab it already reset.
Co-authored-by: Sim Pi Agent <[email protected]>
* fix(lambda): close the remaining contract validation gaps Follow-up to #7216, from review on the release PR. Every bound added here is one the AWS Lambda API reference documents; findings that asked for undocumented limits were left alone. Code source selection had two holes. `hasS3` required both S3 fields, so a partial pair alongside `imageUri` read as "image only" and the stray S3 field still went to AWS; and an `imageUri` with no `packageType` was accepted even though the package type then defaults to Zip. Both now fail at the boundary, naming the field to change, and the zip-only `s3ObjectVersion` and `sourceKmsKeyArn` count as S3 fields for the exclusivity check. The VPC guard only checked that both lists were supplied, so supplying both with one empty passed and produced a partial update. Both must now be empty (detach) or both populated (attach). Documented bounds added: - alias names: 1-128 and the documented pattern, which excludes all-digit names - descriptions: 256 characters - layer names: 140 characters and the name-or-ARN pattern - optional `functionName` on the event source mapping operations: 1-256 - `RemovePermission` statement IDs: 1-100 and its own pattern, which allows a dot where `AddPermission` does not Also rejects values that are structurally meaningless rather than merely out of range: empty tag keys, empty Kafka bootstrap servers, more than one weighted routing entry, and an event source mapping that supplies both an event source ARN and self-managed Kafka bootstrap servers. * fix(lambda): match twelve digits in the layer ARN pattern The account-ID segment was written as `\d{12}` inside a template literal, so the emitted regex carried a literal `d{12}` and rejected every real layer ARN. The existing test only covered an over-long name, which is why it passed. Escapes the backslash and adds the coverage that would have caught it: a real layer ARN and a bare layer name are both accepted, and an ARN whose account segment is not twelve digits is rejected. * fix(lambda): reject empty code-source fields instead of ignoring them The mutual-exclusivity check used truthiness, so `imageUri` alongside `s3Bucket: ''` read as image-only while the create operation still forwarded the defined empty field to AWS. An empty string is meaningless for every code-source field, so each is now `.min(1)` at the contract rather than special-cased in the refinement. * fix(lambda): reject empty optional strings across the Lambda contracts An empty `eventSourceArn` alongside bootstrap servers slipped past the mutual-exclusivity check for the same reason the code-source fields did: the guard tests truthiness, so a defined-but-empty value reads as absent while the operation still forwards it. Rather than patch each field as it surfaces, every optional string field now rejects an empty value. The tool layer already drops `''` before it reaches a contract, so an empty value can only arrive from a malformed direct call, and forwarding it to AWS is never right. `description` is exempt: AWS documents it as "Minimum length of 0", so an empty value legitimately clears it. Both behaviours are covered by tests. * fix(lambda): stop rejecting values AWS documents as valid A comprehensive validation pass against the API reference found the previous commit's blanket "no empty optional strings" rule was wrong. Several Lambda parameters document an empty string as meaningful, and their patterns say so: KMSKeyArn, SourceKMSKeyArn, and DeadLetterConfig.TargetArn all carry `(arn:...)|()`, whose trailing alternative matches the empty string, and the on-success/on-failure destinations document `Minimum length of 0` with a pattern beginning `$|`. For each, empty is how the setting is cleared. The rule is now opt-in rather than opt-out: only the five fields feeding a truthiness-based cross-field check reject an empty value. That removes 47 constraints and leaves the ones that were actually reported. Also from the same pass: - Supplying an image URI no longer demands an explicit `packageType`. That subBlock is advanced with no default, so requiring it produced a 400 naming a control the user cannot see; the operation derives Image from the code source instead, and only an explicit Zip alongside an image is rejected. - `fileSystemConfigs` was the one projection without a null guard, so an omitted field vanished from the block output rather than reading null. - An absent function URL now maps to null instead of an empty string a workflow could build a request against. - GetFunction reports `tagsError`, so a partial tag-read failure is distinguishable from a function with no tags, and marks `configuration` nullable to match what the operation returns. - Event source mappings report `selfManagedKafkaBootstrapServers`, which could be set but never read back. - TagResource rejects an empty tag map instead of reporting "0 tags applied". * test(lambda): prove every projection matches its contract schema Reading code confirmed the projections and schemas agree, but nothing ran them against each other. This runs all eight shared mappers against their schemas in both directions: every declared key is emitted and non-undefined, no undeclared key is emitted, and the result parses — for an empty AWS response, which is the common case, and for a fully-populated one. Verified the suite fails when either defect class is reintroduced: a mapper that stops emitting a declared key, and a projection that leaks `undefined` where the schema declares a value.
…s to constrain (#7244) * fix(integrations): validate runtime values the type system only claims to constrain Three defects surfaced by review of the v0.8.16 release PR (#7224), each one a declared type standing in for a check that never runs. datadog: `DatadogSite` is a compile-time union, erased at runtime, and `site` is interpolated straight into the request host while every Datadog request carries DD-API-KEY and DD-APPLICATION-KEY. An unvalidated value therefore chose where the workspace's Datadog credentials were sent: `evil.com` addresses api.evil.com, and `[email protected]` addresses evil.com with the expected host as userinfo. The site list is now a runtime array with the type derived from it, and both host builders -- `datadogApiUrl` (31 call sites) and the logs intake in send_logs -- resolve through one validator. Not reachable from the editor today, since the block renders a dropdown and the param is user-only; the value still survives in stored workflow state, which imports and programmatic edits write directly. cbinsights: `params.x?.trim()` guards undefined, not the type, so a block-to-block reference resolving to a number threw a bare TypeError naming no parameter. The sibling history operation already used `parseOptionalStringParam`; the remaining 19 sites now do too. Behaviour is otherwise unchanged -- `compactBody` already dropped '' and undefined alike, and every non-compactBody use tests falsiness. cbinsights rag: the guard admitted a 10,000-character message while its own error and the tool's param description both say "under 10,000". managed-agent: `denyMessage` was trimmed above the try block, so a non-string threw past every `success: false` path the operation otherwise returns. It is now coerced the same way `decision` is a few lines above. Two further findings on that PR were checked and left alone: the Drive addParents/removeParents overlap matches Google's own documented move sample in all four languages, and Bitbucket's Range behaviour on a zero-byte file is undocumented, so neither is a verified defect. * fix(datadog): route every host builder through the allowlist, coerce scalars safely Review round 1 on #7244 found the first pass incomplete, and both findings reproduce. The site allowlist only covered the shared `datadogApiUrl` and the logs intake. Ten tools build the host inline -- `const site = params.site || 'datadoghq.com'` in cancel_downtime, create_downtime, create_event, create_monitor, get_monitor, list_downtimes, list_monitors, query_logs, query_timeseries and submit_metrics -- so they never reached the validator while still attaching DD-API-KEY and, where the endpoint needs it, DD-APPLICATION-KEY. All ten now resolve through it. The new test sweeps the tool registry rather than naming tools, so a future tool that reintroduces an inline builder fails instead of shipping an unguarded request. `(value ?? '').toString()` was itself unsafe: an object whose `toString` is not a function, and one with a null prototype, both throw TypeError, and `String(value)` throws on the same two. That read sits above the try block, so it escaped the structured `success: false` result this operation promises. `normalizeScalarText` converts only the scalar kinds `String()` cannot fail on and returns '' otherwise, matching how `normalizeStringList` already treats a value of the wrong type. The identical hazard on `decision` two lines above is fixed with it as well.
Co-authored-by: Sim Pi Agent <[email protected]>
There was an error while loading. Please reload this page.
30775536
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.