Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

fix(web): remove deprecated eslint config key, add suppressHydrationWarning

Beenucdac1e2cfc74
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04c7da5a5..96accee0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,48 @@ All notable changes to AiSOC will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [7.0.1] — 2026-05-10
+
+### Fixed — Web app hardening: CodeQL, hydration, Turbopack config
+
+#### Security (CodeQL Code-Scanning — 42 alerts cleared)
+
+- **Python**: Resolved `py/unused-global-variable` in `credential_vault.py`,
+ `pack_loader.py`, `executive_digest.py`, `case_summary.py`,
+ `cost_dashboard.py`, and `actions/executors/base.py` by refactoring mutable
+ state into dictionaries and exposing identifiers via `__all__`.
+- **Python**: Resolved `py/cyclic-import` between `osquery-tls` modules by
+ extracting `generate_node_key` into a new `app/core/crypto.py` module.
+- **Python**: Resolved `py/empty-except` in `api/main.py` and `api/services/github.py`
+ by replacing bare `pass` blocks with `logger.debug` calls.
+- **Python**: Resolved `py/log-injection` in `github.py`, `detection_proposals.py`,
+ and `llm_credentials.py` by switching log format specifiers to `%r`.
+- **Python**: Resolved `py/clear-text-logging-sensitive-data` in
+ `workers/oauth_refresh.py` by redacting `tenant_id` and sanitising reason strings.
+- **Python**: Resolved `py/incomplete-url-substring-sanitization` in
+ `llm_resolver.py` by using `urllib.parse.urlparse` for hostname extraction.
+- **Python**: Resolved `py/stack-trace-exposure` in `agents/api/explain.py` by
+ returning a generic error string from the exception handler.
+- **Python**: Resolved `py/call/wrong-arguments` in `agents/tests/smoke_explain.py`
+ by importing and passing a `LlmConfig` instance to `_stream_explanation`.
+- **Python**: Resolved `py/unused-import` in `osquery-tls/db/env.py`; fixed
+ `E402` (import ordering) in the same file.
+- **JavaScript**: Resolved `js/unused-local-variable` in `AlertsView.tsx`
+ (removed unused `toast` import) and `SettingsView.byok.test.tsx` (removed
+ unused `within` import).
+
+#### Web app (`apps/web/`)
+
+- **`next.config.js`**: Removed deprecated `eslint.ignoreDuringBuilds` key that
+ Next.js 16 no longer accepts in the config file; added `turbopack.root` so
+ Turbopack resolves workspace packages correctly.
+- **`src/app/layout.tsx`**: Added `suppressHydrationWarning` to the `<html>`
+ element so that the render-blocking `themeBootstrapScript` can freely write
+ `data-theme`, `data-theme-preference`, and `style.colorScheme` on the client
+ without React reporting a hydration mismatch on every page load.
+
+---
+
## [7.0.0] — 2026-05-10
### Added — v1.0 Buyer-Value Plan: ChatOps, Digest PDF, BYOK, Air-gap, WCAG AA, Analytics
diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts
index 9edff1c7c..c4b7818fb 100644
--- a/apps/web/next-env.d.ts
+++ b/apps/web/next-env.d.ts
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
-import "./.next/types/routes.d.ts";
+import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index 5099adc6d..e9c3de1f2 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -28,6 +28,9 @@ const OSQUERY_TLS_HOST = process.env.OSQUERY_TLS_URL || 'http://localhost:8090';
const nextConfig = {
reactStrictMode: true,
transpilePackages: ['@aisoc/ui', '@aisoc/types'],
+ turbopack: {
+ root: __dirname,
+ },
// Mock data in views uses shapes that diverge from the strict typed API
// contracts. We rely on per-package type-checks (pnpm --filter <pkg> tsc)
// for correctness; during the production build we skip Next.js's strict
@@ -36,9 +39,6 @@ const nextConfig = {
typescript: {
ignoreBuildErrors: true,
},
- eslint: {
- ignoreDuringBuilds: true,
- },
// ─── Client-side env (baked into the JS bundle at build time) ────────────
//
// Defaults are empty strings, which makes every fetch in `lib/api.ts`
diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx
index 46a087bc3..d2c8fe6cf 100644
--- a/apps/web/src/app/layout.tsx
+++ b/apps/web/src/app/layout.tsx
@@ -174,6 +174,7 @@ export default function RootLayout({
lang="en"
data-theme="dark"
className={`${inter.variable} ${jetbrainsMono.variable}`}
+ suppressHydrationWarning
>
<body className="bg-surface-base text-fg-primary antialiased">
<script