PetroNet SystemБаримт бичиг
Төслийн журам

Security policy (EN)

3 мин уншихdocs/SECURITY_EN.mdGitHub дээр засах

01Supported versions

VersionSecurity updates
0.1.xSupported
< 0.1.0Not supported

02Reporting a vulnerability

We take the security of petronet-gerege-nexus seriously. If you believe you have found a vulnerability, please disclose it responsibly.

How to report

Please do not report security vulnerabilities through public GitHub issues.

Contact the security team directly:

  • Email: security@gerege.mn
  • Maintainer: Gerege Systems Development Team

What to include

  1. The class of issue (SQL injection, XSS, broken authentication, rate limiter bypass, and so on).
  2. Full reproduction steps, including sample HTTP requests or code snippets.
  3. The potential impact and blast radius.
  4. Any suggested remediation.

Response and disclosure process

  1. Acknowledgement — we confirm receipt within 24–48 hours.
  2. Investigation — the engineering team reproduces and verifies the issue.
  3. Patch — once confirmed, a fix is implemented, tested and shipped as a security release.
  4. Disclosure — a public advisory is published alongside the release notes.

03Controls implemented in the platform

ControlDescription
Tenant isolationEvery query is scoped by tenant_id, preventing cross-tenant leaks
App gatingUninstalled or disabled modules reject access with 403 Forbidden
Session tokens256-bit random values; only the SHA-256 digest is stored; revoked on logout
PasswordsHashed with bcrypt
Rate limitingPer-IP throttling on login (golang.org/x/time/rate)
Proxy headersX-Forwarded-For is trusted only when TRUST_PROXY_HEADERS=true
Security headersX-Content-Type-Options, X-Frame-Options, Content-Security-Policy, and HSTS in production
Path traversal guardsApp slugs accept only a-z, 0-9, - and _
OAuth2 client authMandatory, using constant-time comparison
National integration mocksDisabled automatically when ENVIRONMENT=production
Administrator rightsInstalling, enabling or disabling apps and registering integrations require a tenant administrator
Mail credentialsVerification mail is sent by the hosted service, so the platform holds no mailbox password. The service key lives in a server-side environment variable (EMAIL_VERIFY_API_KEY) and reaches neither a browser nor the database
Single-use returnsThe return after a confirmation is claimed by one conditional UPDATE; a spent, expired or invented reference is answered 410 alike, so a reference that travelled through a mailbox and a browser's history cannot be replayed
Redirect controlOnward destinations must be HTTPS (HTTP only for localhost in development) and carry no credentials — the platform is not an open redirector

04Continuous checks

CI runs the following on every push and pull request:

  • govulncheck — matches dependencies and the standard library against the Go vulnerability database.
  • gosec — static security analysis of the source.
  • golangci-lint — correctness and static analysis.

A scheduled vulnerability scan also runs every Monday.

Энэ хуудас тус болсон уу?Таны хариу баримтыг сайжруулахад тусална.
    DEV · Хөгжүүлэлтийн орчин