Security patches, handled before they pile up

Cyrus turns Dependabot alerts into tested pull requests, fixing whatever the upgrade breaks.

E Engineering › ENG-482☆  ···‹  3 / 14  ›

Patch high-severity axios advisory

Dependabot alert #37 on acme/web: axios before 1.21.0 can forward credentials across cross-origin redirects. Severity: High.

ActivityUnsubscribe
DDependabot created the issue via GitHub14m ago
Security patching automation delegated to Cyrus14m ago
CyrusAgent2m agoCompleted
axios is a direct dependency of web and a transitive one through @acme/sdk.
Ran pnpm up axios@1.21.0 -r
Ran pnpm audit --prod0 vulnerabilities
Ran pnpm test312 passed
Opened acme/web#1294

Upgraded axios to 1.21.0 in web and @acme/sdk and refreshed the lockfile. The audit is clean and all 312 tests pass.

No code changes were needed. Ready for review in acme/web#1294.

Every alert becomes a pull request

Dependabot is good at finding vulnerable dependencies. Cyrus does the next part: it picks up each alert, works it in an isolated worktree, and links the fix back to the alert.

Dependabot alerts3 open
axios forwards credentials on cross-origin redirectHigh
axios#37 opened 14 minutes agopackage.json
#1294 by cyrusagent
path-to-regexp ReDoS in route matchingCritical
path-to-regexp#36 opened yesterdaypnpm-lock.yaml
#1288 by cyrusagent
cookie accepts out-of-bounds charactersModerate
cookie#35 opened 2 days agopnpm-lock.yaml
#1281 merged

It fixes what the upgrade breaks

Some patches need a major version bump. Cyrus reads the changelog, updates the call sites that changed, and keeps going until the project builds again.

⌄src/server/routes.ts+2 −2
@@ -18,7 +18,7 @@ export function registerRoutes(app: Express) {
1818 app.get("/api/sessions", listSessions);
19- app.del("/api/sessions/:id", revokeSession);
19+ app.delete("/api/sessions/:id", revokeSession);
2020
21- app.get("/files/*", serveFile);
21+ app.get("/files/*path", serveFile);
Express 5 removed app.del and requires named wildcards, so the upgrade needed these two route changes.

Verified before it reaches you

Cyrus runs your audit, build, and test suite before it asks for review. You review a green pull request, not a version bump that might work.

All checks have passed
4 successful checks
ci / installSuccessful in 41sDetails
ci / audit0 vulnerabilities foundDetails
ci / buildSuccessful in 1m 52sDetails
ci / test312 passed in 2m 08sDetails

How Cyrus does it

  1. Connect your repositories

    Choose which repositories Cyrus keeps patched and how it builds and tests them.

  2. Alerts start the work

    A Dependabot alert or a security-labeled issue delegates the patch to Cyrus.

  3. Cyrus upgrades and verifies

    It upgrades the package, resolves breakages, and runs your audit and tests.

  4. You review and merge

    The pull request explains every change, with the alert and issue linked.

More automations

Code review A careful first review on every pull request.

Add exponential backoff to email worker by mchen×
github.com/acme/api/pull/1291
acme / apiType / to search

Add exponential backoff to email worker #1291

Openmchen wants to merge 2 commits into main from mchen/email-backoff
Conversation3Commits2Checks4Files changed2
cyrusagent bot reviewed 4 minutes ago
⌄src/workers/email.ts+9 −2
4141 } catch (err) {
42- await sleep(5 * 60_000);
42+ const delay = Math.min(2 ** job.attempt * 1000, 120_000);
43+ await sleep(delay);
cyrusagentbot4 minutes ago
Resend sends a Retry-After header on 429s. Prefer it when present so we don’t retry before the window resets:
Suggested change
- const delay = Math.min(2 ** job.attempt * 1000, 120_000);
+ const delay = retryAfterMs(err) ?? Math.min(2 ** job.attempt * 1000, 120_000);
Commit suggestion
cyrusagent approved these changes just now

Dev support Answers from your codebase, right in Slack.

←  →  ◷Search Acme?
# eng-support ⌄M24
MessagesCanvasFiles
Yesterday ⌄
P
Priya Nair2:14 PM
@Cyrus where do we set the session timeout for the dashboard?
2 repliesLast reply yesterday at 2:20 PM
S
Sam Okafor4:47 PM
Staging is back up after the database migration. Thanks for your patience, everyone.
If anything looks off, drop it in this channel.
Today ⌄
Connor9:12 AM
Reminder: on-call handoff moves to Thursdays starting next week.
S
Sam Okafor9:58 AM
@here web 2.41 is out. Release notes are in #product.
M
Maya Chen10:31 AM
@Cyrus customers say signup confirmation emails are arriving 10+ minutes late since yesterday. Can you take a look?
👀 1🙏 2
M3 repliesLast reply today at 10:38 AM
B I S 🔗 ≔ </>
Message #eng-support
+  Aa  ☺  @➤

Bug fixes Delegate a bug and get back a tested fix.

E Engineering › ENG-517☆  ···‹  3 / 14  ›

Discount codes apply twice when the cart is edited

Reported by two customers today. Apply a code, change a quantity, and the discount is subtracted a second time at checkout.

ActivityUnsubscribe
PPriya Nair delegated to Cyrus31m ago
CyrusAgent6m agoCompleted
Quantity changes re-run applyDiscount on an already-discounted total.
Added cart.test.ts › keeps one discount after editfails as reported
Edited src/cart/pricing.ts
Ran pnpm test cart48 passed
Opened acme/web#1302

Root cause: recalculate() applied the discount to the discounted subtotal instead of the original. The fix computes from line items every time. A regression test is included in acme/web#1302.

Approvals Routine fixes and security patches approved fast, by your code owners.

Bump axios to 1.21.0 by cyrusagent×
github.com/acme/web/pull/1294
acme / webType / to search

Bump axios to 1.21.0 #1294

Opencyrusagent wants to merge 1 commit into main from cyrus/eng-482-patch-axios
Conversation3Commits1Checks4Files changed2
cyrusagentbotcommented 2 minutes agoContributor···
Change riskLow 12
2 filesLockfile and package.json only312 tests pass
Risk of waitingHigh 81
High-severity advisoryCredentials exposed on redirectFix available

Pre-cleared by @mchen for dependency patches in web/. Requesting her approval.

M
mchen approved these changes Pre-cleared via Cyrusjust now
Changes approved
1 approving review by mchen
All checks have passed
4 successful checks
No conflicts with base branch
Merging can be performed automatically.
Merge pull request ▾You can also merge this with the command line.

Stay patched without the busywork

Start a 7-day free trial on Pro or Team. Setup takes minutes.