Skip to content

Commit a210184

Browse files
authored
Release v1.8.0 (#115)
- Freeze `ndc-nodejs-lambda` to `v1.20.2` - Update dockerfile to ubuntu:24.04 - Updates for security vulnerabilities
2 parents 7292e06 + d027986 commit a210184

File tree

10 files changed

+835
-453
lines changed

10 files changed

+835
-453
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,6 @@ jobs:
5959
path: ${{ env.tar_file }}
6060
retention-days: 1
6161

62-
scan-docker-image-with-gokakashi:
63-
needs: build-docker-image
64-
runs-on: ubuntu-latest
65-
steps:
66-
- name: Download Docker image artifact
67-
uses: actions/download-artifact@v4
68-
with:
69-
name: ${{ needs.build-docker-image.outputs.tar_file }}
70-
71-
- name: Load Docker image
72-
run: |
73-
docker load -i ${{ needs.build-docker-image.outputs.tar_file }}
74-
75-
- name: Scan docker image with gokakashi
76-
uses: shinobistack/gokakashi-action@v0.1.1
77-
with:
78-
image: '${{ needs.build-docker-image.outputs.image_name }}'
79-
labels: agentKey=${{ github.run_id }}
80-
policy: ci-platform
81-
server: https://gokakashi-server.hasura-app.io
82-
token: ${{ secrets.GOKAKASHI_API_TOKEN }}
83-
cf_client_id: ${{ secrets.CF_ACCESS_CLIENT_ID }}
84-
cf_client_secret: ${{ secrets.CF_ACCESS_CLIENT_SECRET }}
85-
interval: 10
86-
retries: 8
87-
8862
scan-docker-image-with-trivy:
8963
needs: build-docker-image
9064
runs-on: ubuntu-latest

Dockerfile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
FROM node:20-alpine
1+
FROM ubuntu:noble-20260113
22

3-
# we need to update npm to update cross-spawn to a version higher than or equal to 7.0.6 to avoid a critical vulnerability
3+
RUN apt-get update && apt-get install -y \
4+
bash \
5+
jq \
6+
curl \
7+
ca-certificates \
8+
gnupg \
9+
&& mkdir -p /etc/apt/keyrings \
10+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
11+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
12+
&& apt-get update \
13+
&& apt-get install -y nodejs \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Update npm to fix vulnerabilities in its bundled dependencies
17+
# (cross-spawn, glob, tar)
418
RUN npm update -g npm
5-
RUN apk add bash jq curl
619

720
COPY ./ /app/
821
WORKDIR /app/

changelog.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Unreleased
44

5+
## [[1.8.0](https://github.com/hasura/ndc-open-api-lambda/releases/tag/v1.8.0)] 2026-02-13
6+
7+
- Freeze `ndc-nodejs-lambda` to `v1.20.2`
8+
- Update dockerfile to ubuntu:24.04
9+
- Updates for security vulnerabilities
10+
511
## [[1.7.1](https://github.com/hasura/ndc-open-api-lambda/releases/tag/v1.7.1)] 2025-07-22
612

713
- Freeze `ndc-nodejs-lambda` to `v1.15.0` ([#100](https://github.com/hasura/ndc-open-api-lambda/pull/100))
@@ -75,7 +81,7 @@
7581

7682
- Add compatibilty for Windows Powershell and Command Prompt. ([#51](https://github.com/hasura/ndc-open-api-lambda/pull/51))
7783

78-
- Use `hasuraSdk.JSONValue` as the type for `Record<>` and `object`. Also, make APIs that don't have a return type return `hasuraSdk.JSONValue` instead of `void` (39)[https://github.com/hasura/ndc-open-api-lambda/pull/39]
84+
- Use `hasuraSdk.JSONValue` as the type for `Record<>` and `object`. Also, make APIs that don't have a return type return `hasuraSdk.JSONValue` instead of `void` [39](https://github.com/hasura/ndc-open-api-lambda/pull/39)
7985

8086
## [[0.1.1](https://github.com/hasura/ndc-open-api-lambda/releases/tag/v0.1.1)] 2024-06-05
8187

@@ -93,7 +99,7 @@
9399

94100
- Added [Prettier Code Formatting](https://prettier.io/docs/en/api.html) to the generated `functions.ts` file
95101
- Added `--ndc-lambda-sdk` flag and corresponding environment variable `NDC_LAMBDA_SDK_VERSION` that can be used to set the preferred version of NDC Lambda SDK to be used
96-
- Return api errors that are not code 500 as `hasuraSdk.UnprocessableContent` (#14)[https://github.com/hasura/ndc-open-api-lambda/pull/14]
102+
- Return api errors that are not code 500 as `hasuraSdk.UnprocessableContent` [#14](https://github.com/hasura/ndc-open-api-lambda/pull/14)
97103

98104
## [[0.0.1-alpha](https://github.com/hasura/ndc-open-api-lambda/releases/tag/v0.0.1-alpha)] 2024-04-10
99105

connector-definition/.hasura-connector/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/hasura/ndc-nodejs-lambda:v1.15.0
1+
FROM ghcr.io/hasura/ndc-nodejs-lambda:v1.20.2
22

33
COPY package-lock.json package.json api.ts /functions/
44

connector-definition/.hasura-connector/connector-metadata.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ supportedEnvironmentVariables:
1414
commands:
1515
update:
1616
type: Dockerized
17-
dockerImage: ghcr.io/hasura/ndc-open-api-lambda:v1.7.1
18-
commandArgs: [ "update" ]
17+
dockerImage: ghcr.io/hasura/ndc-open-api-lambda:v1.8.0
18+
commandArgs: ["update"]
1919
cliPlugin:
2020
type: Docker
21-
dockerImage: ghcr.io/hasura/ndc-open-api-lambda:v1.7.1
21+
dockerImage: ghcr.io/hasura/ndc-open-api-lambda:v1.8.0
2222
dockerComposeWatch:
2323
# Rebuild the container if a new package restore is required because package[-lock].json changed
2424
- path: package.json
@@ -50,4 +50,5 @@ nativeToolchainDefinition:
5050
HASURA_CONFIGURATION_DIRECTORY="$HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH" "$HASURA_DDN_NATIVE_CONNECTOR_PLUGIN_DIR/ndc-oas-lambda" update
5151
powershell: |
5252
$ErrorActionPreference = "Stop"
53-
& "$env:HASURA_DDN_NATIVE_CONNECTOR_PLUGIN_DIR\ndc-oas-lambda.bat" update
53+
& "$env:HASURA_DDN_NATIVE_CONNECTOR_PLUGIN_DIR\ndc-oas-lambda.bat" update
54+

docs/documentation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This connector is published as a Docker Image. The image name is `ghcr.io/hasura
66

77
| Environment Variable | Description | Required | Example Value |
88
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------- |
9-
| NDC_OAS_DOCUMENT_URI | The URI to your Open API Document. If you're using a file instead of a HTTP link, please ensure that it is named `swagger.json` and is present in the root directory of the volume being mounted to `/etc/connector` | false | https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml |
10-
| NDC_OAS_BASE_URL | The base URL of your API. | false | http://my-awesome-webapp.com/v1/ |
9+
| NDC_OAS_DOCUMENT_URI | The URI to your Open API Document. If you're using a file instead of a HTTP link, please ensure that it is named `swagger.json` and is present in the root directory of the volume being mounted to `/etc/connector` | false | <https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml> |
10+
| NDC_OAS_BASE_URL | The base URL of your API. | false | <http://my-awesome-webapp.com/v1/> |
1111
| NDC_OAS_FILE_OVERWRITE | A Boolean flag to allow previously generated files to be over-written. Defaults to `false`. | false | |
1212
| HASURA_PLUGIN_LOG_LEVEL | The log level. Possible values: `trace`, `debug`, `info`, `warn`, `error`, `fatal`, `panic`. Defaults to `info` | false | info |
1313
| NDC_OAS_LAMBDA_PRETTY_LOGS | A Boolean flag to print human readable logs instead of JSON. Defaults to `false` | false | true |
@@ -133,19 +133,19 @@ The Docker Container will output the generated files at `/etc/connector`. Please
133133

134134
```bash
135135
# get command documentation/help
136-
docker run --rm ghcr.io/hasura/ndc-open-api-lambda:v1.7.1 update -h
136+
docker run --rm ghcr.io/hasura/ndc-open-api-lambda:v1.8.0 update -h
137137

138138
# run the code generation (using env vars)
139-
docker run --rm -v ./:/etc/connector/ -e NDC_OAS_DOCUMENT_URI=${url to open API document} ghcr.io/hasura/ndc-open-api-lambda:v1.7.1 update
139+
docker run --rm -v ./:/etc/connector/ -e NDC_OAS_DOCUMENT_URI=${url to open API document} ghcr.io/hasura/ndc-open-api-lambda:v1.8.0 update
140140

141141
# run the code generation (using CLI flags)
142-
docker run --rm -v ./:/etc/connector/ ghcr.io/hasura/ndc-open-api-lambda:v1.7.1 update --open-api ${url to open API document}
142+
docker run --rm -v ./:/etc/connector/ ghcr.io/hasura/ndc-open-api-lambda:v1.8.0 update --open-api ${url to open API document}
143143

144144
# with baseUrl (using env vars)
145-
docker run --rm -v ./:/etc/connector/ -e NDC_OAS_DOCUMENT_URI=${url to open API document} -e NDC_OAS_BASE_URL=http://demoapi.com/ ghcr.io/hasura/ndc-open-api-lambda:v1.7.1 update
145+
docker run --rm -v ./:/etc/connector/ -e NDC_OAS_DOCUMENT_URI=${url to open API document} -e NDC_OAS_BASE_URL=http://demoapi.com/ ghcr.io/hasura/ndc-open-api-lambda:v1.8.0 update
146146

147147
# with baseUrl (using CLI flags)
148-
docker run --rm -v ./:/etc/connector/ ghcr.io/hasura/ndc-open-api-lambda:v1.7.1 update --open-api ${url to open API document} --base-url http://demoapi.com/
148+
docker run --rm -v ./:/etc/connector/ ghcr.io/hasura/ndc-open-api-lambda:v1.8.0 update --open-api ${url to open API document} --base-url http://demoapi.com/
149149
```
150150

151151
## Build and Run

0 commit comments

Comments
 (0)