lunasec-io / lunasec

LunaSec - Dependency Security Scanner that automatically notifies you about vulnerabilities like Log4Shell or node-ipc in your Pull Requests and Builds. Protect yourself in 30 seconds with the LunaTrace GitHub App: https://github.com/marketplace/lunatrace-by-lunasec/
https://www.lunasec.io/
Other
1.44k stars 164 forks source link

show epss and cisa known #1098

Closed factoidforrest closed 1 year ago

factoidforrest commented 1 year ago

moreinfo

github-actions[bot] commented 1 year ago

Hasura Semantic Diff

Hasura config files have changed. This comment shows which fields have changed ignoring formatting.

Click to expand! ``` (root level) - one map entry removed: computed_fields: - name: vulnerability comment: "Vulnerability referenced by the known exploited vulnerability." definition: function: name: cisa_known_exploited_vulnerability schema: vulnerability table_argument: known_exploited + two map entries added: array_relationships: - name: vulnerabilities using: manual_configuration: column_mapping: cve: cve_id insertion_order: null remote_table: name: vulnerability schema: vulnerability select_permissions: - role: service permission: columns: - date_added - due_date - cve - notes - product - required_action - short_description - vendor_project - vulnerability_name - id filter: {} - role: user permission: columns: - date_added - due_date - cve - notes - product - required_action - short_description - vendor_project - vulnerability_name - id filter: {} (root level) - one map entry removed: computed_fields: - name: cisa_known_exploited definition: function: name: vulnerability_cisa_known_exploited schema: vulnerability table_argument: vulnerability + one map entry added: object_relationships: - name: cisa_known_vuln using: manual_configuration: column_mapping: cve_id: cve insertion_order: null remote_table: name: cisa_known_exploited schema: vulnerability insert_permissions.0.permission.columns + one list entry added: - cve_id select_permissions - two list entries removed: + two list entries added: - role: service - role: service permission: permission: columns: columns: - created_at - created_at - cvss_score - cve_id - database_specific - cvss_score - details - database_specific - epss_percentile - details - epss_score - epss_percentile - id - epss_score - last_fetched - id - modified - last_fetched - published - modified - reviewed_by_source - published - severity_name - reviewed_by_source - source - severity_name - source_id - source - summary - source_id - upstream_data - summary - withdrawn - upstream_data filter: {} - withdrawn - role: user filter: {} permission: - role: user columns: permission: - created_at columns: - cvss_score - created_at - database_specific - cve_id - details - cvss_score - epss_percentile - database_specific - epss_score - details - id - epss_percentile - last_fetched - epss_score - modified - id - published - last_fetched - reviewed_by_source - modified - severity_name - published - source - reviewed_by_source - source_id - severity_name - summary - source - upstream_data - source_id - withdrawn - summary filter: {} - upstream_data - withdrawn filter: {} update_permissions.0.permission.columns + one list entry added: - cve_id lunatrace-custom.permissions - three list entries removed: - role: user definition: schema: | type AuthenticatedRepoCloneUrlOutput { url: String } scalar JSON type Mutation { presignManifestUpload(project_id: UUID!): PresignedUrlResponse } type PresignedUrlResponse { bucket: String! headers: JSON! key: String! url: String! } type Query { authenticatedRepoCloneUrl(repoGithubId: Int!): AuthenticatedRepoCloneUrlOutput fakeQueryToHackHasuraBeingABuggyMess: String sbomUrl(buildId: UUID!): String } type SbomUploadUrlOutput { error: Boolean! uploadUrl: UploadUrl } scalar UUID type UploadUrl { headers: JSON! url: String! } - role: service definition: schema: | type AuthenticatedRepoCloneUrlOutput { url: String } scalar JSON type Mutation { presignManifestUpload(project_id: UUID!): PresignedUrlResponse } type PresignedUrlResponse { bucket: String! headers: JSON! key: String! url: String! } type Query { authenticatedRepoCloneUrl(repoGithubId: Int!): AuthenticatedRepoCloneUrlOutput fakeQueryToHackHasuraBeingABuggyMess: String presignSbomUpload(orgId: UUID!, buildId: UUID!): SbomUploadUrlOutput sbomUrl(buildId: UUID!): String } input SbomUploadUrlInput { orgId: UUID! projectId: UUID! } type SbomUploadUrlOutput { error: Boolean! uploadUrl: UploadUrl } scalar UUID type UploadUrl { headers: JSON! url: String! } - role: cli definition: schema: | scalar JSON type Query { presignSbomUpload(orgId: UUID!, buildId: UUID!): SbomUploadUrlOutput } type SbomUploadUrlOutput { error: Boolean! uploadUrl: UploadUrl } scalar UUID type UploadUrl { headers: JSON! url: String! } + three list entries added: - role: user definition: schema: | type AuthenticatedRepoCloneUrlOutput { url: String } scalar JSON type Mutation { presignManifestUpload(project_id: UUID!): PresignedUrlResponse } type PresignedUrlResponse { bucket: String! headers: JSON! key: String! url: String! } type Query { authenticatedRepoCloneUrl(repoGithubId: Int!): AuthenticatedRepoCloneUrlOutput fakeQueryToHackHasuraBeingABuggyMess: String sbomUrl(buildId: UUID!): String } type SbomUploadUrlOutput { error: Boolean! uploadUrl: UploadUrl } scalar UUID type UploadUrl { headers: JSON! url: String! } - role: service definition: schema: | type AuthenticatedRepoCloneUrlOutput { url: String } scalar JSON type Mutation { presignManifestUpload(project_id: UUID!): PresignedUrlResponse } type PresignedUrlResponse { bucket: String! headers: JSON! key: String! url: String! } type Query { authenticatedRepoCloneUrl(repoGithubId: Int!): AuthenticatedRepoCloneUrlOutput fakeQueryToHackHasuraBeingABuggyMess: String presignSbomUpload(orgId: UUID!, buildId: UUID!): SbomUploadUrlOutput sbomUrl(buildId: UUID!): String } input SbomUploadUrlInput { orgId: UUID! projectId: UUID! } type SbomUploadUrlOutput { error: Boolean! uploadUrl: UploadUrl } scalar UUID type UploadUrl { headers: JSON! url: String! } - role: cli definition: schema: | scalar JSON type Query { presignSbomUpload(orgId: UUID!, buildId: UUID!): SbomUploadUrlOutput } type SbomUploadUrlOutput { error: Boolean! uploadUrl: UploadUrl } scalar UUID type UploadUrl { headers: JSON! url: String! } diff --git a/lunatrace/bsl/hasura/migrations/lunatrace/1674685930023_add_cve_id_to_all_vulns/down.sql b/lunatrace/bsl/hasura/migrations/lunatrace/1674685930023_add_cve_id_to_all_vulns/down.sql new file mode 100644 index 00000000..86a33990 --- /dev/null +++ b/lunatrace/bsl/hasura/migrations/lunatrace/1674685930023_add_cve_id_to_all_vulns/down.sql @@ -0,0 +1,19 @@ +ALTER TABLE vulnerability.vulnerability DROP COLUMN cve_id; + + +CREATE OR REPLACE FUNCTION vulnerability.cisa_known_exploited_vulnerability(known_exploited vulnerability.cisa_known_exploited) + RETURNS SETOF vulnerability.vulnerability AS $$ +SELECT * +FROM vulnerability.vulnerability +WHERE source_id = known_exploited.cve +$$ LANGUAGE sql STABLE; + +CREATE OR REPLACE FUNCTION vulnerability.vulnerability_cisa_known_exploited(vulnerability vulnerability.vulnerability) + RETURNS SETOF vulnerability.cisa_known_exploited + LANGUAGE sql + STABLE +AS $function$ +SELECT * +FROM vulnerability.cisa_known_exploited +WHERE cve = vulnerability.source_id +$function$ diff --git a/lunatrace/bsl/hasura/migrations/lunatrace/1674685930023_add_cve_id_to_all_vulns/up.sql b/lunatrace/bsl/hasura/migrations/lunatrace/1674685930023_add_cve_id_to_all_vulns/up.sql new file mode 100644 index 00000000..6118ba7c --- /dev/null +++ b/lunatrace/bsl/hasura/migrations/lunatrace/1674685930023_add_cve_id_to_all_vulns/up.sql @@ -0,0 +1,7 @@ +ALTER TABLE vulnerability.vulnerability ADD COLUMN cve_id text NULL DEFAULT NULL; + + + +DROP FUNCTION vulnerability.cisa_known_exploited_vulnerability; + +DROP FUNCTION vulnerability.vulnerability_cisa_known_exploited ```
CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: factoidforrest
:x: github-actions[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.