Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ jobs:
run: uv sync --project services/analysis-engine --group dev --frozen
- name: Build frontend
run: npm run build --workspace @bandscope/desktop
- name: Install create-dmg
run: brew install create-dmg
- name: Build native shell
run: npm exec --workspace @bandscope/desktop -- tauri build --target "$BANDSCOPE_TARGET_TRIPLE" --bundles dmg
- name: Package macOS amd64 artifact
Expand Down Expand Up @@ -270,6 +272,8 @@ jobs:
run: uv sync --project services/analysis-engine --group dev --frozen
- name: Build frontend
run: npm run build --workspace @bandscope/desktop
- name: Install create-dmg
run: brew install create-dmg
- name: Build native shell
run: npm exec --workspace @bandscope/desktop -- tauri build --target "$BANDSCOPE_TARGET_TRIPLE" --bundles dmg
- name: Package macOS arm64 artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
run: cargo +stable install cargo-audit --locked
- name: Audit Rust dependencies
working-directory: apps/desktop/src-tauri
run: cargo +stable audit
run: cargo +stable audit --ignore RUSTSEC-2026-0194 --ignore RUSTSEC-2026-0195
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@
## 2025-02-15 - Replace Array.from(map.values()).map with a for...of loop
**Learning:** Using `Array.from(map.values()).map(...)` creates an unnecessary intermediate array which wastes memory allocation and garbage collection time, particularly for frequently re-rendered components handling large collections.
**Action:** Use a `for...of` loop over `map.values()` to iterate and push mapped elements directly into the final array for O(1) memory and avoiding intermediate array allocations.
## 2025-02-16 - Hoist static mathematical DOM generation to module-level constants
Comment thread
seonghobae marked this conversation as resolved.
**Learning:** Generating decorative elements iteratively (e.g. `Array.from({ length: 84 }).map(...)`) inside a React component's render body causes unnecessary array allocations and garbage collection on every render cycle.
**Action:** Extract static mathematical DOM generation into module-level constants to avoid O(N) allocation overhead per render.
2 changes: 0 additions & 2 deletions apps/desktop/src-tauri/.cargo/audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ ignore = [
"RUSTSEC-2025-0100", # unic-ucd-ident: unmaintained
"RUSTSEC-2025-0098", # unic-ucd-version: unmaintained
"RUSTSEC-2024-0429", # glib 0.18.5: VariantStrIter unsoundness, transitive via Tauri/wry/webkit2gtk/gtk GTK3 stack; remove when upstream drops or patches the chain
"RUSTSEC-2026-0194", # quick-xml 0.39.4: inherited via Tauri/plist and rfd/wayland-scanner; no compatible upstream release has moved both chains to quick-xml >=0.41.0 yet
"RUSTSEC-2026-0195", # quick-xml 0.39.4: same owner chain and removal condition as RUSTSEC-2026-0194
]
58 changes: 13 additions & 45 deletions apps/desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions apps/desktop/src-tauri/osv-scanner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,3 @@ reason = "Inherited through the current Tauri GTK3 owner chain and already track
[[IgnoredVulns]]
id = "RUSTSEC-2024-0429"
reason = "glib 0.18.5 VariantStrIter advisory inherited through Tauri/wry/webkit2gtk/gtk; allowed only until upstream drops or patches the chain, with scope guarded by scripts/checks/verify_supply_chain.py."

[[IgnoredVulns]]
id = "RUSTSEC-2026-0194"
reason = "quick-xml 0.39.4 duplicate-attribute advisory is inherited through Tauri/plist and rfd/wayland-scanner; current compatible upstream crates do not yet allow quick-xml >=0.41.0, and this app does not expose those XML parser paths to untrusted user XML."

[[IgnoredVulns]]
id = "RUSTSEC-2026-0195"
reason = "quick-xml 0.39.4 namespace-allocation advisory is inherited through the same Tauri/plist and rfd/wayland-scanner owner chain as RUSTSEC-2026-0194; remove once compatible upstream crates move to quick-xml >=0.41.0."
16 changes: 9 additions & 7 deletions apps/desktop/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ import { Progress } from "@/components/ui/progress";

const ANALYSIS_POLL_INTERVAL_MS = 250;
const MAX_ERROR_DETAIL_LENGTH = 220;

const LOCAL_FIRST_DECORATION_NODES = Array.from({ length: 34 }, (_, index) => (
<span
key={index}
className="w-1 rounded-t bg-gradient-to-t from-cyan-400 to-violet-400"
style={{ height: `${14 + ((index * 19) % 38)}px` }}
/>
));
const LOCAL_PATH_PATTERN = /(?:[A-Za-z]:[\\/][^\s"'<>]+|\\\\[^\s"'<>]+|\/(?:Users|home|var|tmp|private|Volumes)\/[^\s"'<>]+)/g;
const URL_PATTERN = /\bhttps?:\/\/[^\s"'<>]+/gi;
const SECRET_ASSIGNMENT_PATTERN = /\b(token|secret|password|api[_-]?key|access[_-]?token)\s*[:=]\s*[^\s,;]+/gi;
Expand Down Expand Up @@ -523,13 +531,7 @@ export function App() {
</p>
<div className="mt-3 h-14 overflow-hidden rounded-xl bg-[linear-gradient(90deg,rgba(34,211,238,.12),rgba(124,58,237,.12))]">
<div className="flex h-full items-end gap-0.5 px-2 pb-1" aria-hidden="true">
{Array.from({ length: 34 }).map((_, index) => (
<span
key={index}
className="w-1 rounded-t bg-gradient-to-t from-cyan-400 to-violet-400"
style={{ height: `${14 + ((index * 19) % 38)}px` }}
/>
))}
{LOCAL_FIRST_DECORATION_NODES}
</div>
</div>
</div>
Expand Down
16 changes: 9 additions & 7 deletions apps/desktop/src/features/workspace/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ function safeProjectBootstrapSummary(value: ProjectBootstrapSummary | null): Pro
}
}

const TIMELINE_DECORATION_NODES = Array.from({ length: 84 }, (_, index) => (
<span
key={index}
className="w-1 flex-none rounded-full bg-gradient-to-t from-cyan-500 via-sky-400 to-violet-400 opacity-85"
style={{ height: `${18 + ((index * 23) % 62)}px` }}
/>
));

/** Documented. */
const SongStructure = memo(function SongStructure({ sections, t }: { sections: RehearsalSong["sections"]; t: Translator }) {
return (
Expand Down Expand Up @@ -96,13 +104,7 @@ const SongStructure = memo(function SongStructure({ sections, t }: { sections: R

<div className="relative min-w-[720px] border-t border-white/10 px-3 py-6" aria-hidden="true">
<div className="flex h-24 items-center gap-1 overflow-hidden">
{Array.from({ length: 84 }).map((_, index) => (
<span
key={index}
className="w-1 flex-none rounded-full bg-gradient-to-t from-cyan-500 via-sky-400 to-violet-400 opacity-85"
style={{ height: `${18 + ((index * 23) % 62)}px` }}
/>
))}
{TIMELINE_DECORATION_NODES}
</div>
<div className="absolute inset-x-3 top-1/2 h-px bg-cyan-200/20" />
</div>
Expand Down
1 change: 0 additions & 1 deletion docs/security/dependency-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ Current controlled exceptions:
- No Python vulnerability exceptions are active. `GHSA-5239-wwwm-4pmq` (`Pygments <2.20.0`) was removed by locking `Pygments` to `2.20.0`; the CI `security-audit` workflow must run `pip-audit --local --strict` against the synced `uv` environment without a targeted ignore for that advisory.
- Cargo audit warnings for legacy `gtk3` vulnerabilities (e.g. `RUSTSEC-2024-0413`) inherited through Tauri v2 `wry`/`webkit2gtk` integration are explicitly allowed. These are deep framework dependencies with no alternative, so they are documented exceptions and ignored by default.
- `RUSTSEC-2024-0429` for `glib 0.18.5` is allowed only for the `VariantStrIter` advisory inherited through the Tauri/wry/webkit2gtk/gtk GTK3 stack. A compatible lockfile refresh can move the desktop stack to `tauri 2.11.3`, `wry 0.55.1`, `tao 0.35.3`, `muda 0.19.3`, and related transitive patches, but it still does not move this stack to patched `glib >=0.20.0`; the exception must remain encoded in repo-controlled audit configuration and guarded by `scripts/checks/verify_supply_chain.py`, and it must be removed when upstream drops or patches the chain.
- `RUSTSEC-2026-0194` and `RUSTSEC-2026-0195` for `quick-xml 0.39.4` are allowed only while the current compatible upstream owner chains still require vulnerable `quick-xml`: `plist 1.9.0` through Tauri, and `wayland-scanner 0.31.10` through Linux `rfd`/Wayland dependencies. `quick-xml >=0.41.0` is patched, but `plist 1.9.0` requires `quick-xml ^0.39.2` and the current `wayland-scanner` release also has no compatible patched path. BandScope does not expose either owner chain as a user-controlled XML ingestion surface; the exception must stay encoded in repo-controlled cargo-audit and OSV configuration, and must be removed once compatible upstream crates publish a patched dependency path.

Retired third-party deprecation and advisory signal:

Expand Down
4 changes: 2 additions & 2 deletions services/analysis-engine/src/bandscope_analysis/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def main() -> int:
try:
with open(input_data, "r", encoding="utf-8") as f:
input_data = f.read()
except Exception:
json.dump(failed_cli_response("Failed to read job file"), sys.stdout)
except Exception as e:
json.dump(failed_cli_response(f"Failed to read job file: {e}"), sys.stdout)
return 1

if not input_data:
Expand Down
Loading