Skip to content

Security: iiMuhammadRashed/micro-requester

Security

.github/SECURITY.md

Security Policy

Reporting a Vulnerability

Do not open GitHub issues for security vulnerabilities.

If you discover a security vulnerability in micro-requester, please report it responsibly by emailing:

πŸ“§ iimuhammad.rashed@gmail.com

Include:

  • Type of vulnerability
  • Location in code (file, function, line)
  • Steps to reproduce
  • Potential impact
  • Suggested fix (if any)

We'll acknowledge your report within 48 hours and work with you on a fix.


Security Practices

What We Do

βœ… Keep dependencies up-to-date βœ… Run security audits (npm audit) βœ… Follow secure coding practices βœ… Respond promptly to reported vulnerabilities βœ… Document security considerations

What to Avoid

❌ Don't use micro-requester for sensitive data without TLS ❌ Don't hardcode credentials in client config ❌ Don't ignore SSL/TLS certificate errors


Dependency Security

Production Dependencies

  • undici β€” Maintained by Node.js core team, actively audited

Vulnerability Management

We monitor:

  • npm audit β€” Run on every PR and release
  • Dependabot β€” Automatic dependency updates
  • GitHub Security Alerts β€” Real-time notifications

Updates

Security updates are released immediately. Patch versions (0.x.Z) are reserved for security fixes.


Best Practices for Users

Correlation IDs

Correlation IDs help identify malicious requests:

const client = createClient({
  service: 'api',
  base: 'https://api.example.com',
  getReqId: () => requestContext.getStore()?.requestId,
});

Request Timeouts

Always set appropriate timeouts:

const client = createClient({
  service: 'api',
  base: 'https://api.example.com',
  timeoutMs: 5000,  // 5 second timeout
});

Header Sanitization

Sensitive headers are automatically sanitized in logs:

// Authorization headers, cookies, API keys are NOT logged
const client = createClient({
  logger: { info: console.log },
  defaultHeaders: {
    Authorization: 'Bearer token...',  // Safe - not logged
  },
});

HTTPS Only

Always use HTTPS in production:

// ❌ Development only
const devClient = createClient({
  base: 'http://localhost:3001',
});

// βœ… Production
const prodClient = createClient({
  base: 'https://api.example.com',
});

Error Handling

Don't expose sensitive error details to clients:

try {
  const user = await client.get(`/users/${id}`);
} catch (error) {
  // βœ… Safe - don't expose internal errors
  logger.error('User fetch failed', {
    userId: id,
    statusCode: (error as any).statusCode,
  });
  
  // ❌ Unsafe - exposes internals
  res.status(500).json(error);
}

Security Advisories

Current Version

micro-requester@0.1.0 is a new release. No known vulnerabilities.

Versions

Version Status Notes
0.1.0+ βœ… Active Current release
< 0.1.0 N/A Pre-release

Contact


Thank you for helping keep micro-requester secure. πŸ”’

There aren’t any published security advisories