Skip to content

Add Internal ID to Attestation DB

Adding internal_id support to attestations will ensure IDs for view related paths are scoped to the project and can be referenced more easily by other project features when necessary.

The scope of this issue is to add internal_id support to the database and model so that it can be used in the show and download routes.

Implementation proposal

  • Create migration to:
    • add iid column to slsa_attestations table
    • create unique index on (project_id, iid)
  • Update SupplyChain::Attestation with:
    • include AtomicInternalId
    • has_internal_id :iid, scope: :project
  • Add model specs—see it_behaves_like 'AtomicInternalId' for examples
Edited by Aaron Huntsman