黑客技术
点击放大

A few months ago, we built the open 源码 GraphQL 引擎 that gives you instant GraphQL APIs over any Postgres 数据库. We ha all of Skor's existing features and even more to make it production ready:
1) Reliable: We capture every relevant action on the 数据库 as an event, even when Hasura is down! The events are delivered to your webhook as soon as possible with an atleast-once guarantee.
2) Scalable: What more, it e horizontally. If you are processing millions of events, just add more instances of GraphQL 引擎.
3) Use with Ser: If you are using Skor, then avoid the pain of managing your webhook by moving to Ser infrastructure. Check out these blog posts to get started
Use Hasura GraphQL 引擎 for production use cases
---
skor is a utility for Postgres which calls a webhook with row changes as JSON whenever an INSERT, UPDATE or DELETE event occurs on a particular table.
You can drop the docker image next to your Postgres 数据库 instance and configure a webhook that will be called.
It works using a pg_notify trigger function and a tiny C program skor that listens to the notifications and calls the configured webhook with a JSON payload.
Skor watches this channel for messages and when a message is received, it makes an HTTP POST call to the webhook with the JSON payload. The webhook can then decide to take an action on this.!Skor Architecture Diagram
We need to setup triggers on the tables that we we are interested in. Create a triggers.json file (see sample.triggers.json) with the required tables and events.
Note: This command requires python3.
Run the skor Docker image (that has the skor binary baked in):
Make sure you use the appropriate 数据库 parameters and webhook URL above.
Query:
JSON webhook payload:
Query:
JSON webhook payload:
Query:
JSON webhook payload:
To remove the skor related functions and triggers that were added to Postgres, run this in psql:
The pre-built Docker image with the skor binary is a at hasura/skor and can be deployed as a microservice with the sample k8s.yaml in this repo.
The webhook can be another microservice that exposes an endpoint.
To learn more on deploying microservices on Hasura you may check out the documentation.
gcclibcurl4-openssl-dev)libpq-dev)1. Install the requirements specified in tests/requirements.txt
2. The tests assume that you have a local postgres instance at localhost:5432 and a database called skor_test which can be accessed by an admin user.
3. Run skor on this 数据库 with the webhook url set to
4. run run_tests.sh script in the tests directory.
Please check out the contributing guide to learn about setting up the de en and building the project. Also look at the issues page and help us in improving Skor!
开发语言:C
Star 数:1242
该项目属于黑客技术方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Now part of Hasura GraphQL 引擎. Listen to postgres events and forward them as JSON payloads to a webhook展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | skor - Now part of Hasura GraphQL Engine. Listen to postg |
| 所属分类 | 黑客技术 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 22:13:40 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 465 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |