Repository Analysis

HeyPuter/puter

🌐 The Internet Computer! Free, Open-Source, and Self-Hostable.

6.9 Low AI signal View on GitHub
6.9
Adjusted Score
6.9
Raw Score
100%
Time Factor
2026-05-30
Last Push
41,982
Stars
TypeScript
Language
319,233
Lines of Code
1083
Files
807
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 3HIGH 3MEDIUM 681LOW 120

Pattern Findings

807 matches across 10 categories. Click a row to expand file-level details.

Decorative Section Separators676 hits · 2001 pts
SeverityFileLineSnippet
MEDIUMinstall.sh41# ── Step 1: dependency check ────────────────────────────────────────
MEDIUMinstall.sh49# ── Step 2: install dir ─────────────────────────────────────────────
MEDIUMinstall.sh67# ── Step 3: docker-compose.yml + nginx config ──────────────────────
MEDIUMinstall.sh83# ── Step 4: secrets, .env, config.json ──────────────────────────────
MEDIUMinstall.sh181# ── Step 5: bring it up ─────────────────────────────────────────────
MEDIUMdocker-compose.yml167 # ── Optional: local LLM ───────────────────────────────────────────
MEDIUMsrc/backend/drivers/driverPolicies.test.ts62// ── Non-AI drivers (migrated from hardcoded-permissions) ────────────
MEDIUMsrc/backend/drivers/driverPolicies.test.ts155// ── Iface coordination cross-check ──────────────────────────────────
MEDIUMsrc/backend/drivers/meta.test.ts32// ── validateDriverRateLimit ─────────────────────────────────────────
MEDIUMsrc/backend/drivers/meta.test.ts143// ── resolveDriverMethodRateLimit ────────────────────────────────────
MEDIUMsrc/backend/drivers/meta.test.ts182// ── @Driver decorator: rateLimit propagation ────────────────────────
MEDIUMsrc/backend/drivers/meta.test.ts271// ── validateDriverConcurrent ────────────────────────────────────────
MEDIUMsrc/backend/drivers/meta.test.ts340// ── resolveDriverMethodConcurrent ───────────────────────────────────
MEDIUMsrc/backend/drivers/meta.test.ts371// ── @Driver — concurrent option ─────────────────────────────────────
MEDIUMsrc/backend/drivers/ai-ocr/OCRDriver.test.ts57// ── SDK mocks ───────────────────────────────────────────────────────
MEDIUMsrc/backend/drivers/ai-ocr/OCRDriver.test.ts99// ── Test harness ────────────────────────────────────────────────────
MEDIUMsrc/backend/drivers/ai-ocr/OCRDriver.test.ts177// ── getReportedCosts ────────────────────────────────────────────────
MEDIUMsrc/backend/drivers/ai-ocr/OCRDriver.test.ts195// ── Argument validation ─────────────────────────────────────────────
MEDIUMsrc/backend/drivers/ai-ocr/OCRDriver.test.ts239// ── AWS Textract ────────────────────────────────────────────────────
MEDIUMsrc/backend/drivers/ai-ocr/OCRDriver.test.ts374// ── Mistral OCR ─────────────────────────────────────────────────────
MEDIUMsrc/backend/drivers/ai-ocr/OCRDriver.test.ts571// ── Default provider selection ──────────────────────────────────────
MEDIUMsrc/backend/drivers/util/fileInput.test.ts29// ── Test harness ────────────────────────────────────────────────────
MEDIUMsrc/backend/drivers/util/fileInput.test.ts113// ── inferFilenameFromUrlOrPath ─────────────────────────────────────
MEDIUMsrc/backend/drivers/util/fileInput.test.ts145// ── loadFileInput — argument validation ─────────────────────────────
MEDIUMsrc/backend/drivers/util/fileInput.test.ts192// ── loadFileInput — data URL path ───────────────────────────────────
MEDIUMsrc/backend/drivers/util/fileInput.test.ts272// ── loadFileInput — FS path ─────────────────────────────────────────
MEDIUM…ackend/drivers/notification/NotificationDriver.test.ts28// ── Test harness ────────────────────────────────────────────────────
MEDIUM…ackend/drivers/notification/NotificationDriver.test.ts75// ── create ──────────────────────────────────────────────────────────
MEDIUM…ackend/drivers/notification/NotificationDriver.test.ts136// ── read ────────────────────────────────────────────────────────────
MEDIUM…ackend/drivers/notification/NotificationDriver.test.ts184// ── select / predicates ─────────────────────────────────────────────
MEDIUM…ackend/drivers/notification/NotificationDriver.test.ts274// ── mark_shown / mark_acknowledged ─────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts57// ── Test harness ────────────────────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts103// ── Helpers ─────────────────────────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts127// ── Model catalog ───────────────────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts180// ── Auth + model resolution ─────────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts257// ── Happy path: events + cost emission ──────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts423// ── Validation event routing ────────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts480// ── Credit gate + max_tokens cap ────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts584// ── Normalisation ───────────────────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts638// ── Fallback / error envelope ───────────────────────────────────────
MEDIUM…c/backend/drivers/ai-chat/ChatCompletionDriver.test.ts704// ── Streaming ───────────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts58// ── OpenAI SDK mock ─────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts81// ── imageHandling stub ──────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts91// ── Test harness ────────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts152// ── Construction ────────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts165// ── Model catalog ───────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts192// ── Request shape ───────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts334// ── Image inlining for vision models ────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts392// ── Model resolution ────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts466// ── Non-stream completion ───────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts596// ── Streaming deltas ────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts727// ── Error mapping ───────────────────────────────────────────────────
MEDIUM…rs/ai-chat/providers/moonshot/MoonshotProvider.test.ts750// ── Moderation ──────────────────────────────────────────────────────
MEDIUM…/ai-chat/providers/together/TogetherAIProvider.test.ts57// ── Together SDK mock ───────────────────────────────────────────────
MEDIUM…/ai-chat/providers/together/TogetherAIProvider.test.ts78// ── Test harness ────────────────────────────────────────────────────
MEDIUM…/ai-chat/providers/together/TogetherAIProvider.test.ts173// ── Construction ────────────────────────────────────────────────────
MEDIUM…/ai-chat/providers/together/TogetherAIProvider.test.ts183// ── Model catalog ──────────────────────────────────────────────────
MEDIUM…/ai-chat/providers/together/TogetherAIProvider.test.ts221// ── Request shape ──────────────────────────────────────────────────
MEDIUM…/ai-chat/providers/together/TogetherAIProvider.test.ts344// ── Model resolution ────────────────────────────────────────────────
MEDIUM…/ai-chat/providers/together/TogetherAIProvider.test.ts399// ── Non-stream completion ───────────────────────────────────────────
616 more matches not shown…
Over-Commented Block64 hits · 64 pts
SeverityFileLineSnippet
LOWinstall.sh1#!/usr/bin/env sh
LOWdocker-compose.yml1---
LOWdocker-compose.yml21# grabs this file, generates secrets, writes .env + config.json, and runs
LOWdocker-compose.yml161 else
LOWsrc/puter-js/src/index.js841 // the existing `puter.token` postMessage delivers the
LOWsrc/puter-js/src/lib/path.js1// import {cwd} from './env.js'
LOWsrc/puter-js/src/lib/utils.js441 xhr._puterDriverRequestInfo = requestInfo;
LOWsrc/puter-js/src/modules/AI.js221 // language: "en-US"
LOWsrc/puter-js/src/modules/UI.js161 #parentAppConnection = null;
LOWsrc/puter-js/src/modules/Drivers.js241 // For example:
LOWsrc/backend/index.ts21import path from 'node:path';
LOWsrc/backend/server.ts221
LOWsrc/backend/server.ts681 createErrorHandler({
LOWsrc/backend/server.ts821
LOWsrc/backend/drivers/util/aiLimits.ts21 DEFAULT_FREE_SUBSCRIPTION,
LOWsrc/backend/drivers/subdomain/SubdomainDriver.ts501 }
LOWsrc/backend/drivers/apps/AppDriver.js501 if (object.icon !== undefined) {
LOWsrc/backend/drivers/apps/AppDriver.js781 uuid: actor.user.uuid,
LOWsrc/backend/drivers/apps/AppDriver.js841 }
LOWsrc/backend/core/http/middleware/privateAppGate.test.ts761 expectedAppUid: `app-target-${uuidv4()}`,
LOWsrc/backend/core/http/middleware/puterSite.test.ts21import type { Request, Response } from 'express';
LOWsrc/backend/core/http/middleware/authProbe.ts161
LOWsrc/backend/util/appIcon.ts21// than the `puter-app-icons` subdomain directly. Some apps (especially those
LOWsrc/backend/util/nativeImport.ts21// analysis, but the resulting function inherits a vm context with no
LOWsrc/backend/stores/app/AppStore.js41// Old-name redirect window. After this many months an entry in
LOWsrc/backend/stores/app/AppStore.js81// - identity: `id`, `uid`
LOWsrc/backend/stores/subdomain/SubdomainStore.js21import { PuterStore } from '../types';
LOWsrc/backend/stores/session/SessionStore.js21import { PuterStore } from '../types';
LOWsrc/backend/stores/session/SessionStore.js41const TOUCH_THROTTLE_MAX_ENTRIES = 10000;
LOWsrc/backend/controllers/auth/AuthController.ts481 //
LOWsrc/backend/controllers/oidc/OIDCController.test.ts41// Boots one real PuterServer with a custom OIDC provider configured,
LOWsrc/backend/controllers/apps/AppController.js81 { legacyCode: 'bad_request' },
LOWsrc/backend/controllers/share/ShareController.ts41 // router.post(
LOWsrc/backend/controllers/share/ShareController.ts61 // }
LOWsrc/backend/controllers/share/ShareController.ts81 // };
LOWsrc/backend/controllers/share/ShareController.ts101 // // Email must be confirmed
LOWsrc/backend/controllers/share/ShareController.ts121 // );
LOWsrc/backend/controllers/share/ShareController.ts141 // };
LOWsrc/backend/controllers/share/ShareController.ts161 // // -- POST /sharelink/request -------------------------------------
LOWsrc/backend/controllers/share/ShareController.ts181 // actor.user.email_confirmed &&
LOWsrc/backend/controllers/share/ShareController.ts201 // (share.data as Record<string, unknown>)?.permissions ??
LOWsrc/backend/controllers/share/ShareController.ts221
LOWsrc/backend/controllers/share/ShareController.ts241 // }
LOWsrc/backend/controllers/share/ShareController.ts261 // );
LOWsrc/backend/controllers/share/ShareController.ts281 // permissions: permissions.map(
LOWsrc/backend/controllers/share/ShareController.ts301 // metadata: body.metadata ?? {},
LOWsrc/backend/controllers/share/ShareController.ts321 // html: `<p>${actor.user.username} shared items with you.</p><p><a href="${origin}?shar
LOWsrc/backend/controllers/share/ShareController.ts341
LOWsrc/backend/controllers/share/ShareController.ts361 // * Convert share declarations into a flat permission list.
LOWsrc/backend/controllers/share/ShareController.ts381 // }
LOWsrc/backend/services/auth/TokenService.ts21import { PuterService } from '../types';
LOWsrc/backend/services/auth/AuthService.ts1081 // -- Private / public hosted asset cookies -----------------------
LOWsrc/backend/services/socket/SocketService.ts81 */
LOWsrc/docs/build.js381 html += '<script>hljs.highlightAll();</script>';
LOWsrc/docs/src/sidebar.js641 // title: '<svg style="margin-right: 5px; margin-bottom: -3px;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="
LOWsrc/docs/src/sidebar.js661 // source: '/Perms/grantApp.md',
LOWsrc/docs/src/sidebar.js681 // icon:'/assets/img/function.svg',
LOWsrc/docs/src/sidebar.js701 // page_title: '<code>puter.perms.revokeAppAnyUser()</code>',
LOWsrc/gui/src/initgui.js1141
LOWsrc/gui/src/init_sync.js61 })();
4 more matches not shown…
Verbosity Indicators18 hits · 33 pts
SeverityFileLineSnippet
LOWsrc/dev-center/js/websites.js57 // Step 1: Show directory picker
LOWsrc/dev-center/js/websites.js67 // Step 2: Ask for website name
LOWsrc/dev-center/js/websites.js71 // Step 3: Create website with selected directory
LOWsrc/dev-center/js/websites.js447 // Step 1: Show directory picker
LOWsrc/dev-center/js/websites.js454 // Step 2: Confirm the change since it will replace the current website
LOWsrc/dev-center/js/websites.js474 // Step 3: Show loading spinner
LOWsrc/dev-center/js/websites.js478 // Step 4: Delete the existing website
LOWsrc/dev-center/js/websites.js481 // Step 5: Create a new website with the same name but new directory
LOWsrc/dev-center/js/websites.js484 // Step 6: Refresh the websites list to show the updated directory
LOWsrc/dev-center/js/websites.js487 // Step 7: Show success message
LOWsrc/dev-center/js/workers.js75 // Step 1: Show file picker limited to .js files
LOWsrc/dev-center/js/workers.js87 // Step 2: Ask for worker name
LOWsrc/dev-center/js/workers.js91 // Step 3: Create worker with selected file
LOWsrc/puter-js/test/ai.test.js103 // For streaming, we need to check if it's an async iterator or has a different structure
LOWsrc/docs/src/playground/examples/ai-image-edit.html8 // Step 1: Generate initial image
LOWsrc/docs/src/playground/examples/ai-image-edit.html23 // Step 2: Edit the image in a follow-up turn
LOWsrc/gui/src/index.js58 // window.disable_temp_users might be set somewhere else, so we need to check if it is already set and if not, use t
LOWsrc/gui/src/lib/jquery-ui-1.13.2/jquery-ui.js17258 // IE sets focus asynchronously, so we need to check if focus
Hyper-Verbose Identifiers32 hits · 32 pts
SeverityFileLineSnippet
LOWextensions/thumbnails.ts75async function decodeAndValidateThumbnail(
LOWsrc/dev-center/js/apps.js2692function getDefaultPreviewImagesState () {
LOWsrc/dev-center/js/apps.js2700function createPreviewThumbElement (item) {
LOWsrc/puter-js/test/index.html1131 function updateMasterCheckboxState() {
LOWsrc/puter-js/src/lib/socket.io/socket.io.js469 function createPacketEncoderStream() {
LOWsrc/puter-js/src/lib/socket.io/socket.io.js524 function createPacketDecoderStream(maxPayload, binaryType) {
LOWsrc/puter-js/src/modules/EmailConfirmationDialog.js257export function showEmailConfirmationDialog (message) {
LOWsrc/backend/drivers/meta.ts189export function resolveDriverMethodRateLimit(
LOWsrc/backend/drivers/meta.ts291export function resolveDriverMethodConcurrent(
LOWsrc/backend/drivers/util/fileInput.ts270export function inferFilenameFromUrlOrPath(
LOWsrc/backend/drivers/subdomain/SubdomainDriver.ts810function mapEntryToSubdomainRootDir(entry: FSEntry): Record<string, unknown> {
LOWsrc/backend/core/http/middleware/rateLimit.js328export function listConfiguredRateLimitBackends() {
LOWsrc/backend/core/http/middleware/privateAppGate.ts189export async function resolveOwnedAppForHostedSite(opts: {
LOWsrc/backend/core/http/middleware/privateAppGate.ts474export async function resolvePublicHostedIdentity(opts: {
LOWsrc/backend/util/privateLaunchAccess.ts106export async function resolvePrivateLaunchAccess({
LOWsrc/backend/stores/fs/pendingUploadSessionHelpers.ts30export function toPendingUploadSessionKey(sessionId: string): string {
LOWsrc/backend/stores/fs/pendingUploadSessionHelpers.ts34export function toPendingUploadSessionExpiresAtSeconds(
LOWsrc/backend/stores/fs/pendingUploadSessionHelpers.ts95export function normalizePendingUploadSession(
LOWsrc/backend/stores/fs/pendingUploadSessionHelpers.ts133export function withPendingUploadSessionStatus(
LOWsrc/backend/controllers/fs/legacyFsHelpers.ts278function mapAppForLegacyAssociatedApp(
LOWsrc/backend/controllers/fs/legacyFsHelpers.ts470export function signingConfigFromAppConfig(config: IConfig): SigningConfig {
LOWsrc/docs/build.js114function createDirectoryRecursively (directoryPath) {
LOWsrc/docs/build.js121function removeDirectoryRecursively (directoryPath) {
LOWsrc/docs/build.js165function generateSearchTriggerHTML () {
LOWsrc/docs/build.js194function generateTableOfContentsHTML (htmlContent, title) {
LOWsrc/docs/build.js248function generatePlatformCompatibilityHTML (frontMatter) {
LOWsrc/docs/build.js701function getDescriptionFromMarkdown (sourcePath) {
LOWsrc/gui/src/UI/UIWindowRequestPermission.js22async function UIWindowRequestPermission (options) {
LOWsrc/gui/src/UI/UIWindowEmailConfirmationRequired.js23function UIWindowEmailConfirmationRequired (options) {
LOWsrc/gui/src/UI/UIWindowDesktopBGSettings.js22async function UIWindowDesktopBGSettings (options) {
LOWsrc/gui/src/UI/Settings/UIWindowConfirmUserDeletion.js23async function UIWindowConfirmUserDeletion (options) {
LOWsrc/gui/src/UI/Settings/UIWindowFinalizeUserDeletion.js23async function UIWindowFinalizeUserDeletion (options) {
Hallucination Indicators3 hits · 30 pts
SeverityFileLineSnippet
CRITICALsrc/dev-center/js/libs/jquery-3.6.0.min.js2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):f
CRITICALsrc/gui/src/lib/jquery-3.6.1/jquery-3.6.1.min.js2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):f
CRITICALsrc/gui/src/lib/jquery-ui-1.13.2/jquery-ui.min.js6!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){"use strict"
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippet
HIGHsrc/backend/controllers/puterai/PuterAIController.ts114 // Reverse-proxies AI-generated video URLs that can't be given
HIGHsrc/gui/src/lib/jquery-ui-1.13.2/jquery-ui.js8706 // Format a name, short or long as requested
Excessive Try-Catch Wrapping5 hits · 10 pts
SeverityFileLineSnippet
MEDIUMsrc/docs/src/FS.md88 puter.print('Error creating directory:', error);
MEDIUM…/docs/src/playground/examples/fs-write-from-input.html11 puter.print('Error writing file:', error);
MEDIUMsrc/docs/src/playground/examples/fs-mkdir.html10 puter.print('Error creating directory:', error);
MEDIUMsrc/docs/src/FS/mkdir.md51 puter.print('Error creating directory:', error);
MEDIUMsrc/docs/src/FS/write.md76 puter.print('Error writing file:', error);
Cross-Language Confusion (JS/TS)1 hit · 5 pts
SeverityFileLineSnippet
HIGHsrc/puter-js/types/puter.d.ts83 print(text: string, options?: { code?: boolean; escapeHTML?: boolean }): void;
Fake / Example Data5 hits · 5 pts
SeverityFileLineSnippet
LOWsrc/backend/drivers/kv/KVStoreDriver.test.ts37 email: 'test@test.com',
LOWsrc/backend/drivers/workers/WorkerDriver.test.ts37 email: 'test@test.com',
LOWsrc/docs/src/UI/prompt.md34 puter.ui.prompt('Please enter your name:', 'John Doe').then((resp) => {
LOWsrc/docs/src/playground/examples/ui-prompt.html5 puter.ui.prompt('Please enter your name:', 'John Doe').then((resp) => {
LOWsrc/docs/src/playground/examples/workers-exec.html187 profile: { name: 'John Doe', email: 'john@example.com' },
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWinstall.sh4# Usage: