Repository navigation
Releases
v0.6.0 — Goodnight Check
Goodnight Check v0.6.0
v0.6.0 is the second stable release of Goodnight Check and the first built end to end by the release workflow: the images ship with checksums, per-platform SBOMs and a provenance attestation users can verify. Because v0.6.0 carries no pre-release suffix, it is published as 0.6.0, 0.6, latest and sha-<short> on ghcr.io. Upgrades in place from v0.5.0.
What changed
- Breaking:
GET /api/scansanswers a pagination envelope{items, total, limit, offset}(newest first) with a name search (q) and start-time filters (started_from,started_to), instead of the bare array ofv0.5.0(gn-check#372). - The Scans page: search by name, filter by start time and page through results; filter and page state live in the URL.
- Malformed
{id}path parameters and malformed paging or timestamp parameters answer400instead of500or being ignored (gn-check#356). - Notification mails rebuilt for Outlook classic: inline images and light/dark theme variants (gn-check#377).
- The scanner binary reports its version; the images carry SPDX license labels (gn-check#363).
- The Compose file pins every container image by digest; Postgres stays on major 16 (gn-check#375, gn-check#370).
- Scanner and backend use plain TCP sockets even on hosts with MPTCP enabled (gn-check#374).
- New admin guides: single sign-on with Keycloak (gn-check#383) and with Okta (gn-check#384).
Security fixes
golang.org/x/net0.62.0 in the backend fixes CVE-2026-78661 (GHSA-75pg-wvh3-34jr); indirect via minio-go (gn-check#382).go-jose/v44.1.6 fixes CVE-2026-116587 (GHSA-mgcc-cww5-fp2q, high; JWK parsing now caps the RSA modulus at 4096 bits), CVE-2026-116586 (GHSA-vvm8-gf78-28g4) and CVE-2026-116585 (GHSA-4w3g-jfj2-cw2q) (gn-check#360).pgx/v55.13.0 fixes GHSA-w9rp-vfrh-q8vv, a panic on a malformed server response (gn-check#387).
What users notice
- API clients that read
GET /api/scansbreak until they handle the envelope — update them before or with the upgrade (step 1 below). - Everything else keeps working: sessions, service-account tokens, exports, stored data and settings survive the upgrade; no configuration change is needed for standard deployments.
How to upgrade
- Update API clients for the new
GET /api/scansenvelope. - Docker Compose from the repository:
git pull, thendocker compose up -d(the Compose file pins every image by digest), or point both services atgn-check-backend:0.6.0andgn-check-scanner:0.6.0. Upgrade backend and scanner together; keep the database, the bucket and the environment as they are. No migration runs; Postgres stays on major 16. - Development stacks: Keycloak, backend, Postgres and Garage now bind to
127.0.0.1. The scanner's port8081stays reachable from scanner hosts — restrict it on a host you do not trust (gn-check#371).
Known limitations
- The scanner image bundles Nuclei 3.11.1 and naabu 2.7.0, the newest upstream releases; image scanners report findings in them without an upstream fix: 27 high in Nuclei (Go standard library and bundled libraries) and 2 high in naabu (CVE-2026-78661 and CVE-2026-78669, in
golang.org/x/net). Handled under SVT-15; full detail in the image check: #482. - The backend image scans clean: 0 high or critical findings.
v0.5.0 — Goodnight Check
Goodnight Check v0.5.0
Goodnight Check is the new name of NSC. v0.5.0 is the first release under the new name and the first without -beta. Every v0.4.x-beta installation upgrades to it in place, with no migration script.
What changed
The new name
- The product is now Goodnight Check, or Check for short. The app, the notification mails, the exports and the documentation use the new name.
- The repository is now goodnightsec/gn-check. GitHub redirects the old URL, but clones should update their remote:
git remote set-url origin https://github.com/goodnightsec/gn-check.git. - The product page is now www.goodnightsec.com/check/. The old host redirects there.
- The images are now
ghcr.io/goodnightsec/gn-check-backendandghcr.io/goodnightsec/gn-check-scanner. Becausev0.5.0has no pre-release suffix, it is published as0.5.0,0.5,latestandsha-<short>. - The sample OIDC client in
.env.exampleand the development Keycloak realm is nowgn-check-backend, and the realm's display name is "Goodnight Check". Installations that configure their own Keycloak or OIDC client keep their client. For the bundled development Compose stack, see step 5 under How to upgrade. - Some identifiers keep the old short name
nscon purpose, because renaming them would break installations, clients or stored data: the/var/lib/nscdata directory, the Keycloak realmnsc, the*.nsc-bundle.*file names, thensc_token prefix, the session cookies, theX-NSC-Export-*headers, the export fields and the browser storage keys. The default bucket staysnuclei-raw. Nothing in an installation needs renaming. - Supported versions:
v0.5.0and newer (SECURITY.md). The beta versions get no more security fixes.
Admins can switch the upstream template source
- Admins can change the repository and ref that the template catalog is synced from, under Templates → Sync → Change source: the Stable channel (
latest, the highest stable release tag), Preview (themainbranch), or a custom ref (a tag, branch or commit). Anotherhttps://repository, such as a private mirror, works too. Credentials in the repository URL are stored but never shown. - Before saving, a dry run shows how many templates would be added, changed, restored and removed, which template sets would lose members, and the scan policies and schedules that use those sets.
- Saving checks the candidate against the fetched repository first. It refuses an unreachable repository, an unknown ref, or a catalog whose template IDs would shadow a custom template. Then it starts a sync right away.
- Switching keeps template IDs, set memberships, exclusions and history. A template that returns upstream is restored. An empty repository disables upstream sync. Custom templates and the distribution to scanner nodes keep working.
- The source is stored in the database (migration
0006).TEMPLATE_SYNC_REPOandTEMPLATE_SYNC_REFonly seed it once, at the first start. After that the stored value wins, and a different environment value only logs a note. Settings → Environment configuration marks both variables as seed-only.TEMPLATE_SYNC_INTERVALandTEMPLATE_SYNC_DIRstay environment settings. See Configuration. - The sync history shows the source each run read, how many templates it restored, and where the source was switched.
- Templates that the current source no longer serves are marked unavailable in the template details and the set editor. Template sets show how many of their members are unavailable. Scans that use such a set are refused until those templates return or the selection is updated.
- API: new admin endpoints
PUT /api/templates/sync/configandPOST /api/templates/sync/preview, both audited. There are new fields onGET /api/templates/sync, on the sync runs and on template sets (unavailable_members). See the API reference.
Other changes
- If a page fails to render, the app shows an error panel for that page instead of failing as a whole. Navigating to another page clears it.
- Dependency updates, among them go-git, minio-go and go-mail. As hardening, go-git 5.19.3 keeps credentials from being sent to another host on a redirect and redacts passwords in URLs from error messages.
- SECURITY.md adds
security@goodnightsec.comas a second way to report a vulnerability privately and states the response times. Code of conduct reports go toinfo@goodnightsec.com. - Contributions are accepted under AGPL-3.0-or-later and need a DCO sign-off on every commit (Contributing).
What users notice
- The look. The app header shows the Goodnight Check lockup. The login screen and the mobile navigation show the GoodnightSec mark, which is also the new favicon. The page title, the login screen and Settings say Goodnight Check.
- Notification mails. The header bar shows the Goodnight Check lockup as an inline image, with "Goodnight Check" as alt text. The mail still loads nothing from the network. The subject now starts with
[Goodnight Check]instead of[NSC], so update any mail filters that match the old prefix. - Scan bundles. New exports carry the format marker
goodnightsec/gn-check/scan-bundle. Bundles exported from av0.4.x-betarelease still import. - What keeps working. Sessions, service-account tokens, export clients and UI settings keep working after the upgrade.
How to upgrade
From v0.4.x-beta, in place, as described in Upgrading from NSC:
- Point both services at the new images,
ghcr.io/goodnightsec/gn-check-backend:0.5.0andghcr.io/goodnightsec/gn-check-scanner:0.5.0. - Upgrade the backend and the scanner together.
- Keep the database, the bucket and the environment as they are. At its first start, the backend applies migration
0006and seeds the template source fromTEMPLATE_SYNC_REPOandTEMPLATE_SYNC_REF. After that, change the source under Templates → Sync, not in the environment. - With the Docker Compose stack from this repository, keep your Compose project name. The project is now named
gn-check, and Compose names volumes after the project. Without this step, Postgres, Garage and the template cache start with new, empty volumes.docker volume lsshows your current name as the prefix of<name>_pgdata. Before upgrading, setCOMPOSE_PROJECT_NAME=<name>in.env, which every later command picks up.docker compose -p <name>works too, but only if you pass it on every command. Alternatively, with the stack down, copy each volume (pgdata,garagemeta,garagedata,templatecache) into its newgn-check_*volume, for exampledocker run --rm -v <name>_pgdata:/from -v gn-check_pgdata:/to alpine cp -a /from/. /to/. See Deployment. - With the bundled development Compose stack, recreate Keycloak:
docker compose up -d --force-recreate keycloak. The backend there now uses the clientgn-check-backend, and the existing Keycloak container still holds the old client. Recreating it re-imports the development realm with the clientgn-check-backend, demo users included; other changes made in that development Keycloak are reset. Installations that configure their own Keycloak or OIDC client keep their client and need no change. - Update the remote of your clones to
https://github.com/goodnightsec/gn-check.git.
On a deployment with a read-only root file system, keep the system temp directory (/tmp) writable. A dry run against a different template repository clones that repository there.
After v0.5.0 has migrated the database, a v0.4.x-beta backend refuses to start on it, as with any database migrated by a newer release.
Known limitations
- Databases from the alpha versions (before
v0.4.0-beta) still can't be upgraded, as sincev0.4.0-beta. The upgrade path is fromv0.4.x-beta.v0.5.0still refuses to start on an alpha database, but it no longer has a message of its own for one: it reports unsupported migration versions. - A
v0.4.x-betarelease can't import a scan bundle exported byv0.5.0, because it doesn't know the new format marker. - Templates on the Preview channel may need a newer Nuclei engine than the one pinned in the scanner image.
- Switching to a different repository replaces the backend's clone cache, so the first sync after the switch does a full clone again.
- The scanner image bundles Nuclei 3.11.1 and naabu 2.6.1, the newest upstream releases;
v0.4.7-betashipped the same versions. Image scanners such as Trivy report known vulnerabilities in them whose fixes are not yet in a Nuclei or naabu release:- naabu, built with Go 1.24.0: one critical, CVE-2025-68121 in the Go standard library, and 45 high, in the Go standard library and in
golang.org/x/crypto,golang.org/x/net,golang.org/x/textandgithub.com/klauspost/compress. - Nuclei, built with Go 1.26.5: 25 high, in the Go standard library and in
github.com/getkin/kin-openapi,github.com/go-git/go-git/v5,google.golang.org/grpc,golang.org/x/crypto,golang.org/x/net,golang.org/x/modandgolang.org/x/text.
- naabu, built with Go 1.24.0: one critical, CVE-2025-68121 in the Go standard library, and 45 high, in the Go standard library and in
Security fixes
- golang.org/x/crypto 0.57.0 fixes CVE-2026-56855 and CVE-2026-78662, a denial of service in the SSH client. Check was affected only when
TEMPLATE_SYNC_REPOused an `...
v0.4.7-beta — UI style guide and redesigned notification mails
Patch release on v0.4.6-beta. No schema changes — no new migrations.
Highlights
- A written UI style guide, and every screen moved onto shared primitives. New
docs/UI_STYLE_GUIDE.mddefines color roles, the type scale, spacing, page anatomy and rules for buttons, tables, row actions, forms, dialogs, confirmations and feedback. Pages now compose the shared components inweb/src/components/ui.tsx(Page/PageHeader,Table,RowActions,Alert,Badge,useConfirm, …), so buttons, headers, tables and messages look and behave the same everywhere (#339). - Redesigned scan notification mails. The digest and failed-scan mails are now embedded HTML templates styled to match the web app: brand header with the Nuclei logo (carried inline as a CID attachment), the app's system UI font stack, severity-colored counts table, status/severity chips and a clear "Open scan" button. Plain-text alternatives are unchanged (#340).
- Dependency updates. npm minor/patch bumps for
@tanstack/react-query,lucide-reactandvite(#341).
Merged
- #339 Add a UI style guide and align the web app with it
- #340 Design the scan notification mails: embedded HTML templates per the UI style guide
- #341 chore(deps): bump the npm-minor-patch group in /web
Full changelog: v0.4.6-beta...v0.4.7-beta
v0.4.6-beta — scan email notifications, schedule timezones, and admin environment view
Patch release on v0.4.5-beta. Adds migrations 0004_schedule_timezone.sql and 0005_scan_notification_outbox.sql, applied automatically at startup. Alpha databases remain rejected (they are not upgradeable).
Highlights
- Scan notification mail, opt-in per policy. A completed scan can email only its deltas — New / Changed (resurfaced) / Fixed, counted by effective severity, with links back to the scan and each finding — and failed or orphaned scans get a failure alert. Mail is off by default and switched on per scan policy (
notify_enabled), which can also set its own recipients and a minimum severity (e.g.lowdropsinfofrom counts and the list;unknownis kept). Without policy recipients, mail falls back to the deploymentSMTP_TOadmin mailbox.SMTP_HOST+SMTP_FROMenable sending;SMTP_PASSWORD_FILEis re-read before each send. An at-most-once outbox row is claimed before SMTP so a restart never resends; send failures are logged and never change a scan's terminal state (#321, #335, #328). - Schedules choose their own timezone. A schedule now stores an IANA timezone (default
UTC) alongside its cron expression, so0 3 * * *means 03:00 in that zone, including DST. Existing schedules keep UTC, and legacyTZ=/CRON_TZ=prefixes are migrated into the new column and stripped (#329, #332). - Settings → Environment configuration. Admins get a read-only view of the running backend's effective environment: every allowlisted variable with set/unset, the parsed value it actually consumes (booleans, durations, a credential-free
DATABASE_URL), and the built-in default. Secrets never leave the backend,SCAN_ZONESreports a seed-node count only, and each row carries the same description as the configuration docs — enforced by a drift test (#336, #337). - The findings list remembers your filters and sort. Filter and sort state persists per browser (#333).
- Template sync history collapses no-change runs. Repeated "no changes" sync results are summarized instead of filling the history (#334).
Merged
- #328 Email scan result changes and failures, opt-in per policy
- #332 Schedules: select an IANA timezone for cron
- #333 Persist findings filter and sort in localStorage
- #334 Summarize no-change template catalog syncs
- #337 Admin settings: show effective environment configuration
Full changelog: v0.4.5-beta...v0.4.6-beta
v0.4.5-beta — findings triage: result identity, richer filters, occurrence history
Patch release on v0.4.4-beta. Adds migration 0003_finding_result_identity.sql, applied automatically at startup; existing rows are backfilled from the preserved raw findings. Alpha databases remain rejected (they are not upgradeable).
Highlights
- The findings list now identifies each result.
GET /api/findingsalready returnedmatched_at,type,tagsandtarget_ids; the table now renders an Endpoint column by default (host + path, protocol pill) sohttps://host/adminandhttps://host/apiare distinguishable at a glance instead of collapsing into one host. Target, Tags, CVE, First seen, Matched at and Result identity are available from the Columns menu, which persists per browser. Columns resize from the header (keyboard-operable separators, double-click resets one, and the last visible column absorbs leftover width), andmatched_at/typeare filterable in both the structured filter and the legacy flat params (#313, #322). - Result identity is stored, not just inside the raw JSON. Nuclei's
matcher-name,extractor-nameandextracted-resultsbecome real columns onfindingsandfinding_lifecycle(migration 0003), written at ingest and backfilled for existing rows fromfindings.raw. Two lifecycle findings that share a template andmatched_atno longer render identically: the identity appears as a compact line under the name, with an opt-in Result identity column when you want to sort it or widen it to read a long value.matcherandextracted_resultare filterable, JSON/CSV/SARIF exports carry the fields, and the hashed dedup identity is unchanged (#315, #324). - The filter engine can ask real triage questions. Date ranges (
before/after/between, inclusive, date-only values accepted) on first- and last-seen;not_contains/is_empty/is_not_emptyfor name; server-sidesort+orderover an allowlisted field set with stable paging. The list and the export share one parser, so a download matches what is on screen (#311, #325). - Triage overlay state is queryable. Filter on
recast_severity(including recast vs never recast),observed_severityindependently of a recast,accept_expires_atranges,times_mitigated,occurrence_countandauto_mitigation_eligible. Accepted rows show their expiry in the list, and an Expiring acceptances quick filter returns accepted findings whose expiry falls in the next seven days — the ones that reopen silently otherwise (#312, #326). - Finding detail lists the retained occurrences. New
GET /api/findings/{id}/occurrences(viewer role, paginatedlimit/offset, newest first,404for an unknown finding) backs a section on the finding page with links to each occurrence, its scan and its target, plus a one-click jump to the latest. A finding that still exists always has at least one occurrence: deleting a scan drops its occurrences andoccurrence_counttogether, and deleting every scan that observed a finding deletes the lifecycle row, so the list never implies history it cannot show (#314, #327).
Fixes
- Long extracted results wrap instead of overflowing their container on the occurrence and finding detail pages (#317).
Development environment
- The local S3 stand-in is Garage (
dxflrs/garage) rather than MinIO, which no longer publishes an anonymously pullable image. Compose, the deployment docs and the troubleshooting guide were updated; the backend'sObjectStoreand its environment configuration are unchanged, and any S3-compatible endpoint still works (#320).
Maintenance
- Frontend dependency bump (npm minor/patch group) via dependabot (#323).
Merged
- #317 fix(ui): wrap long extracted results on occurrence and finding detail pages
- #318 Show the running backend version in the account menu
- #320 Replace local MinIO with Garage for raw-output archival
- #322 Show matched URL, type, tags, and target on the findings list
- #323 chore(deps): bump the npm-minor-patch group in /web with 2 updates
- #324 Surface Nuclei matcher and extracted results on findings
- #325 Findings filters: date ranges, name negation, and sorting
- #326 Findings filters: triage overlay state
- #327 List retained occurrences on finding detail
Full changelog: v0.4.4-beta...v0.4.5-beta
v0.4.4-beta — OIDC host canonicalization, light/dark theme, and operator UI fixes
Patch release on v0.4.3-beta. No schema changes.
Highlights
127.0.0.1no longer breaks login.GET /api/auth/loginand SPA document requests whose cookie host (hostname + non-default port) does not matchAPP_BASE_URLare302'd to the same path on the configured origin before an auth-state cookie is minted, so a127.0.0.1visit cannot start a flow whose callback and host-locked cookies live onlocalhost— the "invalid or expired login state" failure (#298, #308). Scheme is ignored in the comparison, so a TLS-terminating ingress that presents the publicHostover plaintext cannot 302-loop. Redirect destinations are always derived fromAPP_BASE_URL, never fromHost, so a spoofed host is not an open redirect; a missing or malformedAPP_BASE_URLfails closed./healthzand other/api/*routes are not redirected, so probes and service-account callers may still use an IP.- Light/dark theme toggle in the header. Flips the
darkclass on<html>— now a class-based Tailwind variant — persists per browser, and follows the OS preference until the first toggle. Applied before first paint so the initial render does not flash the wrong theme,color-schemefollows so browser chrome matches, and astoragelistener keeps multiple open tabs in sync (#292, #293). - Scanner Nodes table fits 1280×800. Health and Discovery collapse into one Status column, tags and CIDRs move under Name/Scope, the nuclei version and last-seen fold into the catalog cell, and the action column is pinned with a scroll shadow — Edit / Sync / Delete stay on screen without horizontal scrolling (#299, #307).
Fixes
- Target Save requires Name and Hosts. Both fields are marked required (visible
*,aria-required) and Save stays disabled until they have values, matching backend validation and the node-create form (#300, #306). - Custom Templates empty state. The catalog table's filter-oriented copy ("No templates match these filters") is replaced with "No custom templates yet." on the Custom Templates tab, which has no filters (#301, #305).
Development environment
- Cloud Agent (Cursor) environment.
.cursor/environment.jsonplusinstall/start/dockerd/logsscripts bring up the docker-compose stack so cloud agents can verify PRs against the real stack..cursor/is deliberately not gitignored so that environment stays shared (#302). - Local AI-agent state is ignored.
.claude,.commandcode,.codex,.gemini,.qwen,.opencode,.crush,.continue,.windsurf,.roo,.kilocode,.junie,.specstory,.aider*can no longer be committed by accident; shared instructions stay inAGENTS.md(#303).CLAUDE.mdis now a one-line@AGENTS.mdimport rather than a symlink, so Cursor does not ingest a second copy (#291). - Compose MinIO image moved to Quay (
quay.io/minio/minio) — MinIO no longer publishes an anonymously pullable Docker Hub image, sodocker compose upwould have failed against Docker Hub. - Docs refreshed for the above:
API.md,ARCHITECTURE.md,DEVELOPMENT.md,README.md,CONTRIBUTING.md, and the admin guide (Authentication / Configuration / Deployment / Troubleshooting).
Maintenance
- Go toolchain → 1.26;
coreos/go-oidc/v33.21.0,jackc/pgx/v55.11.0,golang.org/x/oauth20.37.0,golang.org/x/time0.16.0. - Frontend: React / React DOM 19.3, Vite 8.3,
@tanstack/react-query5.103.1,lucide-react1.46,react-router-dom7.18.4,@vitejs/plugin-react6.1.1.
Merged
- #291 docs: load agent instructions once via CLAUDE.md
@AGENTS.md - #293 Add header light/dark theme toggle (#292)
- #294 chore(deps): bump
github.com/coreos/go-oidc/v3to 3.21.0 - #295 chore(deps): bump the npm-minor-patch group in /web with 4 updates
- #296 chore(deps): bump the go-minor-patch group
- #297 chore(deps): bump the npm-minor-patch group in /web with 5 updates
- #302 Add Cloud Agent development environment (Docker Compose stack)
- #303 chore(gitignore): ignore local AI agent state, keep
.cursortracked - #305 fix(ui): show a true empty state on Custom Templates (#301)
- #306 fix(ui): require Name and Hosts before saving a target (#300)
- #307 fix(ui): keep scanner-node row actions visible at 1280×800 (#299)
- #308 Redirect 127.0.0.1 onto APP_BASE_URL before OIDC login (#298)
- #309 chore(deps): bump the npm-minor-patch group in /web with 4 updates
Full changelog: v0.4.3-beta...v0.4.4-beta
v0.4.3-beta — Nuclei 3.11.1, operator UI fixes, and public-launch docs
Patch release on v0.4.2-beta. No schema changes.
Highlights
- Nuclei 3.11.1. Scanner image pin (
deploy/Dockerfile.scanner) so new scans run the current upstream binary. - Template-set Duplicate copies membership. Duplicating an exact or exclude set no longer saved an empty set (#277).
- Nodes page shows effective naabu scan type.
GET /v1/capabilitiesreports the node's normalizedNAABU_SCAN_TYPE(SYN default, connect fallback); the nodes table surfaces SYN / Connect / unknown without shelling in. A scan policy'sdiscovery_scan_typecan still override (#271). - Scan-policies table layout. Execution knobs (rate, concurrency, timeout, max-host-error, resp read/save) collapse into one summary column so the row fits at 1280px without clipping Delete (#276).
Public launch
- Canonical AGPL-3.0
LICENSE(GitHub now detects AGPL-3.0),CONTRIBUTING.md, Contributor Covenant 2.1, PR and bug-report templates. - GHCR backend/scanner images are public; admin docs cover pull coordinates and Compose wiring. Prerelease tags publish version +
sha-*only (nolatest). - Administration guide (
docs/admin/) is published to the GitHub wiki onmainandv*tags.
Maintenance
- Frontend minor/patch bumps:
@tanstack/react-query,lucide-react, Vite,@vitejs/plugin-react.
Merged
- #278 chore(scanner): upgrade pinned nuclei to v3.11.1
- #279 fix(template-sets): copy members and exclusions when duplicating a set (#277)
- #280 feat(nodes): surface effective naabu scan type on nodes page (#271)
- #281 fix(scan-policies): collapse execution knobs into summary column (#276)
- #284 chore: public-launch prep (license, fixtures, community files)
- #285 docs(release): correct stale comment — GHCR images are public
- #287 docs: publish pull instructions for the public GHCR images
- #288 docs(admin): publish administration guide to the GitHub wiki
- #289 fix(wiki): authenticate wiki checkout like the main repo
- #290 chore(deps): bump the npm-minor-patch group in /web with 5 updates
Full changelog: v0.4.2-beta...v0.4.3-beta
v0.4.2-beta — Bound nuclei response sizes and auto-tune GOMEMLIMIT to prevent OOM
Fixes the scanner OOM-killed at the container 2 GiB cap reported in #274.
Problem
During a scan of ~106 endpoints the nuclei process was killed twice by the kernel OOM killer (CONSTRAINT_MEMCG) after reaching the container's 2 GiB limit. Heap climbed from baseline to ~2 GiB within ~5 s — dozens of simultaneous connections to a single CDN edge with 1.5–4.7 MiB unread Recv-Q each, plus Go heap anon-rss:2 GiB. Model: heap ≈ 1–1.5 × concurrency × response-size-read (nuclei default 10 MiB) stacked with cgroup-accounted TCP buffers.
Fix (#275)
Two complementary, deployment-independent fixes:
-
Per-response caps as scan-policy knobs —
scan_policies.response_size_read/_save(nullable,>0,CHECK) via forward migration0002_add_scan_policy_response_limits.sql(post-beta freeze,0001_init.sqluntouched). Plumbedtypes.ScanOptions→store.ScanPolicy→validateScanPolicy/overlayScanPolicy→runner.buildArgs(-response-size-read/-save, omitted ⇒ nuclei default 10 MiB/1 MiB) → bundle snapshot → SPA (modal/table, placeholders10485760/1048576). Loweringreadtoward 1 MiB linearly shrinks worst-case heap. -
Automatic
GOMEMLIMITon the scanner node —internal/scanner/memlimit.goreads cgroup limit from/sys/fs/cgroup/memory.max(v2) thenmemory/memory.limit_in_bytes(v1) (treatingmax/>1 PiB/sentinel9223372036854771712as unlimited), derivesGOMEMLIMIT ≈75%of cap (truncated to MiB, floored at 64 MiB, documented assumption for non-tiny cgroups), leaves 25% for kernel TCP buffers/RSS slack. ExplicitGOMEMLIMITwins (runtime already honored at startup). Applied viaGOMEMLIMITenv (inherited bynuclei/naabu) anddebug.SetMemoryLimitso GC pressure replaces kills.
Tests: TestBuildArgsResponseSize, TestOverlayScanPolicy (response sizes), TestValidateScanPolicy, TestParseGOMEMLIMIT (TiB/MiB/GiB/KiB/B, case-insensitive), TestParseCgroupLimitValue, TestGomemlimitFromCgroup (floor/truncation).
Operational notes
- Existing
GOMEMLIMIT=1500MiBworkaround still honored (explicit wins). - Existing policies get nuclei defaults until edited; set
response_size_readto1048576(1 MiB) to bound CDN streaming. - No
tcp_rmemchange; headroom is inGOMEMLIMIT.
Merged
Full changelog: v0.4.1-beta...v0.4.2-beta
v0.4.1-beta — Fix scanner image HOME for cap_drop ALL
Fixes the scanner startup failure under least-privilege hardening (cap_drop: ALL) reported in #272.
Fix
- Scanner image (
deploy/Dockerfile.scanner): hardened/rootto0550but leftENV HOME=/root. WithCAP_DAC_OVERRIDEdropped,nuclei’smkdir $HOME/.configfailed withEACCES(mkdir /root/.config: permission denied) and every scan failed closed. Now bakes a dedicated privateHOMEat/home/scanner(mkdir -p /home/scanner && chmod 0700,ENV HOME=/home/scanner) fornuclei/naabu/uncoverconfig+cache ($HOME/.config,$HOME/.cache,$HOME/nuclei-templates). Avoids the world-writable/tmp(1777) symlink/pre-creation surface thatHOME=/tmpwould have kept. A future move to a non-rootUSERwill need a matchingchown(e.g.chown 1001:0 /home/scanner).
Operational notes
cap_drop: ALLis often paired withread_only: true. With a read-only root filesystem the scanner now needs writable scratch at both/home/scanner(imageHOME) and/tmp(SCANNER_WORK_DIRdefaults to a private0700dir underos.TempDir()//tmp). Mount writableemptyDir/tmpfs volumes at both paths (as withEXPORT_SPOOL_DIR/TEMPLATE_SYNC_DIRfor the backend). Documented indocs/ADMIN_GUIDE.md:103andSCANNER_WORK_DIR.
Verification
- Before:
docker run --cap-drop ALL ghcr.io/...:0.4.0-beta nuclei -tl→mkdir /root/.config: permission denied - After:
docker run --cap-drop ALL ghcr.io/...:0.4.1-beta nuclei -tl→Successfully installed nuclei-templates at /home/scanner/nuclei-templates ls -ld /home/scanner→drwx------(0700, root-owned),/rootstaysdr-xr-x---, scanner/v1/capabilitieshealthy undercap_drop ALL;--read-only --tmpfs /tmp --tmpfs /home/scannerstarts clean.
Merged
Full changelog: v0.4.0-beta...v0.4.1-beta
v0.4.0-beta — First beta: security-hardening pass, template-set modes, scan bundles
The first beta release. Nuclei Security Center graduates from alpha after a comprehensive external security review — the bulk of this release is a security-hardening pass across auth, sessions, scanner I/O, and resource bounds — plus new template-set modes, versioned scan bundles, a mobile-friendly SPA, and a frozen migration baseline that makes future schema changes forward-migratable.
Highlights
- Security-hardening pass (external review). A full external security review of the codebase drove a wide set of fixes: host-locked and CSRF-protected OIDC login and session cookies, bounded session TTL with an admin revocation path, per-subject live-session caps and paginated admin sessions, audited failed-authentication and OIDC-callback 401s, RP-initiated IdP logout that fails closed when server-side revocation fails, blocked scanner-client redirects, bounded scanner responses / stderr / JSONL records, bounded findings queries and exports, bounded scan-bundle and auth-flow creation, escaped
LIKEmetacharacters in filters, clickjacking/MIME security headers, aservice_accounts.roleCHECK constraint, rejected mTLS-on-HTTP misconfiguration, andS3_USE_SSLnow defaulting to true (fail closed). - Explicit template-set modes. Template sets are now
exact,all, orexclude, resolved at dispatch, replacing the retired POC filter columns. - Versioned scan bundles. Complete scans export and import as versioned bundles (JSON or zip), with streamed decoding bounded to a fixed heap and imported coverage as an explicit opt-in.
- Host discovery independent of scan type. Naabu host discovery is decoupled from SYN/connect selection, and executed nuclei/naabu commands are now captured in the scan execution log.
- Mobile-friendly SPA. The React interface is usable on small/mobile viewports, with a sidebar that stays visible while scrolling.
- Reliability. Reliable scan cancellation (#217), scanner work-dir/job reclamation after completion, ascending-order lifecycle locking to avoid deadlocks across concurrent scan deletions, and overflow-safe retention windows.
Beta readiness — migration baseline frozen
- The alpha migration chain is squashed into a single consolidated baseline (
0001_init.sql), now frozen as of this release. From beta onward, each schema change ships as a new numbered forward migration that applies on an existing database; applied migrations are immutable and checksum-verified at startup. - Alpha databases are not upgradeable to beta. Deploy beta against an empty Postgres database and move portable data with template/template-set exports and scan bundles; the backend rejects an unsupported migration history at startup instead of attempting a partial upgrade.
Upgrade notes
- Start from an empty PostgreSQL database. There is no in-place upgrade path from any alpha.
S3_USE_SSLnow defaults totrue. Set it explicitly tofalseonly for a plaintext dev endpoint.
Maintenance
- Dependency updates across Go modules, frontend npm packages, the Go toolchain (1.27), and base images.
Full changelog: v0.3.0-alpha...v0.4.0-beta