-
Notifications
You must be signed in to change notification settings - Fork 3
INT-5777 - Ingest findings and account #34
INT-5777 - Ingest findings and account #34
Conversation
src/steps/account/converter.ts
Outdated
return createIntegrationEntity({ | ||
entityData: { | ||
source: { | ||
id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just add the name since the id (and the name) are already on the entities.
params?: NodeJS.Dict<string | string[]>, | ||
): Promise<void> { | ||
return this.iterateResources<'issues', SonarqubeFinding>( | ||
'/issues/search', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this endpoint considered: api/projects/export_findings
https://next.sonarqube.com/sonarqube/web_api/api/projects/export_findings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This endpoint was initially part of the request in the ticket so we just followed that.
From your suggestion, I went ahead and looked into it and it seems like this is also the endpoint that SonarQube's UI queries when we go to the Issues page. There might be an advantage there since there is consistency in the data between the UI and our integrations.
This /export_findings
endpoint's advantage seems like it also includes what SonarQube calls 'hotspots'. Hotspots are not a vulnerability per se, unlike Issues, but they can also be under certain circumstances.
We can definitely use it for this though. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get a bit of data and then we can make a better call. Thanks for the details here!
src/steps/user-group/index.ts
Outdated
await client.iterateUserGroups((userGroup) => { | ||
convertedUserGroups.push(createUserGroupEntity(userGroup)); | ||
const userGroupEntity = createUserGroupEntity(userGroup); | ||
convertedUserGroups.push(userGroupEntity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add directly to jobState
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Added a few comments.
Do we know what volume of data we are dealing with here?
Approving, please msg me for follow reviews/approvals.
Socket Security Pull Request Report👍 No new dependency issues detected in pull request Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with Ignoring: Powered by socket.dev |
I just used a single project for my test data but I think it would be similar to other repo scanning services out there. |
@SocketSecurity ignore [email protected] |
Added
Updated SDK versions to v8
Entities:
_type
_class
sonarqube_account
Account
sonarqube_finding
Finding
Relationships:
_type
_class
_type
sonarqube_account
sonarqube_project
sonarqube_account
sonarqube_user
sonarqube_account
sonarqube_user_group
sonarqube_project
sonarqube_finding