Conversation
Problem: Asset owner info from external sources (GitHub org, CODEOWNERS
email, cloud tags, CSV imports) was lost because the system only supported
owner_id (FK to users table). If the owner hasn't registered, data is gone.
Solution: Add owner_ref VARCHAR(500) — stores raw owner text from any source.
Changes:
- Migration 101: add owner_ref column + index
- Entity: ownerRef field + getter/setter
- Repository: SELECT, INSERT, UPDATE, scan all include owner_ref
- API: owner_ref in CreateAssetRequest, AssetResponse
- Service: OwnerRef in CreateAssetInput
- Ingest: extractOwnerRef() reads from 5 CTIS sources:
1. compliance.regulatory_owner (highest priority)
2. technical.repository.owner (GitHub/GitLab org)
3. properties.owner
4. properties.contact
5. properties.responsible
Display logic:
owner_id set → show resolved user (name, email)
owner_ref set → show raw text ('john@company.com (unresolved)')
both null → show 'No owner'
Verified on live API: owner_ref stored and returned correctly.
Null byte fix: - Strip \x00 from webhook name in constructor (same as asset entity) - PostgreSQL rejects null bytes in UTF-8 strings → was causing 500 Auto-match owner_ref: - Add UserMatcher interface to AssetService - When owner_ref contains '@', auto-lookup user by email in tenant - If found, set owner_id automatically - Log successful matches for audit trail - SetUserMatcher() for dependency injection (wired in services.go)
GO-2026-4947: x509 chain building (crypto/x509) GO-2026-4946: x509 policy validation (crypto/x509) GO-2026-4870: TLS 1.3 KeyUpdate DoS (crypto/tls) GO-2026-4869: tar unbounded allocation (archive/tar) GO-2026-4865: html/template XSS (html/template) All fixed in go1.25.9+. Updating to go1.26 to match Dockerfile and CI.
- Add bootstrap-tenant CLI for creating first tenant + owner user - Add to Dockerfile build stage and production image - Fix IDOR in asset owner UpdateOwner/RemoveOwner (verify ownerID belongs to asset) - Strengthen invitation token validation (len 40-100 instead of 10) - Convert N+1 loop INSERTs to multi-row batch INSERT: - asset_group_repository.AddAssets - permission_set_repository.BatchAddItems/ReplaceItems - tenant_repository role assignment on invitation accept - Make bootstrap-tenant role assignment fatal with role existence check
Workflows were using 1.25.8 but go.mod requires >= 1.26, causing "go.mod requires go >= 1.26 (running go 1.25.8)" errors in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.