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

Include child relationship names on sobject export #1105

Merged

Conversation

paustint
Copy link
Contributor

@paustint paustint commented Dec 8, 2024

Fetch all related sobject metadata to obtain the child relationship name for any lookup fields when the user chooses the option to include this.

There are no other SOQL based ways to obtain this data, so we end up needing to take the performance hit of fetching metadata for all related sobjects

resolves #1102

Fetch all related sobject metadata to obtain the child relationship name for any lookup fields when the user chooses the option to include this.

There are no other SOQL based ways to obtain this data, so we end up needing to take the performance hit of fetching metadata for all related sobjects

resolves #1102
Copy link

Report too large to display inline

View full report↗︎

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Possible typosquat attack npm/object.assign@4.1.2 ⚠︎
Critical CVE npm/vm2@3.9.13 ⚠︎
Critical CVE npm/vm2@3.9.13 ⚠︎
Critical CVE npm/vm2@3.9.13 ⚠︎
Critical CVE npm/vm2@3.9.13 ⚠︎
Critical CVE npm/vm2@3.9.13 ⚠︎
Critical CVE npm/vm2@3.9.13 ⚠︎

View full report↗︎

Next steps

What is a typosquat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

What is a critical CVE?

Contains a Critical Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/object.assign@4.1.2
  • @SocketSecurity ignore npm/vm2@3.9.13

@paustint paustint requested a review from Copilot December 8, 2024 16:35

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (3)

libs/features/sobject-export/src/sobject-export-utils.ts:112

  • The getterFn function should handle null or undefined values to avoid unexpected results. Suggestion: obj[_label] = getterFn(value ?? '');
obj[_label] = getterFn(value);

libs/features/sobject-export/src/sobject-export-utils.ts:248

  • Ensure that field.name is unique within the context of the related SObject to avoid potential issues.
const childRelationship = sobjectsWithChildRelationships[relatedSObject]?.[field.name]?.relationshipName;

libs/features/sobject-export/src/SObjectExport.tsx:261

  • The type cast to ListItem[] is unnecessary if FIELD_ATTRIBUTES is already of type ListItem[]. Consider removing the cast.
items={FIELD_ATTRIBUTES as ListItem[]}
@paustint paustint merged commit 1ac7255 into main Dec 8, 2024
6 checks passed
@paustint paustint deleted the bug/1102-include-child-relationship-name-sobj-export branch December 8, 2024 17:51
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.

Add option to include child relationship name in sobject export
1 participant