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

surface code locations in the frontend #1043

Merged

Conversation

breadchris
Copy link
Contributor

@breadchris breadchris commented Dec 9, 2022

screenshot-localhost_4455-2022 12 15-21_41_01

Code locations are returned to the frontend and displayed in the package card. Code locations are grouped together based off of finding the closest parent directory with a manifest.

@breadchris breadchris linked an issue Dec 9, 2022 that may be closed by this pull request
@breadchris
Copy link
Contributor Author

test

1 similar comment
@breadchris
Copy link
Contributor Author

test

@breadchris breadchris marked this pull request as ready for review December 16, 2022 04:55
@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2022

Hasura Semantic Diff

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

Click to expand!
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: |
          scalar JSON
          scalar UUID
          type AuthenticatedRepoCloneUrlOutput {
            url: String
          }
          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
          }
          type UploadUrl {
            headers: JSON!
            url: String!
          }
          
    - role: service
      definition:
        schema: |
          scalar JSON
          scalar UUID
          type AuthenticatedRepoCloneUrlOutput {
            url: String
          }
          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
          }
          type SbomUploadUrlOutput {
            error: Boolean!
            uploadUrl: UploadUrl
          }
          type UploadUrl {
            headers: JSON!
            url: String!
          }
          input SbomUploadUrlInput {
            orgId: UUID!
            projectId: UUID!
          }
          
    - role: cli
      definition:
        schema: |
          scalar JSON
          scalar UUID
          type Query {
            presignSbomUpload(orgId: UUID!, buildId: UUID!): SbomUploadUrlOutput
          }
          type SbomUploadUrlOutput {
            error: Boolean!
            uploadUrl: UploadUrl
          }
          type UploadUrl {
            headers: JSON!
            url: String!
          }
          
    
  

diff --git a/lunatrace/bsl/hasura/migrations/lunatrace/1671165768745_vulnerability_cwe_unique/down.sql b/lunatrace/bsl/hasura/migrations/lunatrace/1671165768745_vulnerability_cwe_unique/down.sql
new file mode 100644
index 000000000..3ee124126
--- /dev/null
+++ b/lunatrace/bsl/hasura/migrations/lunatrace/1671165768745_vulnerability_cwe_unique/down.sql
@@ -0,0 +1 @@
+ALTER TABLE "vulnerability"."vulnerability_cwe" DROP CONSTRAINT "unique_vulnerability_cwe_vulnerability_id_cwe_id_key";
diff --git a/lunatrace/bsl/hasura/migrations/lunatrace/1671165768745_vulnerability_cwe_unique/up.sql b/lunatrace/bsl/hasura/migrations/lunatrace/1671165768745_vulnerability_cwe_unique/up.sql
new file mode 100644
index 000000000..9ef4ff843
--- /dev/null
+++ b/lunatrace/bsl/hasura/migrations/lunatrace/1671165768745_vulnerability_cwe_unique/up.sql
@@ -0,0 +1 @@
+ALTER TABLE "vulnerability"."vulnerability_cwe" ADD CONSTRAINT "unique_vulnerability_cwe_vulnerability_id_cwe_id_key" UNIQUE ("vulnerability_id", "cwe_id");

@ajvpot
Copy link
Contributor

ajvpot commented Dec 16, 2022

graphql-engine_1  | {"level":"error","msg":"skipping applying migrations on database lunatrace, encountered: \n{\n  \"code\": \"postgres-error\",\n  \"error\": \"query execution failed\",\n  \"internal\": {\n    \"arguments\": [],\n    \"error\": {\n      \"description\": null,\n      \"exec_status\": \"FatalError\",\n      \"hint\": null,\n      \"message\": \"relation \\\"vulnerability_cwe_vulnerability_id_cwe_id_key\\\" already exists\",\n      \"status_code\": \"42P07\"\n    },\n    \"prepared\": false,\n    \"statement\": \"ALTER TABLE \\\"vulnerability\\\".\\\"vulnerability_cwe\\\" ADD CONSTRAINT \\\"vulnerability_cwe_vulnerability_id_cwe_id_key\\\" UNIQUE (\\\"vulnerability_id\\\", \\\"cwe_id\\\");\\n\"\n  },\n  \"path\": \"$\"\n}","time":"2022-12-16T05:49:25Z"}

@ajvpot
Copy link
Contributor

ajvpot commented Dec 16, 2022

"relation \"vulnerability_cwe_vulnerability_id_cwe_id_key\" already exists

breadchris and others added 2 commits December 16, 2022 12:40
…code (#1050)

Update generated files

Co-authored-by: breadchris <breadchris@users.noreply.github.com>
@CLAassistant
Copy link

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.

✅ breadchris
❌ github-actions[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@breadchris breadchris merged commit 53eefa5 into master Dec 16, 2022
@breadchris breadchris deleted the 1029-view-usages-of-dependencies-in-first-party-code branch December 16, 2022 22:09
ajvpot pushed a commit that referenced this pull request Dec 16, 2022
![screenshot-localhost_4455-2022 12
15-21_41_01](https://user-images.githubusercontent.com/1069294/208030292-a107e523-1c35-43aa-b94f-1e218edf77f9.png)

Code locations are returned to the frontend and displayed in the package
card. Code locations are grouped together based off of finding the
closest parent directory with a manifest.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ajvpot pushed a commit that referenced this pull request Dec 17, 2022
![screenshot-localhost_4455-2022 12
15-21_41_01](https://user-images.githubusercontent.com/1069294/208030292-a107e523-1c35-43aa-b94f-1e218edf77f9.png)

Code locations are returned to the frontend and displayed in the package
card. Code locations are grouped together based off of finding the
closest parent directory with a manifest.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ajvpot pushed a commit that referenced this pull request Dec 17, 2022
![screenshot-localhost_4455-2022 12
15-21_41_01](https://user-images.githubusercontent.com/1069294/208030292-a107e523-1c35-43aa-b94f-1e218edf77f9.png)

Code locations are returned to the frontend and displayed in the package
card. Code locations are grouped together based off of finding the
closest parent directory with a manifest.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ajvpot pushed a commit that referenced this pull request Dec 17, 2022
![screenshot-localhost_4455-2022 12
15-21_41_01](https://user-images.githubusercontent.com/1069294/208030292-a107e523-1c35-43aa-b94f-1e218edf77f9.png)

Code locations are returned to the frontend and displayed in the package
card. Code locations are grouped together based off of finding the
closest parent directory with a manifest.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Former-commit-id: 8a34a7a
Former-commit-id: 84d1f2d6fd6de790f3e84841e63c787a76ca45f0
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.

view usages of dependencies in first party code
3 participants