Skip to content

Conversation

@peopleinfo
Copy link
Collaborator

Motivation

  • Centralize the Anti-Browser security score calculation into a reusable helper to make scoring deterministic and easier to test.
  • Surface a more explainable security score (proxy health, per-profile protections) in the UI so operators can validate the protection posture.
  • Improve ability to validate protections that help reduce multi-account/device ban risk by making the scoring logic testable outside the view.

Description

  • Add getSecurityScore helper in apps/ui/src/renderer/src/lib/securityScore.js that computes stats, activeProxy, protectionChecks, protectionScore, normalizedScore, scoreLabel, and scoreTone from profiles, proxies, and activeProfileId.
  • Wire AntiBrowserView to use getSecurityScore and render the new Security Score tab with score meter, network identity, protection coverage, checklist, and guidance (UI changes in apps/ui/src/renderer/src/views/AntiBrowserView.jsx).
  • Add unit tests in apps/ui/tests/unit/security-score.test.js that validate the baseline score and a fully-protected scenario where all protections and an active proxy produce a high score.

Testing

  • Added unit tests (apps/ui/tests/unit/security-score.test.js) covering the baseline case (no data -> normalizedScore === 30, scoreLabel === "Low") and the full-protection case (all protections + active proxy -> protectionScore === 6, normalizedScore === 100, scoreLabel === "High").
  • No automated test runner was executed as part of this change (tests were created but not run).

Codex Task

app.on("gpu-process-crashed", (event, killed) => {
console.error("[GPU] GPU process crashed, killed:", killed);
if (typeof scheduleActiveBrowserViewRecovery === "function") {
scheduleActiveBrowserViewRecovery({ type: "gpu", killed });
Comment on lines +92 to +95
scheduleActiveBrowserViewRecovery({
type: details.type,
reason: details.reason,
});

function createWindow({ show = true } = {}) {
const shouldShow = Boolean(show);
const trayIcon = resolveAppIcon({
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants