
Security News
Node.js Considers Public Workflow for Security Reports Amid AI-Driven Surge
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.
process-ancestry
Advanced tools
Cross-platform Node.js library for retrieving process ancestry information on Unix/Linux, macOS, and Windows
A cross-platform Node.js library for retrieving process ancestry information. Get the parent process chain for any process ID on Unix/Linux, macOS, and Windows systems.
ps) and Windows (using wmic)npm install process-ancestry
import { getProcessAncestry } from "process-ancestry";
// Get ancestry for current process
const ancestry = getProcessAncestry();
console.log(ancestry);
// Get ancestry for specific PID
const ancestry = getProcessAncestry(1234);
console.log(ancestry);
[
{
pid: 1234,
ppid: 5678,
command: "node script.js",
},
{
pid: 5678,
ppid: 1,
command: "bash",
},
];
getProcessAncestry(pid?: number): ProcessInfo[]Retrieves the process ancestry chain for a given process ID.
pid (optional): Process ID to get ancestry for. Defaults to process.pid (current process).An array of ProcessInfo objects representing the process ancestry chain, ordered from the given process up to the root.
Error: If pid is not a positive integerProcessInfointerface ProcessInfo {
/** Process ID */
pid: number;
/** Parent Process ID */
ppid: number;
/** Command line or executable name */
command?: string;
}
ps -p <pid> -o pid=,ppid=,command=wmic process where (ProcessId=<pid>) get ProcessId,ParentProcessId,CommandLine /format:csv# Install dependencies
pnpm install
# Run tests
pnpm test
# Build
pnpm build
# Run checks
pnpm check
MIT
Matt Kane
FAQs
Cross-platform Node.js library for retrieving process ancestry information on Unix/Linux, macOS, and Windows
The npm package process-ancestry receives a total of 358,505 weekly downloads. As such, process-ancestry popularity was classified as popular.
We found that process-ancestry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.