feat: plugin first implementation - #1
Conversation
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces the first working implementation of a Compliance Framework GitLab Repositories plugin that authenticates to GitLab, enumerates projects in a group, collects repo/CI/MR governance data, and evaluates OPA policies per project.
Changes:
- Implement core plugin lifecycle (
Configure,Init,Eval) plus GitLab data collection (projects, approvals, pipelines, MRs, releases, CODEOWNERS, environments, push rules). - Add supporting data model types for policy input (
SaturatedProject,OpenMergeRequest). - Add extensive unit tests and introduce Go module + Makefile build scaffolding.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
main.go |
Core plugin implementation, config/auth handling, project enumeration, policy evaluation + evidence creation |
types.go |
Policy input structs used to marshal GitLab data into OPA |
merge_requests.go |
Fetch open MRs and enrich with per-MR approval state |
org_teams.go |
Fetch group membership (inherited members) for policy reasoning |
codeowners.go |
Fetch and decode CODEOWNERS content from standard locations |
plugin_test.go |
Broad unit tests for GitLab client creation and data-gathering methods |
config_test.go |
Unit tests for config validation and pipeline lookback parsing |
Makefile |
Basic build/help targets (currently with OPA precheck and build invocation) |
go.mod / go.sum |
Module definition and dependency lockfile updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.