postgres_ci
core · Implements the database backend for the defunct Postgres-CI service, including users, projects, builds, hooks, sessions, and notifications.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100530 | postgres_ci | core | 0.3 | FEAT | MIT | SQL |
Usage
Sources:
- Pinned extension control file
- Complete version 0.3 installation SQL
- Pinned PUBLIC privilege grants
- Pinned user creation function
- Pinned password reset function
- Pinned GitHub secret getter
postgres_ci version 0.3 is the database backend of an abandoned Postgres-CI service. It stores application users and sessions, projects and webhook secrets, Git commits, builds, build parts and tests, worker queues, and notifications. It requires PL/pgSQL, pgcrypto, and pg_trgm and creates multiple hard-coded schemas.
Isolated installation audit
Install only in a disposable, isolated database and inspect the definer surface before calling any service API:
The application functions implement login, webhook ingestion, project mutation, and worker fetch/accept flows. They are an inseparable historical service API, not general CI primitives.
Critical authentication and privilege flaws
Nearly every service function is SECURITY DEFINER without a fixed safe search_path. The installation explicitly grants PUBLIC usage on all service schemas and PUBLIC execution on all functions. Any database role can therefore reach privileged routines unless those grants are revoked. The user-creation routine accepts an application is_superuser flag without authorizing the caller; password.reset can replace another user’s password; project.get and project.get_github_secret return stored webhook secrets.
Passwords use a fast salted SHA-1 digest rather than a modern password KDF. GitHub webhook secrets are stored as plaintext. Sessions are kept in an unlogged table, can disappear after a crash, and use a one-hour sliding expiry. Error messages distinguish unknown users from invalid passwords, enabling account enumeration.
Do not expose this extension to untrusted roles or a network-facing application. Revoking PUBLIC is only the first step: every definer function needs a fixed pg_catalog-first search_path, explicit caller authorization, least-privilege ownership, secret encryption and rotation, a modern password migration, rate limiting, audit logging, and adversarial tests. A secure replacement is safer than retrofitting this code.
The extension is non-relocatable and creates generic auth, hook, users, build, project, password, and notification schemas. Its last code commit was in 2016, the README has no usable operating documentation, and the catalog lifecycle is abandoned. Preserve it only to read or export legacy state; do not start a new CI service on it.