Skip to content

Add field for timestamp #4895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anttihuovila01
Copy link

Description

Added a field for showing the timestamp for when an SBOM that has been uploaded to a project was originally generated. This shows the "age" of the SBOM, which is informative and is a fitting field to have in the Project/Overview window under "last bom import". My code fetches the timestamp from the metadata/timestamp section in a standard CycloneDX SBOM. I modified existing functionality to easily be able to do this as soon as a BOM is uploaded to a project.

Addressed Issue

Closes #2782

Additional Details

Link to original issue: #2782

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
    - [ ] This PR introduces changes to the database model, and I have added corresponding update logic
    - [ ] This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@owasp-dt-bot
Copy link

owasp-dt-bot commented Apr 28, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

@anttihuovila01 anttihuovila01 force-pushed the issue-2782-timestamp branch 3 times, most recently from b34d21b to 3ec7680 Compare May 2, 2025 14:13
Signed-off-by: Erik Myhrberg <erimy268@student.liu.se>
Signed-off-by: Antti Huovila <anthu456@student.liu.se>
@anttihuovila01 anttihuovila01 force-pushed the issue-2782-timestamp branch from 3ec7680 to 3097d38 Compare May 5, 2025 08:38
Comment on lines +308 to +316
/**
* Convenience field which stores the timestamp of when the BOM was generated (from BOM metadata).
*/
@Persistent
@Index(name = "PROJECT_BOM_TIMESTAMP_IDX")
@Column(name = "BOM_TIMESTAMP", jdbcType = "BIGINT", allowsNull = "true")
@Schema(type = "string", format = "date-time", description = "Timestamp when the BOM was generated (from BOM metadata)")
@JsonInclude(JsonInclude.Include.NON_NULL)
private Date bomTimestamp;
Copy link
Member

Choose a reason for hiding this comment

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

I think conceptually this would belong to the Bom entity.

Bom is not currently surfaced on the UI, but it should be. Ideally, each project would have a list (i.e. timeline) of Boms that were imported to it. The data is there, it just needs exposure.

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.

BOM Timestamp Display in UI
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy