Skip to content

Log missing static files at debug instead of info#37

Merged
PeterRounce merged 1 commit into
mainfrom
claude/quiet-static-404-logs
Jun 16, 2026
Merged

Log missing static files at debug instead of info#37
PeterRounce merged 1 commit into
mainfrom
claude/quiet-static-404-logs

Conversation

@PeterRounce

Copy link
Copy Markdown
Member

What

RenderStaticContent logged every failed os.Open at INFO (render.go:82). These are almost entirely vulnerability scanners probing for .env, .git/config, js/sendgrid.js and similar — normal 404s for files the hub doesn't ship.

Recent live examples:

open /web-content/public/.git/config: no such file or directory
open /web-content/public/js/sendgrid.js: no such file or directory
open /web-content/public/.env: no such file or directory

Why

At INFO they bury real operational events (websocket connects, payment flow) and crowd out the About-page log viewer, which only shows the last 20 lines (/admin/api/about/logs). They carry no actionable per-line security signal — every public host gets this background radiation, and the probes find nothing because secrets live in the DB / phoenix config, not under /web-content/public/.

Change

Downgrade the missing-file log to debug. Still available on demand by setting log_level to debug; just out of the default INFO stream.

Scope kept surgical — left suffix not recognised (fires only after a file opens successfully) and template not found (internal template logic) at INFO, since neither is 404 probe noise.

Version bumped 0.20.0 → 0.20.1 (PATCH, maintenance).

🤖 Generated with Claude Code

RenderStaticContent logged every failed os.Open at INFO level. In
practice these are almost entirely vulnerability scanners probing for
.env, .git/config, js/sendgrid.js and similar — normal 404s for files
the hub doesn't ship. Logging them at INFO buried real operational
events and crowded the About-page log viewer (last 20 lines).

Downgrade to debug so the noise is still available on demand (flip
log_level to debug) without polluting the default INFO stream.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PeterRounce PeterRounce merged commit cb45b04 into main Jun 16, 2026
7 checks passed
@PeterRounce PeterRounce deleted the claude/quiet-static-404-logs branch June 16, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant