Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

shutgrace

Latest version: v1.0.2

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: tamas.kamaras
1 Versions
29 Downloads

Scan summary

shutgrace was last scanned on 29 Nov 2026 at version 1.0.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 29 Nov 2026.
  • Findings: No rules fired in version 1.0.2.
  • Downloads: 29 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.2 LATEST 29 Nov 2026 No rules fired

No rules fired in 1.0.2

Findings

Findings for v1.0.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

shutgrace

Graceful shutdown of Node.js servers with SQL database

The shutgrace package helps you gracefully shut down a Node.js server that connects to a SQL database.

Setup

Install the package:

npm install shutgrace
Usage
import express from 'express';
import gracefulShutdown from 'shutgrace';
import pinoLogger from 'lib/logger.js';
import { AppDataSource } from 'config/appDataSource.js'; // example TypeORM data source; optional

const app = express()
const port = 3000

AppDataSource.initialize()

app.get('/', (req, res) => {
  res.send('Hello World!')
})

const server = app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})

process.on('SIGINT', () => gracefulShutdown('SIGINT', server, { dataSource: AppDataSource, logger: pinoLogger }));
process.on('SIGTERM', () => gracefulShutdown('SIGTERM', server, { dataSource: AppDataSource, logger: pinoLogger }));
What happens on shutdown
  1. The server stops accepting connections. Requests already being handled are left to finish, and connections are closed as they become idle.
  2. Connections still open after timeout milliseconds are closed forcibly.
  3. The data source is destroyed, so the requests of step 1 can still use it. It gets timeout milliseconds as well.
  4. The process exits: with code 0, or with code 1 if a step failed.

gracefulShutdown ends the process itself, so code placed after it does not run. A signal that arrives while a shutdown is under way does not start a second one.

Optional arguments
  • "dataSource": needs to respond to destroy() (ex. AppDataSource).
  • "logger": needs to respond to error({ err }, message) (ex. Pino). Without it, errors go to console.error.
  • "timeout": milliseconds given to open connections, and then to the data source, to close. Defaults to 2000.
Output

Progress is written to stdout. On a terminal the steps overwrite one line; without one (service manager, container, pipe) each step is written on its own line.

TypeScript Support

This package includes TypeScript type definitions. If you use TypeScript, you automatically get type-checking for the gracefulShutdown function.

License

This project is licensed under the MIT License.

Package URL

https://www.npmjs.com/package/shutgrace

Code repository

https://bitbucket.org/endeavia/shutgrace/src/master/

Author

Tamás Kamarás

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm shutgrace

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229