{"id":13458738,"url":"https://github.com/pig-mesh/pig","last_synced_at":"2026-10-24T20:04:45.530Z","repository":{"id":37258165,"uuid":"204388092","full_name":"pig-mesh/pig","owner":"pig-mesh","description":"↥ ↥ ↥ Follow for updates An RBAC permission management system based on Spring Cloud 2025, Spring Boot 4, and OAuth2.","archived":false,"fork":false,"pushed_at":"2026-10-12T03:09:33.000Z","size":83482,"stargazers_count":6692,"open_issues_count":280,"forks_count":1100,"subscribers_count":98,"default_branch":"master","last_synced_at":"2026-10-17T09:37:57.069Z","etag":null,"topics":["docker","oauth2","openai","rbac-management","sa-token","spring-ai","spring-authorization-server","spring-boot","spring-cloud","spring-cloud-alibaba","spring-security","vue3"],"latest_commit_sha":null,"homepage":"https://wiki.pig4cloud.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pig-mesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"accessibility":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2019-08-26T03:24:53.000Z","updated_at":"2026-10-17T06:17:27.000Z","dependencies_parsed_at":"2026-10-06T08:37:31.724Z","dependency_job_id":null,"html_url":"https://github.com/pig-mesh/pig","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/pig-mesh/pig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pig-mesh%2Fpig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pig-mesh%2Fpig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pig-mesh%2Fpig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pig-mesh%2Fpig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pig-mesh","download_url":"https://codeload.github.com/pig-mesh/pig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pig-mesh%2Fpig/sbom","scorecard":{"id":733657,"data":{"date":"2025-08-11","repo":{"name":"github.com/pig-mesh/pig","commit":"54cfb1a420bd5cdac0ec050e415e1dddfb22f4a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/github-release.yml:1","Warn: no topLevel permission defined: .github/workflows/image.yml:1","Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Warn: no topLevel permission defined: .github/workflows/mirror.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/image.yml:11"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/github-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/github-release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/github-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/github-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/image.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/image.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/image.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/image.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/maven.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/maven.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/maven.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/maven.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/maven.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/mirror.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/mirror.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/mirror.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/pig-mesh/pig/mirror.yml/master?enable=pin","Warn: containerImage not pinned by hash: db/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/mysql-server:8.0.32 to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/mysql-server:8.0.32@sha256:d6c8301b7834c5b9c2b733b10b7e630f441af7bc917c74dba379f24eeeb6a313","Warn: containerImage not pinned by hash: pig-auth/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Warn: containerImage not pinned by hash: pig-boot/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Warn: containerImage not pinned by hash: pig-gateway/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Warn: containerImage not pinned by hash: pig-register/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Warn: containerImage not pinned by hash: pig-upms/pig-upms-biz/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Warn: containerImage not pinned by hash: pig-visual/pig-codegen/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Warn: containerImage not pinned by hash: pig-visual/pig-monitor/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Warn: containerImage not pinned by hash: pig-visual/pig-quartz/Dockerfile:1: pin your Docker image by updating registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis to registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/java:21-anolis@sha256:97962b296e4b85d8e75694db3d24588d20e9ac81a941c08d80c982edae31401c","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   9 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-c459-2m73-67hj","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-rcjc-c4pj-xxrp","Warn: Project is vulnerable to: GHSA-6qvw-249j-h44c","Warn: Project is vulnerable to: GHSA-4cx2-fc23-5wg6","Warn: Project is vulnerable to: GHSA-4h8f-2wvx-gg5w","Warn: Project is vulnerable to: GHSA-67mf-3cr5-8w23","Warn: Project is vulnerable to: GHSA-8xfc-gm6g-vgpv","Warn: Project is vulnerable to: GHSA-m44j-cfrm-g8qc","Warn: Project is vulnerable to: GHSA-v435-xc8x-wvr9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T15:07:20.096Z","repository_id":37258165,"created_at":"2025-08-22T15:07:20.096Z","updated_at":"2025-08-22T15:07:20.096Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38333069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-17T02:00:06.547Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","oauth2","openai","rbac-management","sa-token","spring-ai","spring-authorization-server","spring-boot","spring-cloud","spring-cloud-alibaba","spring-security","vue3"],"created_at":"2024-07-31T09:00:56.318Z","updated_at":"2026-10-18T20:07:07.226Z","avatar_url":"https://github.com/pig-mesh.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://img.shields.io/badge/Pig-4.1-success.svg\" alt=\"Pig\"\u003e\n \u003cimg src=\"https://img.shields.io/badge/Spring%20Cloud-2025.1-blue.svg\" alt=\"Spring Cloud\"\u003e\n \u003cimg src=\"https://img.shields.io/badge/Spring%20Boot-4.0-blue.svg\" alt=\"Spring Boot\"\u003e\n \u003cimg src=\"https://img.shields.io/badge/Vue-3.5-blue.svg\" alt=\"Vue\"\u003e\n \u003cimg src=\"https://img.shields.io/github/license/pig-mesh/pig\" alt=\"License\"\u003e\n \u003cimg src=\"https://gitcode.com/pig-mesh/pig/star/badge.svg\" alt=\"Stars\"\u003e\n\u003c/p\u003e\n\n## 系统说明\n\n- Pig 是基于 Spring Cloud、Spring Boot、OAuth2 的 RBAC 企业级快速开发平台，同时支持微服务架构和单体架构。\n- 认证中心基于 Spring Authorization Server 落地生产级 OAuth2 实践，支持授权码、密码、刷新令牌等常见登录与授权场景。\n- 当前开源版本保留认证、网关、用户权限、监控、代码生成和定时任务等核心能力，移除了商业版中的多租户、数据权限、动态路由、流程、支付、公众号、报表和移动端服务等扩展模块。\n- 提供 Docker Compose 本地编排，支持快速启动 MySQL、Redis、Nacos 和业务服务。\n\n## 使用文档\n\nPIG 提供了完整的部署与开发文档：[wiki.pig4cloud.com](https://wiki.pig4cloud.com)，涵盖开发环境配置、服务端启动、前端运行、微服务部署和单体部署等关键步骤。\n\n### 其他产品\n\n- [PIGX 在线体验](http://home.pig4cloud.com:38081)\n- [自研 BPMN 工作流引擎](http://home.pig4cloud.com:38082)\n- [大模型 RAG 知识库](http://home.pig4cloud.com:38083)\n\n## 快速开始\n\n### 基础环境\n\n- JDK 17+\n- Maven 3.9+\n- Docker 和 Docker Compose\n- Node.js 20.19.0+（运行 `pig-ui` 前端时需要）\n\n### 微服务模式\n\n在项目根目录执行完整编译，再构建并启动本地服务栈：\n\n```bash\nmvn clean install -T 4 -Pcloud\ndocker compose build \u0026\u0026 docker compose up\n```\n\n服务启动后，默认通过网关端口 `9999` 访问后端接口，Nacos 控制台端口为 `8848`。\n\n### 单体模式\n\n单体模式通过 `boot` profile 启用 `pig-boot` 模块：\n\n```bash\nmvn clean install -T 4 -Pboot\ndocker compose -f docker-compose-boot.yml build \u0026\u0026 docker compose -f docker-compose-boot.yml up\n```\n\n单体服务默认监听 `9999` 端口。\n\n## 核心依赖\n\n| 依赖 | 版本 |\n| --- | --- |\n| Pig | 4.1.1 |\n| JDK | 17+ |\n| Spring Boot | 4.0.6 |\n| Spring Cloud | 2025.1.2 |\n| Spring Cloud Alibaba | 2025.1.0.0 |\n| Spring Security OAuth2 Authorization Server | 7.0.5 |\n| MyBatis Plus | 3.5.16 |\n| Nacos Client | 3.1.2 |\n| Druid | 1.2.28 |\n| Vue | 3.5.34 |\n| Element Plus | 2.13.7 |\n| Vite | 5.4.21 |\n\n## 模块说明\n\n```lua\npig-ui -- https://github.com/pig-mesh/pig-ui\n\npig\n├── pig-register -- Nacos Server [8848/9848/18080]\n├── pig-gateway -- Spring Cloud Gateway 网关 [9999]\n├── pig-auth -- 授权服务 [3000]\n├── pig-upms -- 通用用户权限管理模块\n│   ├── pig-upms-api -- 通用用户权限管理公共 API\n│   └── pig-upms-biz -- 通用用户权限业务服务 [4000]\n├── pig-common -- 系统公共模块\n│   ├── pig-common-bom -- 全局依赖版本管理\n│   ├── pig-common-core -- 公共工具类核心包\n│   ├── pig-common-data -- MyBatis Plus 与缓存扩展\n│   ├── pig-common-datasource -- 动态数据源封装\n│   ├── pig-common-log -- 日志服务\n│   ├── pig-common-oss -- 文件上传工具类\n│   ├── pig-common-security -- 安全工具类\n│   ├── pig-common-sentinel -- Sentinel 与异常处理封装\n│   ├── pig-common-swagger -- 接口文档封装\n│   ├── pig-common-feign -- OpenFeign 扩展封装\n│   ├── pig-common-excel -- Excel 导入导出封装\n│   └── pig-common-xss -- XSS 安全封装\n├── pig-visual -- 可视化支撑服务\n│   ├── pig-monitor -- 服务监控 [5001]\n│   ├── pig-codegen -- 图形化代码生成 [5002]\n│   └── pig-quartz -- 定时任务管理台 [5007]\n└── pig-boot -- 单体模式启动器 [9999]，通过 `-Pboot` 启用\n```\n\n## 配置说明\n\n- 微服务模式使用 `cloud` profile，默认激活 `dev` 环境配置。\n- 单体模式使用 `boot` profile，`pig-boot` 模块只在该 profile 下参与构建。\n- 网关路由由 `pig-gateway/src/main/resources/application.yml` 和 Nacos 配置维护，不再依赖动态路由表。\n- 默认数据库脚本位于 `db/`，业务表初始化到 `pig`，Nacos 配置初始化到 `pig_config`。\n- 包名已统一为 `com.pig4cloud.pig`。\n\n## 开源共建\n\n### 开源协议\n\nPig 开源软件遵循 [Apache 2.0 协议](https://www.apache.org/licenses/LICENSE-2.0.html)，允许商业使用，但务必保留类作者、Copyright 信息。\n\n### 其他说明\n\n1. 欢迎提交 [PR](https://github.com/pig-mesh/pig/pulls)，请基于当前开发分支提交。\n2. 欢迎提交 [Issue](https://github.com/pig-mesh/pig/issues)，请写清楚问题现象、开发环境和复现步骤。\n3. 代码格式遵循 Spring Java Format，提交前可在项目根目录运行：\n\n```bash\nmvn spring-javaformat:apply\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpig-mesh%2Fpig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpig-mesh%2Fpig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpig-mesh%2Fpig/lists"}