Skip to content

Generate SDKs#8

Merged
elliot-huffman merged 6 commits intomainfrom
elliot-sdk
Mar 30, 2025
Merged

Generate SDKs#8
elliot-huffman merged 6 commits intomainfrom
elliot-sdk

Conversation

@elliot-huffman
Copy link
Contributor

Generate and publish SDK clients automatically so that projects don't have to manage their own client code or have submodules.

Move to a dedicated folder `specs` so that they are not cluttering the root directory any more.
TypeScript initially with Kiota generation integration.
The OpenAPI files moved to a sub-directory, fixes the check process.
Create code, license, build process, readme, and structure.
This process is able to build SDKs based on the OpenAPI specs in the specs folder.
The SDK folder needs to be generated locally as it is generated content.
The project is structured as a mono repo with a shared TS Config.
Configure VS Code to be project friendly.
Create a pipeline that builds and publishes the SDKs.
The pipeline is designed to reduce surface area for attack for the publish secrets against malicious build dependencies.
Copilot AI review requested due to automatic review settings March 30, 2025 01:27
@elliot-huffman elliot-huffman self-assigned this Mar 30, 2025
@socket-security
Copy link

@socket-security
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
Unmaintained npm/inherits@2.0.4
  • Last Publish: 6/19/2019, 8:18:52 PM
⚠︎
Unmaintained npm/external-editor@3.1.0
  • Last Publish: 7/8/2019, 4:07:13 PM
⚠︎
Shell access npm/external-editor@3.1.0 ⚠︎
Unmaintained npm/through@2.3.8
  • Last Publish: 7/3/2015, 1:38:39 PM
⚠︎
Unmaintained npm/safer-buffer@2.1.2
  • Last Publish: 4/8/2018, 10:42:42 AM
⚠︎
Unmaintained npm/esprima@4.0.1
  • Last Publish: 7/13/2018, 8:39:14 AM
⚠︎
Unmaintained npm/string_decoder@1.3.0
  • Last Publish: 8/7/2019, 9:20:36 AM
⚠︎
Unmaintained npm/util-deprecate@1.0.2
  • Last Publish: 10/7/2015, 6:37:40 PM
⚠︎
Unmaintained npm/kind-of@6.0.3
  • Last Publish: 1/16/2020, 4:59:19 PM
⚠︎
Unmaintained npm/repeat-string@1.6.1
  • Last Publish: 10/23/2016, 4:54:00 PM
⚠︎
Unmaintained npm/wcwidth@1.0.1
  • Last Publish: 5/30/2016, 3:56:57 AM
⚠︎
Unmaintained npm/os-tmpdir@1.0.2
  • Last Publish: 11/8/2018, 11:14:15 AM
⚠︎
Unmaintained npm/clone@1.0.4
  • Last Publish: 3/21/2018, 9:21:25 PM
⚠︎
Unmaintained npm/randexp@0.5.3
  • Last Publish: 7/21/2018, 10:35:57 PM
⚠︎
Unidentified License npm/@opentelemetry/api@1.9.0 🚫
Dynamic require npm/ts-patch@3.3.0 ⚠︎
Dynamic require npm/ts-patch@3.3.0 ⚠︎

View full report↗︎

Next steps

What are unmaintained packages?

Package has not been updated in more than 5 years and may be unmaintained. Problems with the package may go unaddressed.

Package should publish periodic maintenance releases if they are maintained, or deprecate if they have no intention in further maintenance.

What is shell access?

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.

What do I need to know about license files?

(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.

Manually review the license contents.

What is dynamic require?

Dynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.

Packages should avoid dynamic imports when possible. Audit the use of dynamic require to ensure it is not executing malicious or vulnerable code.

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/inherits@2.0.4
  • @SocketSecurity ignore npm/external-editor@3.1.0
  • @SocketSecurity ignore npm/through@2.3.8
  • @SocketSecurity ignore npm/safer-buffer@2.1.2
  • @SocketSecurity ignore npm/esprima@4.0.1
  • @SocketSecurity ignore npm/string_decoder@1.3.0
  • @SocketSecurity ignore npm/util-deprecate@1.0.2
  • @SocketSecurity ignore npm/kind-of@6.0.3
  • @SocketSecurity ignore npm/repeat-string@1.6.1
  • @SocketSecurity ignore npm/wcwidth@1.0.1
  • @SocketSecurity ignore npm/os-tmpdir@1.0.2
  • @SocketSecurity ignore npm/clone@1.0.4
  • @SocketSecurity ignore npm/randexp@0.5.3
  • @SocketSecurity ignore npm/@opentelemetry/api@1.9.0
  • @SocketSecurity ignore npm/ts-patch@3.3.0

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces automated SDK generation and publication for both the SHIELD and Data Gateway services, reducing the burden on individual projects to manage their own client code.

  • Adds factory functions and documentation for the SHIELD and Data Gateway TypeScript SDKs.
  • Updates GitHub workflows to validate, generate, build, and publish the SDKs, including an upgrade of the Node.js version and refinement of file search paths.

Reviewed Changes

Copilot reviewed 9 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/shield/TypeScript/index.ts Implements shieldClientFactory for the SHIELD SDK initialization.
src/shield/TypeScript/README.md Provides documentation and usage examples for the SHIELD SDK.
src/dataGateway/TypeScript/index.ts Adds dataGatewayClientFactory for Data Gateway SDK initialization.
src/dataGateway/TypeScript/README.md Documents and provides usage instructions for the Data Gateway SDK.
.github/workflows/Validate.yml Updates Node.js version and restricts JSON spec file search path.
.github/workflows/GenerateSdk.yml Adds a workflow for generating, building, and publishing the SDKs.
Files not reviewed (10)
  • OpenAPI.code-workspace: Language not supported
  • specs/Data-Gateway.json: Language not supported
  • specs/SHIELD.json: Language not supported
  • src/dataGateway/TypeScript/LICENSE: Language not supported
  • src/dataGateway/TypeScript/package.json: Language not supported
  • src/dataGateway/TypeScript/tsconfig.json: Language not supported
  • src/shield/TypeScript/LICENSE: Language not supported
  • src/shield/TypeScript/package.json: Language not supported
  • src/shield/TypeScript/tsconfig.json: Language not supported
  • tsconfig.base.json: Language not supported

@elliot-huffman elliot-huffman merged commit afe63be into main Mar 30, 2025
4 of 5 checks passed
@elliot-huffman elliot-huffman deleted the elliot-sdk branch March 30, 2025 01:29
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.

2 participants