Skip to content
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

Implement persistent findings storage - Part 2 #493

Conversation

andream16
Copy link
Contributor

@andream16 andream16 commented Dec 5, 2024

Will open it once I refactor some things based on changes in schema.


Part 2 of #492.


How to review these changes

image


  • Generating protos for OCSF + Findings Service (GRPC Gateway)
  • Finalising schema for findings
  • Adding richer VulnerabilityFinding helper struct
  • Implementing and testing GRPC client storage backend for components
  • Implementing PSQL store for local docker setup + migrations
  • Updating docs

Q/A

  • Why do we have a copy of OCSF proto schema? Because we can't reference remote protobuf messages in local protobufs currently. We can explore this with buf remote registries in future.
  • Why SQLC? Simple way to get generated code safe interactions and models with DB with the chosen driver without hidden logic or magic. Quite good and simple for the SDK. It figures out the model based on provided schemas in migrations.
  • Why Atlas? We use atlas in SAAS for migrations already so this is more consistent.

@andream16 andream16 force-pushed the andream16/feature/saas-610/implement-findings-storage-gateway-reader-and-writer/pt-2 branch 6 times, most recently from fc15309 to 116374d Compare December 10, 2024 16:51
@andream16 andream16 force-pushed the andream16/feature/saas-610/implement-findings-storage-gateway-reader-and-writer/pt-2 branch 4 times, most recently from cf64439 to 20c6c27 Compare December 11, 2024 17:46
@andream16 andream16 changed the title [WIP] - Implement persistent findings storage - Part 2 Implement persistent findings storage - Part 2 Dec 12, 2024
@andream16 andream16 marked this pull request as ready for review December 12, 2024 10:01
@andream16 andream16 self-assigned this Dec 12, 2024
Makefile Show resolved Hide resolved
buf.gen.yaml Show resolved Hide resolved
buf.gen.yaml Show resolved Hide resolved
sdk/tools.go Show resolved Hide resolved
sdk/Makefile Show resolved Hide resolved
@andream16 andream16 force-pushed the andream16/feature/saas-610/implement-findings-storage-gateway-reader-and-writer/pt-2 branch from f526951 to 6e073da Compare December 15, 2024 17:51
@andream16 andream16 force-pushed the andream16/feature/saas-610/implement-findings-storage-gateway-reader-and-writer/pt-2 branch 3 times, most recently from f2dbb96 to fc988ae Compare December 15, 2024 18:16
@andream16 andream16 marked this pull request as ready for review December 15, 2024 18:29
sdk/component/conf.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dlicheva dlicheva left a comment

Choose a reason for hiding this comment

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

Looks good to me! I've only added some optional comments.

sdk/Makefile Show resolved Hide resolved
sdk/component/store/local/store.go Show resolved Hide resolved
sdk/component/store/local/store.go Outdated Show resolved Hide resolved
sdk/component/store/local/store.go Show resolved Hide resolved
@andream16 andream16 force-pushed the andream16/feature/saas-610/implement-findings-storage-gateway-reader-and-writer/pt-2 branch from fc988ae to 66e95b1 Compare December 16, 2024 12:34
@andream16 andream16 merged commit 285411d into main Dec 16, 2024
3 checks passed
@andream16 andream16 deleted the andream16/feature/saas-610/implement-findings-storage-gateway-reader-and-writer/pt-2 branch December 16, 2024 12:40
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.

4 participants