Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix(ci): stop the semgrep scan failing on a generic argument in a test mock (#195)

Abdurrahman Fakhrul5d07b48dab3f
diff --git a/app/api/v1/infra/setup/route.test.ts b/app/api/v1/infra/setup/route.test.ts
index bca5e9c6..bc65f434 100644
--- a/app/api/v1/infra/setup/route.test.ts
+++ b/app/api/v1/infra/setup/route.test.ts
@@ -18,7 +18,9 @@ vi.mock("@/lib/auth/require-session", () => ({
getSessionContext: mocks.sessionContext,
}));
vi.mock("@/lib/infra/setup-capability", async (importOriginal) => {
- const actual = await importOriginal<typeof import("@/lib/infra/setup-capability")>();
+ // Cast on its own const: Semgrep's TypeScript parser cannot read a generic argument on
+ // `await importOriginal<...>()`, and `--strict` fails the whole scan over it despite 0 findings.
+ const actual = await importOriginal() as typeof import("@/lib/infra/setup-capability");
return {
...actual,
openIntegrationSetup: mocks.openIntegrationSetup,
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 27154372..69ac5f9e 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -11,6 +11,10 @@ this is the *what*, and it is what Settings → Account → About shows as “Wh
- `tui` a tab row and a footer that stay put, painted through the frame writer (#191)
- `tui` a transcript model, because scrollback is the only transcript that exists (#187)
+**Fixed**
+
+- `ci` stop the semgrep scan failing on a generic argument in a test mock
+
**Changed**
- `tui` paint the composer through a frame writer instead of appending (#189)