feat(proto,api,client): define ScanReport proto and add referrer persistence#1744
Merged
Conversation
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).
|
2 tasks
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
2 tasks
ramizpolic
reviewed
Jul 3, 2026
| // ScanReport can be encoded into a RecordReferrer object as follows: | ||
| // type = "agntcy.dir.scan.v1.ScanReport" | ||
| // data = ScanReport message encoded as JSON | ||
| message ScanReport { |
Member
There was a problem hiding this comment.
nit: consider adding annotations map here as clients may want to run their own scanners and attach extra details here.
ramizpolic
reviewed
Jul 3, 2026
Member
There was a problem hiding this comment.
could we keep this under dir/security namespace or do you see adding other types of scan reports here?
Member
Author
|
@ramizpolic Thanks for reviewing and for the feedback! will address both comments 👍 |
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
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.
This PR lays the foundation for treating security scan results as first-class Directory artifacts. It defines the
ScanReportproto schema — covering scanner type, severity, findings, and analyzers — registersagntcy.dir.scan.v1.ScanReportas a referrer type constant, and wires up the full referrer lifecycle:MarshalReferrer/UnmarshalReferreron the generated proto type and aPushScanReportmethod on the Dir client. Callers (importer, reconciler) can now persist scan results as OCI referrers after scanning without any further schema changes.Severityincludes anINFOlevel betweenNONEandLOWto accommodate scanner output that doesn't map cleanly to the traditional four-level scale.PushScanReportreturns an error rather than logging internally, leaving the caller in control of whether a storage failure should block the import gate — as required by the S4 spec.string scanned_atinstead ofgoogle.protobuf.Timestampto avoid a Timestamp dependency in the generatedapimodule.