nx-plugin-for-aws
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.
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
Markdown
[](/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.
- {
- "name": "nx-plugin-for-aws",
- "owner": {
- "name": "AWS",
- "email": "nx-plugin@amazon.com"
- },
- "plugins": [
- {
- "name": "nx-plugin-for-aws",
- "source": {
- "source": "github",
- "repo": "awslabs/nx-plugin-for-aws"
- },
- "description": "Scaffold and build cloud-native applications on AWS using @aws/nx-plugin generators.",
- "version": "1.0.0",
- "author": {
- "name": "AWS"
- },
- "homepage": "https://awslabs.github.io/nx-plugin-for-aws",
- "repository": "https://github.com/awslabs/nx-plugin-for-aws",
- "license": "Apache-2.0",
- "keywords": ["aws", "nx", "cdk", "terraform", "agent", "mcp-server"]
- }
- ]
- }
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.
- <div align="center">
- <h1>Nx Plugin for AWS</h1>
- <h3>Build full-stack AWS apps in minutes</h3>
- <a href="https://opensource.org/licenses/Apache-2.0">
- <img
- src="https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg"
- alt="Apache 2.0 License"
- />
- </a>
- <a href="https://codecov.io/gh/awslabs/nx-plugin-for-aws">
- <img src="https://codecov.io/gh/awslabs/nx-plugin-for-aws/graph/badge.svg?token=X27pgFfxuQ" />
- </a>
- <a href="https://github.com/awslabs/nx-plugin-for-aws/actions/workflows/ci.yml">
- <img
- src="https://github.com/awslabs/nx-plugin-for-aws/actions/workflows/ci.yml/badge.svg"
- alt="Release badge"
- />
- </a>
- <a href="https://github.com/awslabs/nx-plugin-for-aws/commits/main">
- <img
- src="https://img.shields.io/github/commit-activity/w/awslabs/nx-plugin-for-aws"
- alt="Commit activity"
- />
- </a>
- <p>
- <a href="https://awslabs.github.io/nx-plugin-for-aws/"><b>Documentation Site</b></a>
- </p>
- </div>
- ---
- **@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.
- <div align="center">
- <img
- src="https://raw.githubusercontent.com/awslabs/nx-plugin-for-aws/main/docs/src/content/docs/assets/nx-plugin-showcase-desktop-dark.gif"
- alt="Scaffolding, running and deploying a full-stack AWS application with the Nx Plugin for AWS"
- width="900"
- />
- </div>
- ## Quick Start
- ### Build with AI
- **1. Create a workspace**
- ```bash
- 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:
- ```bash
- # 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.
- ## Available Generators
- | Generator | Description |
- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
- | `init` | Configure an existing Nx workspace to use the plugin |
- | `ts#project` | TypeScript library |
- | `ts#api` | TypeScript API (tRPC or Smithy) with API Gateway + Lambda + [Powertools](https://github.com/aws-powertools/powertools-lambda-typescript) |
- | `ts#rdb` | Relational databases with Aurora RDS |
- | `ts#dynamodb` | Type-safe DynamoDB single-table design (TypeScript, ElectroDB) |
- | `ts#website` | React app (Vite) |
- | `ts#website#auth` | Add Cognito auth to a website, optionally with OIDC federation |
- | `ts#infra` | AWS CDK infrastructure project |
- | `ts#lambda-function` | TypeScript Lambda with type-safe event sources |
- | `ts#mcp-server` | MCP server (TypeScript) |
- | `ts#dcr-proxy` | OAuth DCR proxy construct for Cognito-authenticated MCP servers |
- | `ts#agent` | [Strands Agent](https://strandsagents.com/) (TypeScript) |
- | `ts#agent#guardrails` | Amazon Bedrock Guardrail for a TypeScript Agent (experimental) |
- | `ts#nx-generator` | Nx generator scaffold |
- | `ts#docs` | Documentation site (Astro + Starlight) |
- | `smithy#project` | Smithy model project — a service model, or a shape library shared between Smithy projects |
- | `py#project` | Python project (uv) |
- | `py#api` | Python API (FastAPI) with API Gateway + Lambda + [Powertools](https://github.com/aws-powertools/powertools-lambda-python) |
- | `py#rdb` | Relational databases with Aurora RDS (Python) |
- | `py#dynamodb` | Python DynamoDB project |
- | `py#lambda-function` | Python Lambda with type-safe event sources |
- | `py#mcp-server` | MCP server (Python) |
- | `py#agent` | [Strands Agent](https://strandsagents.com/) (Python) |
- | `py#agent#guardrails` | Amazon Bedrock Guardrail for a Python Agent (experimental) |
- | `agentcore-gateway` | [AgentCore Gateway](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html) project |
- | `greengrass#component` | [AWS IoT Greengrass](https://docs.aws.amazon.com/greengrass/v2/developerguide/) v2 component for Python or TypeScript (experimental) |
- | `agentcore-harness` | [AgentCore Harness](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness.html) agent loop (experimental) |
- | `connection` | Connect projects together (e.g. frontend to API) |
- | `terraform#project` | Terraform project |
- | `license` | Manage LICENSE files and source headers |
- ## Community
- 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.
- ## Contributing
- 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.
- ## Code of Conduct
- 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.
- ## License
- @aws/nx-plugin is [Apache 2.0 licensed](/LICENSE).
e2e/src/smoke-tests/git-secrets.spec.ts · Bundled script · 205 lines · 1 finding marked
- /**
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
- import { execFileSync } from 'node:child_process';
- import {
- existsSync,
- mkdtempSync,
- readFileSync,
- rmSync,
- writeFileSync,
- } from 'node:fs';
- import { tmpdir } from 'node:os';
- import { join } from 'node:path';
- import { ensureDirSync } from 'fs-extra';
- import { afterEach, beforeEach, describe, expect, it } from 'vitest';
- import { buildCreateNxWorkspaceCommand, runCLI, tmpProjPath } from '../utils';
- describe('smoke test - git-secrets', () => {
- const pkgMgr = 'pnpm';
- const targetDir = `${tmpProjPath()}/git-secrets-${pkgMgr}`;
- let gitConfigDir: string;
- /**
- * `git` with an identity supplied through a throwaway config, rather than
- * `git config --global`, which would overwrite the real `user.name`/
- * `user.email` of whoever (or whatever CI runner) ran the suite and leave it
- * overwritten afterwards. `GIT_CONFIG_SYSTEM` points at an empty file so
- * system config cannot supply a conflicting identity.
- */
- const git = (args: string[], cwd: string) =>
- execFileSync('git', args, {
- cwd,
- encoding: 'utf-8',
- stdio: 'pipe',
- env: {
- ...process.env,
- GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
- GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
- },
- });
- beforeEach(() => {
- if (existsSync(targetDir)) {
- rmSync(targetDir, { force: true, recursive: true });
- }
- ensureDirSync(targetDir);
- gitConfigDir = mkdtempSync(join(tmpdir(), 'nx-e2e-gitconfig-'));
- writeFileSync(
- join(gitConfigDir, 'global'),
- '[user]\n\tname = E2E Test\n\temail = e2e-test@example.invalid\n',
- );
- writeFileSync(join(gitConfigDir, 'system'), '');
- });
- afterEach(() => {
- if (gitConfigDir && existsSync(gitConfigDir)) {
- rmSync(gitConfigDir, { force: true, recursive: true });
- }
- });
- it('should block commits containing AWS access keys', async () => {
- await runCLI(
- `${buildCreateNxWorkspaceCommand(pkgMgr, 'gs-test', 'cdk')} --interactive=false`,
- {
- cwd: targetDir,
- prefixWithPackageManagerCmd: false,
- redirectStderr: true,
- env: {
- GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
- GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
- },
- },
- );
- const projectRoot = `${targetDir}/gs-test`;
- // Verify workspace was created with git initialized
- expect(existsSync(join(projectRoot, '.git'))).toBe(true);
- expect(existsSync(join(projectRoot, '.git-secrets/git-secrets'))).toBe(
- true,
- );
- expect(existsSync(join(projectRoot, '.husky/pre-commit'))).toBe(true);
- // git commit should fail — the pre-commit hook blocks the secret
- writeFileSync(
- join(projectRoot, 'secret.ts'),
- `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
- );
- git(['add', 'secret.ts'], projectRoot);
- let blocked = false;
- try {
- git(['commit', '-m', 'add secret'], projectRoot);
- } catch (e) {
- blocked = true;
- expect(e.stderr).toContain('Matched one or more prohibited patterns');
- }
- expect(blocked).toBe(true);
- // Safe files can be committed
- git(['rm', '--cached', 'secret.ts'], projectRoot);
- writeFileSync(
- join(projectRoot, 'safe.ts'),
- `export const greeting = 'hello';\n`,
- );
- git(['add', 'safe.ts'], projectRoot);
- git(['commit', '-m', 'add safe file'], projectRoot);
- // The suppression commands the workspace guide documents must genuinely add
- // a pattern. The vendored script parses only the short forms, so those are
- // what the guide gives and what this asserts.
- const gitSecrets = (args: string[]) =>
- execFileSync('bash', ['.git-secrets/git-secrets', ...args], {
- cwd: projectRoot,
- encoding: 'utf-8',
- stdio: 'pipe',
- env: {
- ...process.env,
- GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
- GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
- },
- });
- gitSecrets(['--add', '-a', '--', 'my-regex-pattern']);
- gitSecrets(['--add', '-a', '-l', '--', 'my-literal+string']);
- const allowed = git(
- ['config', '--get-all', 'secrets.allowed'],
- projectRoot,
- );
- expect(allowed).toContain('my-regex-pattern');
- // -l escapes the regex metacharacters.
- expect(allowed).toContain('my-literal\\+string');
- // A real secret is still caught after suppressing a false positive.
- git(['add', 'secret.ts'], projectRoot);
- let stillBlocked = false;
- try {
- git(['commit', '-m', 'add secret again'], projectRoot);
- } catch (e) {
- stillBlocked = true;
- expect(e.stderr).toContain('Matched one or more prohibited patterns');
- }
- expect(stillBlocked).toBe(true);
- git(['rm', '--cached', 'secret.ts'], projectRoot);
- // The suppressed pattern is genuinely allowed through.
- writeFileSync(
- join(projectRoot, 'allowed.ts'),
- `export const x = 'my-regex-pattern';\n`,
- );
- git(['add', 'allowed.ts'], projectRoot);
- git(['commit', '-m', 'add allowed pattern'], projectRoot);
- });
- it('should commit a generated stages.config.ts once allowed', async () => {
- await runCLI(
- `${buildCreateNxWorkspaceCommand(pkgMgr, 'gs-stages', 'cdk')} --interactive=false`,
- {
- cwd: targetDir,
- prefixWithPackageManagerCmd: false,
- redirectStderr: true,
- env: {
- GIT_CONFIG_GLOBAL: join(gitConfigDir, 'global'),
- GIT_CONFIG_SYSTEM: join(gitConfigDir, 'system'),
- },
- },
- );
- const projectRoot = `${targetDir}/gs-stages`;
- await runCLI(
- `generate @aws/nx-plugin:ts#infra --name=staged-infra --stageConfig=true --no-interactive`,
- { cwd: projectRoot, env: { NX_DAEMON: 'false' } },
- );
- const stagesConfig = join(
- projectRoot,
- 'packages/common/infra-config/src/stages.config.ts',
- );
- expect(existsSync(stagesConfig)).toBe(true);
- // Account ids are flagged by default, so committing the stage config is
- // blocked until the user allows them — as the infrastructure guide says.
- git(['add', '-A'], projectRoot);
- let blocked = false;
- try {
- git(['commit', '-m', 'add staged infra'], projectRoot);
- } catch (e) {
- blocked = true;
- expect(e.stderr).toContain('Matched one or more prohibited patterns');
- }
- expect(blocked).toBe(true);
- // The .gitallowed entry the guide documents unblocks it.
- const gitallowed = join(projectRoot, '.gitallowed');
- writeFileSync(
- gitallowed,
- `${readFileSync(gitallowed, 'utf-8')}stages\\.config\\.ts:[0-9]+:.*[0-9]{12}\n`,
- );
- git(['add', '-A'], projectRoot);
- git(['commit', '-m', 'add staged infra'], projectRoot);
- });
- });
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.