@aws/nx-plugin-mcp 1.0.0-rc.44 → 1.0.0-rc.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import { FileTree } from '@astrojs/starlight/components';
5
5
  import Infrastructure from '@components/infrastructure.astro';
6
6
  import Link from '@components/link.astro';
7
7
 
8
- Since this generator vends infrastructure as code based on your chosen `iacProvider`, it will create a project in `packages/common` which includes the relevant CDK constructs or Terraform modules.
8
+ Since this generator vends infrastructure as code based on your chosen `iac`, it will create a project in `packages/common` which includes the relevant CDK constructs or Terraform modules.
9
9
 
10
10
  The common infrastructure as code project is structured as follows:
11
11
 
@@ -2,11 +2,21 @@
2
2
  title: Container Image Scanning
3
3
  ---
4
4
 
5
- The Docker image built for this project is scanned for vulnerabilities as part of the build using [Trivy](https://trivy.dev/), running from the [ECR-hosted Trivy image](https://gallery.ecr.aws/aquasecurity/trivy).
5
+ import PackageManagerShortCommand from '@components/package-manager-short-command.astro';
6
6
 
7
- A `trivy` target is added to your project which scans the built image and **fails the build** if any `HIGH` or `CRITICAL` severity vulnerability is found. The generated `Dockerfile` uses a base image with no known fixable vulnerabilities of these severities at time of generation, and upgrades bundled tooling (such as `npm`) to keep it that way.
7
+ The Docker image built for this project can be scanned for vulnerabilities using [Trivy](https://trivy.dev/), running from the [ECR-hosted Trivy image](https://gallery.ecr.aws/aquasecurity/trivy).
8
8
 
9
- The scan uses the same container engine as your image build (`docker` or `finch`), so no additional tooling is required. Since the scan is only re-run when the image changes, an unchanged image is not re-scanned.
9
+ A `trivy` target is added to your project which scans the built image and **exits non-zero** if any `HIGH` or `CRITICAL` severity vulnerability is found. The generated `Dockerfile` uses a base image with no known fixable vulnerabilities of these severities at time of generation, and upgrades bundled tooling (such as `npm`) to keep it that way.
10
+
11
+ The scan uses the same container engine as your image build (`docker` or `finch`), so no additional tooling is required. Since the scan is only re-run when the image changes, an unchanged image is not re-scanned. The vended `trivy` root script scans every image in the workspace:
12
+
13
+ <PackageManagerShortCommand commands={['trivy']} />
14
+
15
+ :::tip[Run Trivy in CI]
16
+ The scan is intentionally not wired into `build` since this can introduce unnecessary friction when iterating during development, as Trivy's vulnerabilty database is continually updated with new CVEs.
17
+
18
+ Instead we recommend running the above command as a dedicated step in your CI pipeline prior to deployment to production stages.
19
+ :::
10
20
 
11
21
  :::caution[Unfixable vulnerabilities are ignored]
12
22
  The scan runs with `--ignore-unfixed`, so vulnerabilities without an available fix do not fail the build, since they cannot be actioned by upgrading tooling in your `Dockerfile` — they are not reported in the build's scan output. As new vulnerabilities are disclosed the result of scans may change over time, so review the image periodically by running `trivy image <your-image>` without the flag, and rebuild against a newer base image (or add container steps to apply available patches) once a fix is published.
package/generators.json CHANGED
@@ -211,6 +211,12 @@
211
211
  "description": "Generate a TypeScript lambda function",
212
212
  "metric": "g21"
213
213
  },
214
+ "ts#dcr-proxy": {
215
+ "factory": "./src/ts/dcr-proxy/generator",
216
+ "schema": "./src/ts/dcr-proxy/schema.json",
217
+ "description": "Generate an OAuth Dynamic Client Registration (DCR) proxy construct for Cognito-authenticated MCP servers",
218
+ "metric": "g56"
219
+ },
214
220
  "ts#mcp-server": {
215
221
  "factory": "./src/ts/mcp-server/generator",
216
222
  "schema": "./src/ts/mcp-server/schema.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin-mcp",
3
- "version": "1.0.0-rc.44",
3
+ "version": "1.0.0-rc.45",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -33,9 +33,10 @@
33
33
  },
34
34
  "auth": {
35
35
  "type": "string",
36
- "description": "The method used to authenticate inbound requests to your gateway. Only iam is supported today; cognito and custom-jwt may be added in future.",
37
- "enum": ["iam"],
36
+ "description": "The method used to authenticate inbound requests to your gateway. Only applicable when infra is set (ignored when infra is none).",
37
+ "enum": ["iam", "cognito"],
38
38
  "default": "iam",
39
+ "x-prompt": "How would you like to authenticate inbound requests to your gateway?",
39
40
  "x-priority": "important"
40
41
  },
41
42
  "cedarPolicy": {
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "$id": "ts#dcr-proxy",
4
+ "title": "ts#dcr-proxy",
5
+ "description": "Generate an OAuth Dynamic Client Registration (DCR) proxy construct for Cognito-authenticated MCP servers",
6
+ "type": "object",
7
+ "properties": {
8
+ "name": {
9
+ "type": "string",
10
+ "description": "The name of your DCR proxy, used for its TypeScript handler project, the construct/module class name, and its directory under common/constructs or common/terraform",
11
+ "default": "dcr-proxy",
12
+ "$default": {
13
+ "$source": "argv",
14
+ "index": 0
15
+ },
16
+ "x-prompt": "What would you like to call your DCR proxy?",
17
+ "x-priority": "important"
18
+ },
19
+ "directory": {
20
+ "description": "The directory to store the DCR proxy handler project in.",
21
+ "type": "string",
22
+ "alias": "dir",
23
+ "x-priority": "important",
24
+ "default": "packages"
25
+ },
26
+ "subDirectory": {
27
+ "type": "string",
28
+ "description": "The sub directory the handler project is placed in. By default this is the project name."
29
+ },
30
+ "iac": {
31
+ "type": "string",
32
+ "description": "The preferred IaC provider (cdk or terraform). By default this is inherited from your initial selection.",
33
+ "enum": ["inherit", "cdk", "terraform"],
34
+ "x-priority": "important",
35
+ "default": "inherit",
36
+ "x-prompt": "Which provider would you like to manage your infrastructure? (default: inherit)"
37
+ },
38
+ "preferInstallDependencies": {
39
+ "type": "boolean",
40
+ "description": "Whether to prefer installing dependencies after the generator runs. Set to false to defer installing when batching multiple generators (an install still runs if needed so subsequent generators can compute the Nx project graph); install once at the end.",
41
+ "default": true
42
+ }
43
+ }
44
+ }