Skip to content

Add GitLab Issue witness support - #3

Open
BenBirt wants to merge 1 commit into
mainfrom
claude/gitlab-witness-implementation-ak251v
Open

Add GitLab Issue witness support#3
BenBirt wants to merge 1 commit into
mainfrom
claude/gitlab-witness-implementation-ak251v

Conversation

@BenBirt

@BenBirt BenBirt commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Add gitlab-issue:// witness type, mirroring the existing github-issue:// witness. The protocol is identical (issue-based checkpoint request and cosignature exchange), adapted for GitLab APIs.

New files:

  • docs/gitlab-issue-witness.md: scheme, protocol, triggering, setup guide
  • gitlab/cosign.gitlab-ci.yml: includable CI template for witness-side cosigning (POSIX sh on Alpine, path traversal guards, push-race retry, cleanup job with timestamp-filtered close)

Modified files:

  • actions/checkpoint/action.yml: new gitlab-token input and gitlab-issue) case arm (create issue via POST /projects/:id/issues, poll for closure, extract cosig from issue notes)
  • actions/checkpoint/README.md: document gitlab-token input and usage
  • README.md: mention third witness type, CI template location
  • internal/policy/policy_test.go: TestPolicyGitLabIssueWitnessURL asserts gitlab-issue://gitlab.example.com/group/subgroup/my-witness is stored verbatim and verification works

Verification:

  • go test passes on all pure-Go packages (internal/policy, internal/note, internal/gitutil, internal/witness)
  • YAML parses (python3 yaml.safe_load)
  • Shell scripts pass bash -n and dash -n
  • NOT yet tested against a live GitLab instance

Add gitlab-issue:// witness type, mirroring the existing github-issue://
witness. The protocol is identical (issue-based checkpoint request and
cosignature exchange), adapted for GitLab APIs.

New files:
- docs/gitlab-issue-witness.md: scheme, protocol, triggering, setup guide
- gitlab/cosign.gitlab-ci.yml: includable CI template for witness-side
  cosigning (POSIX sh on Alpine, path traversal guards, push-race retry,
  cleanup job with timestamp-filtered close)

Modified files:
- actions/checkpoint/action.yml: new gitlab-token input and gitlab-issue)
  case arm (create issue via POST /projects/:id/issues, poll for closure,
  extract cosig from issue notes)
- actions/checkpoint/README.md: document gitlab-token input and usage
- README.md: mention third witness type, CI template location
- internal/policy/policy_test.go: TestPolicyGitLabIssueWitnessURL asserts
  gitlab-issue://gitlab.example.com/group/subgroup/my-witness is stored
  verbatim and verification works

Verification:
- go test passes on all pure-Go packages (internal/policy, internal/note,
  internal/gitutil, internal/witness)
- YAML parses (python3 yaml.safe_load)
- Shell scripts pass bash -n and dash -n
- NOT yet tested against a live GitLab instance
@BenBirt
BenBirt force-pushed the claude/gitlab-witness-implementation-ak251v branch from e1f770d to 2143ac5 Compare July 7, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant