Skip to content

feat: add comprehensive audit trail for SBOM modifications#130

Merged
vpetersson merged 1 commit intomasterfrom
audit-trail
Jan 19, 2026
Merged

feat: add comprehensive audit trail for SBOM modifications#130
vpetersson merged 1 commit intomasterfrom
audit-trail

Conversation

@vpetersson
Copy link
Contributor

Implement structured tracking of all SBOM changes for attestation and compliance purposes. Every modification is now recorded with UTC timestamps and categorized by type.

Changes:

  • Add AuditTrail and AuditEntry classes with categorized tracking (AUGMENTATION, ENRICHMENT, SANITIZATION, OVERRIDE)
  • Write detailed audit_trail.txt file alongside SBOM output
  • Display summary table in stdout showing modification counts
  • Output full audit trail in GitHub Actions collapsible group
  • Record augmentation: supplier, manufacturer, authors, licenses, VCS, lifecycle
  • Record enrichment: per-component metadata from external sources
  • Record sanitization: URL/PURL normalizations, rejections, stubs
  • Record overrides: CLI/env component name, version, PURL changes
  • Maintain backward compatibility via TransformationTracker alias
  • Add 28 new tests for audit trail functionality
  • Document feature in README with example outputs

Implement structured tracking of all SBOM changes for attestation and
compliance purposes. Every modification is now recorded with UTC
timestamps and categorized by type.

Changes:
- Add AuditTrail and AuditEntry classes with categorized tracking
  (AUGMENTATION, ENRICHMENT, SANITIZATION, OVERRIDE)
- Write detailed audit_trail.txt file alongside SBOM output
- Display summary table in stdout showing modification counts
- Output full audit trail in GitHub Actions collapsible group
- Record augmentation: supplier, manufacturer, authors, licenses, VCS, lifecycle
- Record enrichment: per-component metadata from external sources
- Record sanitization: URL/PURL normalizations, rejections, stubs
- Record overrides: CLI/env component name, version, PURL changes
- Maintain backward compatibility via TransformationTracker alias
- Add 28 new tests for audit trail functionality
- Document feature in README with example outputs
Copilot AI review requested due to automatic review settings January 19, 2026 08:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive audit trail system for tracking all SBOM modifications during processing. The audit trail captures every change made to the SBOM, categorized by type (augmentation, enrichment, sanitization, override), with UTC timestamps for compliance and attestation purposes.

Changes:

  • Added AuditEntry and AuditTrail classes to replace and extend the legacy TransformationTracker
  • Integrated audit trail recording throughout SBOM processing pipeline (augmentation, enrichment, overrides)
  • Output includes summary table, detailed audit_trail.txt file, and collapsible attestation group in GitHub Actions
  • Maintained backward compatibility through TransformationTracker alias

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_console.py Added 28 comprehensive tests for AuditEntry and AuditTrail functionality
sbomify_action/console.py Implemented AuditEntry and AuditTrail classes with recording methods and output formatting
sbomify_action/enrichment.py Integrated audit trail recording for component enrichment operations
sbomify_action/cli/main.py Added audit trail initialization, finalization, and file output in main pipeline
sbomify_action/augmentation.py Integrated audit trail recording for SBOM augmentation operations
README.md Documented the audit trail feature with example outputs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vpetersson vpetersson merged commit b7a1a25 into master Jan 19, 2026
11 checks passed
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