Skip to content

Allow hyphens in annotation names - #3443

Open
wangyusheng1985 wants to merge 1 commit into
chainloop-dev:mainfrom
wangyusheng1985:repo-agent/5ef59633-3405
Open

wangyusheng1985 wants to merge 1 commit into
chainloop-dev:mainfrom
wangyusheng1985:repo-agent/5ef59633-3405

Conversation

@wangyusheng1985

@wangyusheng1985 wangyusheng1985 commented Sep 15, 2026 •

Copy link
Copy Markdown

Annotation names were limited to word characters, so values like my-annotation were rejected even though contract and material names already allow hyphens.

This widens the Annotation.name validation pattern to accept hyphens while remaining additive for existing underscore and alphanumeric names. Generated protobuf, TypeScript, and JSON Schema artifacts are updated to match, and hyphenated names continue to work through dependency-track interpolation and filter matching.

Assisted-by: Claude Code

Validation observed for this change:

  • gofmt -l app/controlplane/api/workflowcontract/v1/crafting_schema_test.go app/controlplane/plugins/core/dependency-track/v1/extension_test.go
  • go test ./app/controlplane/api/workflowcontract/v1/ ./app/controlplane/plugins/core/dependency-track/v1/ -count=1 -run 'TestValidateAnnotations|TestAnnotationNameConstraintAllowsHyphen|TestResolveProjectName|TestVerifyAllFilters'

Fixes #3405

Review in cubic

Signed-off-by: wangyusheng1985 <wangyusheng1985@users.noreply.github.com>
@wangyusheng1985
wangyusheng1985 marked this pull request as ready for review September 15, 2026 11:42
@chainloop-platform

chainloop-platform Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Security Checks — evaluating

Policies are still being evaluated. Results will update once available.

secret-scan

sast-scan

iac-scan

PR info

Status Policy Messages
⚠️ Failed pr-min-approvals PR/MR #3443 has 0 approving reviews, 1 required.
✅ Passed pr-description-required -
✅ Passed pr-user-story-linked -

⏭️ 2 scans not applied

Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed

View attestation ↗


Powered by Chainloop and Chainloop Trace

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Re-trigger cubic

@migmartri

Copy link
Copy Markdown
Member

Cam you please sign the commit? Thanks!

@wangyusheng1985

Copy link
Copy Markdown
Author

Do you mean a cryptographic commit signature or a DCO Signed-off-by trailer? Please point me to the applicable contribution policy.

@migmartri

Copy link
Copy Markdown
Member

Do you mean a cryptographic commit signature or a DCO Signed-off-by trailer? Please point me to the applicable contribution policy.

Both, https://github.com/chainloop-dev/chainloop/blob/main/CONTRIBUTING.md#commit-format

Thanks

@migmartri
migmartri requested a review from a team September 18, 2026 07:57
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.

Allow hyphens in annotation names

2 participants