Skip to content
Merged
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
2 changes: 2 additions & 0 deletions auth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>
</head>
<body>
<main class="wrap">
Expand Down
2 changes: 2 additions & 0 deletions auth/ocodejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>
</head>
<body>
<main class="wrap">
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Production visits go untracked

When the production site remains on GitHub Pages and the connected Vercel project is unbuildable because the repository lacks a root package.json, the generic CDN script has no GitHub Pages collection endpoint or project-specific association, so production visits do not appear in Vercel Analytics.

Configure analytics for the actual production host and a functioning project, or serve the site from that project.

Also at projects/index.html:19, profile/preview.html:16, auth/index.html:64, auth/ocodejs.html:64, security/token-vault/public/index.html:25.

Prompt for AI agents
In `index.html` at line 23:

**Production visits go untracked**

When the production site remains on GitHub Pages and the connected Vercel project is unbuildable because the repository lacks a root `package.json`, the generic CDN script has no GitHub Pages collection endpoint or project-specific association, so production visits do not appear in Vercel Analytics.

Configure analytics for the actual production host and a functioning project, or serve the site from that project.

Also at `projects/index.html:19`, `profile/preview.html:16`, `auth/index.html:64`, `auth/ocodejs.html:64`, `security/token-vault/public/index.html:25`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Analytics counts are inflated

When both the existing and CDN loaders execute on a page, /_vercel/insights/script.js and the CDN script both initialize tracking, recording duplicate pageviews and events and inflating dashboard totals.

Remove one loader so each page initializes Web Analytics only once.

Also at projects/index.html:19, profile/preview.html:16, auth/index.html:64, auth/ocodejs.html:64, security/token-vault/public/index.html:25.

Prompt for AI agents
In `index.html` at line 23:

**Analytics counts are inflated**

When both the existing and CDN loaders execute on a page, `/_vercel/insights/script.js` and the CDN script both initialize tracking, recording duplicate pageviews and events and inflating dashboard totals.

Remove one loader so each page initializes Web Analytics only once.

Also at `projects/index.html:19`, `profile/preview.html:16`, `auth/index.html:64`, `auth/ocodejs.html:64`, `security/token-vault/public/index.html:25`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Dashboard sections go untracked

When visitors navigate between dashboard sections, navigate() changes the rendered view without changing the URL or emitting an analytics event, so the script records the initial load but misses section visits.

Emit an analytics event when navigate() switches dashboard sections.

Prompt for AI agents
In `index.html` at line 23:

**Dashboard sections go untracked**

When visitors navigate between dashboard sections, `navigate()` changes the rendered view without changing the URL or emitting an analytics event, so the script records the initial load but misses section visits.

Emit an analytics event when `navigate()` switches dashboard sections.

</head>
<body>
<div class="app">
Expand Down
4 changes: 3 additions & 1 deletion profile/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>
</head>
<body>
<header class="top"><div class="brand">OCode<span>.js</span> / Profile</div><span class="preview">UI PREVIEW · SAMPLE DATA</span></header>
Expand All @@ -36,4 +38,4 @@
$('cancel').onclick=()=>$('modal').classList.remove('open');
$('save').onclick=()=>{$('displayName').textContent=$('nameInput').value.trim()||'OCode Developer';$('readmeName').textContent=$('displayName').textContent;$('bio').textContent=$('bioInput').value;$('modal').classList.remove('open');};
$('modal').addEventListener('click',e=>{if(e.target===$('modal'))$('modal').classList.remove('open')});
</script></body></html>
</script></body></html>
4 changes: 3 additions & 1 deletion projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>
</head>
<body>
<main class="wrap">
Expand Down Expand Up @@ -57,4 +59,4 @@
}catch(error){root.replaceChildren(el("div","empty","Không tải được projects.registry.json: "+error.message));count.textContent="Registry unavailable"}
</script>
</body>
</html>
</html>
2 changes: 2 additions & 0 deletions security/token-vault/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Vault credentials can be exposed

When the external analytics script is compromised or altered while a user signs in, the script runs with access to the page DOM and can capture and exfiltrate the master password, exposing the credentials it protects.

Do not load the third-party analytics script on the credential-entry page.

Also at auth/index.html:64, auth/ocodejs.html:64.

Prompt for AI agents
In `security/token-vault/public/index.html` at line 25:

**Vault credentials can be exposed**

When the external analytics script is compromised or altered while a user signs in, the script runs with access to the page DOM and can capture and exfiltrate the master password, exposing the credentials it protects.

Do not load the third-party analytics script on the credential-entry page.

Also at `auth/index.html:64`, `auth/ocodejs.html:64`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Worker visits go untracked

When visitors use the deployed Token Vault Worker routes, the Worker serves embedded LOGIN_HTML and VAULT_HTML for / and /vault, not public/index.html, so the added script never loads and those visits are not tracked.

Add the analytics script to the HTML served by the Worker routes.

Prompt for AI agents
In `security/token-vault/public/index.html` at line 25:

**Worker visits go untracked**

When visitors use the deployed Token Vault Worker routes, the Worker serves embedded `LOGIN_HTML` and `VAULT_HTML` for `/` and `/vault`, not `public/index.html`, so the added script never loads and those visits are not tracked.

Add the analytics script to the HTML served by the Worker routes.

</head>
<body><main>
<div class="brand"><b>OCode.js</b> / SECURITY</div>
Expand Down
Loading