Skip to content

feat(metadata): add compliance snapshot mappings - #697

Merged
XiaoSeS merged 3 commits into
mainfrom
feat/compliance-metadata-snapshot
Aug 7, 2026
Merged

feat(metadata): add compliance snapshot mappings#697
XiaoSeS merged 3 commits into
mainfrom
feat/compliance-metadata-snapshot

Conversation

@XiaoSeS

@XiaoSeS XiaoSeS commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #556.

This PR adds optional SkillHub/Astron compliance metadata for skill versions:

  • validates optional x-astron-compliance frontmatter during publish;
  • snapshots normalized mappings into version parsedMetadataJson.complianceSnapshot;
  • exposes the snapshot in version list/detail and review detail responses;
  • renders a compact compliance mapping panel in skill/review version views;
  • indexes standard, version, controlId, and title so searches like T1059 can find mapped skills.

Out of scope:

  • no required compliance field;
  • no independent compliance API;
  • no runtime execution trace responsibility inside SkillHub;
  • no dedicated compliance filter UI yet.

Validation

  • Backend targeted tests:
    • ComplianceMetadataServiceTest
    • SkillPackageValidatorTest
    • SkillPublishServiceTest
    • ComplianceSnapshotProjectionServiceTest
    • ReviewSkillDetailAppServiceTest
    • SkillControllerTest
    • ReviewPortalControllerTest
    • PostgresSearchRebuildServiceTest
  • Frontend:
    • pnpm --dir web exec vitest run src/features/skill/compliance-snapshot-panel.test.tsx src/features/review/review-skill-detail-section.test.tsx
    • pnpm --dir web run typecheck
    • pnpm --dir web run lint
  • OpenAPI:
    • TMPDIR=<private-run-dir> ./scripts/check-openapi-generated.sh
  • Local containerized staging:
    • built skillhub-server:staging
    • built web production assets
    • ran scripts/smoke-test.sh http://localhost:8080: 15 passed, 0 failed
  • Runtime business check on staging:
    • published a zip package with x-astron-compliance
    • version detail returned complianceSnapshot.items[0].controlId = T1059
    • version list returned complianceSnapshot
    • search T1059 returned compliance-runtime-556

Notes

The local staging web container required a private compose override setting
SKILLHUB_TRUST_FORWARDED_PROTO=false because docker-compose.staging.yml uses nginx:alpine
directly rather than the web image default. compose.release.yml already carries this variable.
That staging-only gap is not changed in this PR.

XiaoSeS added 3 commits August 7, 2026 15:46
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
@XiaoSeS
XiaoSeS force-pushed the feat/compliance-metadata-snapshot branch from 57bb94e to da5c3cb Compare August 7, 2026 07:46
@XiaoSeS
XiaoSeS merged commit 460304e into main Aug 7, 2026
8 checks passed
@XiaoSeS
XiaoSeS deleted the feat/compliance-metadata-snapshot branch August 7, 2026 08:09
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.

Feat: Introduce 'Skill-as-Standard' metadata schema for compliance mapping (MITRE/NIST) and automated audit trails

1 participant