Skip to content
Back to search

nx-plugin-for-aws

MarketplaceWorks with Claude CodeGitHub

The @aws/nx-plugin is a collection of code generators that automate the creation and configuration of cloud-native applications using AWS, TypeScript, Python and React within the Nx development ecosystem.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026. Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/awslabs/nx-plugin-for-aws with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/awslabs/nx-plugin-for-aws'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/awslabs--nx-plugin-for-aws/badge.svg)](/listings/awslabs--nx-plugin-for-aws)

HTML

<a href="/listings/awslabs--nx-plugin-for-aws"><img src="/api/listings/awslabs--nx-plugin-for-aws/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Build with AI

**1. Create a workspace**

pnpm create @aws/nx-workspace my-project
cd my-project

**2. Open your AI assistant in the created workspace and prompt it**

> _"Use the Nx Plugin for AWS to build a full-stack application consisting of a React website with shadcn and Cognito authentication, connected to a TypeScript Strands agent via the AG-UI protocol, and infrastructure to deploy it."_

Your AI assistant will use the Nx Plugin for AWS MCP server, which is preconfigured in every workspace you create with the command above, to scaffold, connect, and configure everything. See the [Building with AI guide](https://awslabs.github.io/nx-plugin-for-aws/en/get_started/building-with-ai/) for more details.

Build with the CLI

Create a workspace and start adding components — zero configuration required:

# Create a new workspace
pnpm create @aws/nx-workspace my-project
cd my-project

# Add a tRPC API
pnpm nx g @aws/nx-plugin:ts#api --framework=trpc

# Add a Strands AI agent (Python)
pnpm nx g @aws/nx-plugin:py#agent

# Add a React website
pnpm nx g @aws/nx-plugin:ts#website --framework=react

# Add authentication to your website
pnpm nx g @aws/nx-plugin:ts#website#auth

# Connect your website to your API and agent
pnpm nx g @aws/nx-plugin:connection

# Add CDK infrastructure to deploy it all (or choose Terraform)
pnpm nx g @aws/nx-plugin:ts#infra

> See the full [Quick Start guide](https://awslabs.github.io/nx-plugin-for-aws/en/get_started/quick-start) and [Dungeon Adventure tutorial](https://awslabs.github.io/nx-plugin-for-aws/en/get_started/tutorials/dungeon-game/overview/) for a deeper walkthrough.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 25 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "nx-plugin-for-aws",
  3. "owner": {
  4. "name": "AWS",
  5. "email": "nx-plugin@amazon.com"
  6. },
  7. "plugins": [
  8. {
  9. "name": "nx-plugin-for-aws",
  10. "source": {
  11. "source": "github",
  12. "repo": "awslabs/nx-plugin-for-aws"
  13. },
  14. "description": "Scaffold and build cloud-native applications on AWS using @aws/nx-plugin generators.",
  15. "version": "1.0.0",
  16. "author": {
  17. "name": "AWS"
  18. },
  19. "homepage": "https://awslabs.github.io/nx-plugin-for-aws",
  20. "repository": "https://github.com/awslabs/nx-plugin-for-aws",
  21. "license": "Apache-2.0",
  22. "keywords": ["aws", "nx", "cdk", "terraform", "agent", "mcp-server"]
  23. }
  24. ]
  25. }
README.md · README · 138 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. <h1>Nx Plugin for AWS</h1>
  3. <h3>Build full-stack AWS apps in minutes</h3>
  4. <a href="https://opensource.org/licenses/Apache-2.0">
  5. <img
  6. src="https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg"
  7. alt="Apache 2.0 License"
  8. />
  9. </a>
  10. <a href="https://codecov.io/gh/awslabs/nx-plugin-for-aws">
  11. <img src="https://codecov.io/gh/awslabs/nx-plugin-for-aws/graph/badge.svg?token=X27pgFfxuQ" />
  12. </a>
  13. <a href="https://github.com/awslabs/nx-plugin-for-aws/actions/workflows/ci.yml">
  14. <img
  15. src="https://github.com/awslabs/nx-plugin-for-aws/actions/workflows/ci.yml/badge.svg"
  16. alt="Release badge"
  17. />
  18. </a>
  19. <a href="https://github.com/awslabs/nx-plugin-for-aws/commits/main">
  20. <img
  21. src="https://img.shields.io/github/commit-activity/w/awslabs/nx-plugin-for-aws"
  22. alt="Commit activity"
  23. />
  24. </a>
  25. <p>
  26. <a href="https://awslabs.github.io/nx-plugin-for-aws/"><b>Documentation Site</b></a>
  27. </p>
  28. </div>
  29. ---
  30. **@aws/nx-plugin** is a collection of code generators that scaffold full-stack AWS applications inside an [Nx](https://nx.dev) monorepo. Every generator produces best-practice application code **and** the infrastructure to deploy it — type-safe, locally runnable, and deployable from the start, getting you closer to production.
  31. <div align="center">
  32. <img
  33. src="https://raw.githubusercontent.com/awslabs/nx-plugin-for-aws/main/docs/src/content/docs/assets/nx-plugin-showcase-desktop-dark.gif"
  34. alt="Scaffolding, running and deploying a full-stack AWS application with the Nx Plugin for AWS"
  35. width="900"
  36. />
  37. </div>
  38. ## Quick Start
  39. ### Build with AI
  40. **1. Create a workspace**
  41. ```bash
  42. pnpm create @aws/nx-workspace my-project
  43. cd my-project
  44. ```
  45. **2. Open your AI assistant in the created workspace and prompt it**
  46. > _"Use the Nx Plugin for AWS to build a full-stack application consisting of a React website with shadcn and Cognito authentication, connected to a TypeScript Strands agent via the AG-UI protocol, and infrastructure to deploy it."_
  47. Your AI assistant will use the Nx Plugin for AWS MCP server, which is preconfigured in every workspace you create with the command above, to scaffold, connect, and configure everything. See the [Building with AI guide](https://awslabs.github.io/nx-plugin-for-aws/en/get_started/building-with-ai/) for more details.
  48. ### Build with the CLI
  49. Create a workspace and start adding components — zero configuration required:
  50. ```bash
  51. # Create a new workspace
  52. pnpm create @aws/nx-workspace my-project
  53. cd my-project
  54. # Add a tRPC API
  55. pnpm nx g @aws/nx-plugin:ts#api --framework=trpc
  56. # Add a Strands AI agent (Python)
  57. pnpm nx g @aws/nx-plugin:py#agent
  58. # Add a React website
  59. pnpm nx g @aws/nx-plugin:ts#website --framework=react
  60. # Add authentication to your website
  61. pnpm nx g @aws/nx-plugin:ts#website#auth
  62. # Connect your website to your API and agent
  63. pnpm nx g @aws/nx-plugin:connection
  64. # Add CDK infrastructure to deploy it all (or choose Terraform)
  65. pnpm nx g @aws/nx-plugin:ts#infra
  66. ```
  67. > See the full [Quick Start guide](https://awslabs.github.io/nx-plugin-for-aws/en/get_started/quick-start) and [Dungeon Adventure tutorial](https://awslabs.github.io/nx-plugin-for-aws/en/get_started/tutorials/dungeon-game/overview/) for a deeper walkthrough.
  68. ## Available Generators
  69. | Generator | Description |
  70. | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
  71. | `init` | Configure an existing Nx workspace to use the plugin |
  72. | `ts#project` | TypeScript library |
  73. | `ts#api` | TypeScript API (tRPC or Smithy) with API Gateway + Lambda + [Powertools](https://github.com/aws-powertools/powertools-lambda-typescript) |
  74. | `ts#rdb` | Relational databases with Aurora RDS |
  75. | `ts#dynamodb` | Type-safe DynamoDB single-table design (TypeScript, ElectroDB) |
  76. | `ts#website` | React app (Vite) |
  77. | `ts#website#auth` | Add Cognito auth to a website, optionally with OIDC federation |
  78. | `ts#infra` | AWS CDK infrastructure project |
  79. | `ts#lambda-function` | TypeScript Lambda with type-safe event sources |
  80. | `ts#mcp-server` | MCP server (TypeScript) |
  81. | `ts#dcr-proxy` | OAuth DCR proxy construct for Cognito-authenticated MCP servers |
  82. | `ts#agent` | [Strands Agent](https://strandsagents.com/) (TypeScript) |
  83. | `ts#agent#guardrails` | Amazon Bedrock Guardrail for a TypeScript Agent (experimental) |
  84. | `ts#nx-generator` | Nx generator scaffold |
  85. | `ts#docs` | Documentation site (Astro + Starlight) |
  86. | `smithy#project` | Smithy model project — a service model, or a shape library shared between Smithy projects |
  87. | `py#project` | Python project (uv) |
  88. | `py#api` | Python API (FastAPI) with API Gateway + Lambda + [Powertools](https://github.com/aws-powertools/powertools-lambda-python) |
  89. | `py#rdb` | Relational databases with Aurora RDS (Python) |
  90. | `py#dynamodb` | Python DynamoDB project |
  91. | `py#lambda-function` | Python Lambda with type-safe event sources |
  92. | `py#mcp-server` | MCP server (Python) |
  93. | `py#agent` | [Strands Agent](https://strandsagents.com/) (Python) |
  94. | `py#agent#guardrails` | Amazon Bedrock Guardrail for a Python Agent (experimental) |
  95. | `agentcore-gateway` | [AgentCore Gateway](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html) project |
  96. | `greengrass#component` | [AWS IoT Greengrass](https://docs.aws.amazon.com/greengrass/v2/developerguide/) v2 component for Python or TypeScript (experimental) |
  97. | `agentcore-harness` | [AgentCore Harness](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness.html) agent loop (experimental) |
  98. | `connection` | Connect projects together (e.g. frontend to API) |
  99. | `terraform#project` | Terraform project |
  100. | `license` | Manage LICENSE files and source headers |
  101. ## Community
  102. Join us on Slack in the [#nx-plugin-for-aws](https://cdk-dev.slack.com/archives/C0AG11EUHM4) channel to ask questions, share feedback, and connect with other users and contributors.
  103. ## Contributing
  104. Read our [Contributing Guide](/CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.
  105. ## Code of Conduct
  106. This project has adopted a Code of Conduct that we expect project participants to adhere to. Please read the [Code of Conduct](/CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
  107. ## License
  108. @aws/nx-plugin is [Apache 2.0 licensed](/LICENSE).
e2e/src/smoke-tests/git-secrets.spec.ts · Bundled script · 205 lines · 1 finding marked
  1. /**
  2. * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. import { execFileSync } from 'node:child_process';
  6. import {
  7. existsSync,
  8. mkdtempSync,
  9. readFileSync,
  10. rmSync,
  11. writeFileSync,
  12. } from 'node:fs';
  13. import { tmpdir } from 'node:os';
  14. import { join } from 'node:path';
  15. import { ensureDirSync } from 'fs-extra';
  16. import { afterEach, beforeEach, describe, expect, it } from 'vitest';
  17. import { buildCreateNxWorkspaceCommand, runCLI, tmpProjPath } from '../utils';
  18. describe('smoke test - git-secrets', () => {
  19. const pkgMgr = 'pnpm';
  20. const targetDir = `${tmpProjPath()}/git-secrets-${pkgMgr}`;
  21. let gitConfigDir: string;
  22. /**
  23. * `git` with an identity supplied through a throwaway config, rather than
  24. * `git config --global`, which would overwrite the real `user.name`/
  25. * `user.email` of whoever (or whatever CI runner) ran the suite and leave it
  26. * overwritten afterwards. `GIT_CONFIG_SYSTEM` points at an empty file so
  27. * system config cannot supply a conflicting identity.
  28. */
  29. const git = (args: string[], cwd: string) =>
  30. execFileSync('git', args, {
  31. cwd,
  32. encoding: 'utf-8',
  33. stdio: 'pipe',
  34. env: {
  35. ...process.env,
  36. GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
  37. GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
  38. },
  39. });
  40. beforeEach(() => {
  41. if (existsSync(targetDir)) {
  42. rmSync(targetDir, { force: true, recursive: true });
  43. }
  44. ensureDirSync(targetDir);
  45. gitConfigDir = mkdtempSync(join(tmpdir(), 'nx-e2e-gitconfig-'));
  46. writeFileSync(
  47. join(gitConfigDir, 'global'),
  48. '[user]\n\tname = E2E Test\n\temail = e2e-test@example.invalid\n',
  49. );
  50. writeFileSync(join(gitConfigDir, 'system'), '');
  51. });
  52. afterEach(() => {
  53. if (gitConfigDir && existsSync(gitConfigDir)) {
  54. rmSync(gitConfigDir, { force: true, recursive: true });
  55. }
  56. });
  57. it('should block commits containing AWS access keys', async () => {
  58. await runCLI(
  59. `${buildCreateNxWorkspaceCommand(pkgMgr, 'gs-test', 'cdk')} --interactive=false`,
  60. {
  61. cwd: targetDir,
  62. prefixWithPackageManagerCmd: false,
  63. redirectStderr: true,
  64. env: {
  65. GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
  66. GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
  67. },
  68. },
  69. );
  70. const projectRoot = `${targetDir}/gs-test`;
  71. // Verify workspace was created with git initialized
  72. expect(existsSync(join(projectRoot, '.git'))).toBe(true);
  73. expect(existsSync(join(projectRoot, '.git-secrets/git-secrets'))).toBe(
  74. true,
  75. );
  76. expect(existsSync(join(projectRoot, '.husky/pre-commit'))).toBe(true);
  77. // git commit should fail — the pre-commit hook blocks the secret
  78. writeFileSync(
  79. join(projectRoot, 'secret.ts'),
  80. `export const KEY = "AKIAIOSFODNN7EXAMPLA";\n`,
    • Dismissed after review: Contains what looks like an AWS access key ID (no secret access key next to it)
    • Line 89 on GitHub
  81. );
  82. git(['add', 'secret.ts'], projectRoot);
  83. let blocked = false;
  84. try {
  85. git(['commit', '-m', 'add secret'], projectRoot);
  86. } catch (e) {
  87. blocked = true;
  88. expect(e.stderr).toContain('Matched one or more prohibited patterns');
  89. }
  90. expect(blocked).toBe(true);
  91. // Safe files can be committed
  92. git(['rm', '--cached', 'secret.ts'], projectRoot);
  93. writeFileSync(
  94. join(projectRoot, 'safe.ts'),
  95. `export const greeting = 'hello';\n`,
  96. );
  97. git(['add', 'safe.ts'], projectRoot);
  98. git(['commit', '-m', 'add safe file'], projectRoot);
  99. // The suppression commands the workspace guide documents must genuinely add
  100. // a pattern. The vendored script parses only the short forms, so those are
  101. // what the guide gives and what this asserts.
  102. const gitSecrets = (args: string[]) =>
  103. execFileSync('bash', ['.git-secrets/git-secrets', ...args], {
  104. cwd: projectRoot,
  105. encoding: 'utf-8',
  106. stdio: 'pipe',
  107. env: {
  108. ...process.env,
  109. GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
  110. GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
  111. },
  112. });
  113. gitSecrets(['--add', '-a', '--', 'my-regex-pattern']);
  114. gitSecrets(['--add', '-a', '-l', '--', 'my-literal+string']);
  115. const allowed = git(
  116. ['config', '--get-all', 'secrets.allowed'],
  117. projectRoot,
  118. );
  119. expect(allowed).toContain('my-regex-pattern');
  120. // -l escapes the regex metacharacters.
  121. expect(allowed).toContain('my-literal\\+string');
  122. // A real secret is still caught after suppressing a false positive.
  123. git(['add', 'secret.ts'], projectRoot);
  124. let stillBlocked = false;
  125. try {
  126. git(['commit', '-m', 'add secret again'], projectRoot);
  127. } catch (e) {
  128. stillBlocked = true;
  129. expect(e.stderr).toContain('Matched one or more prohibited patterns');
  130. }
  131. expect(stillBlocked).toBe(true);
  132. git(['rm', '--cached', 'secret.ts'], projectRoot);
  133. // The suppressed pattern is genuinely allowed through.
  134. writeFileSync(
  135. join(projectRoot, 'allowed.ts'),
  136. `export const x = 'my-regex-pattern';\n`,
  137. );
  138. git(['add', 'allowed.ts'], projectRoot);
  139. git(['commit', '-m', 'add allowed pattern'], projectRoot);
  140. });
  141. it('should commit a generated stages.config.ts once allowed', async () => {
  142. await runCLI(
  143. `${buildCreateNxWorkspaceCommand(pkgMgr, 'gs-stages', 'cdk')} --interactive=false`,
  144. {
  145. cwd: targetDir,
  146. prefixWithPackageManagerCmd: false,
  147. redirectStderr: true,
  148. env: {
  149. GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
  150. GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
  151. },
  152. },
  153. );
  154. const projectRoot = `${targetDir}/gs-stages`;
  155. await runCLI(
  156. `generate @aws/nx-plugin:ts#infra --name=staged-infra --stageConfig=true --no-interactive`,
  157. { cwd: projectRoot, env: { NX_DAEMON: 'false' } },
  158. );
  159. const stagesConfig = join(
  160. projectRoot,
  161. 'packages/common/infra-config/src/stages.config.ts',
  162. );
  163. expect(existsSync(stagesConfig)).toBe(true);
  164. // Account ids are flagged by default, so committing the stage config is
  165. // blocked until the user allows them — as the infrastructure guide says.
  166. git(['add', '-A'], projectRoot);
  167. let blocked = false;
  168. try {
  169. git(['commit', '-m', 'add staged infra'], projectRoot);
  170. } catch (e) {
  171. blocked = true;
  172. expect(e.stderr).toContain('Matched one or more prohibited patterns');
  173. }
  174. expect(blocked).toBe(true);
  175. // The .gitallowed entry the guide documents unblocks it.
  176. const gitallowed = join(projectRoot, '.gitallowed');
  177. writeFileSync(
  178. gitallowed,
  179. `${readFileSync(gitallowed, 'utf-8')}stages\\.config\\.ts:[0-9]+:.*[0-9]{12}\n`,
  180. );
  181. git(['add', '-A'], projectRoot);
  182. git(['commit', '-m', 'add staged infra'], projectRoot);
  183. });
  184. });

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.